Build Microsoft Teams agents, tabs, message extensions, and proactive notification services in TypeScript.
@microsoft/teams.apps handles Teams activity routing, request auth, replies, proactive sends, Graph access, OAuth sign-in, plugins, and HTTP hosting so you can focus on your app behavior.
Read the full docs at aka.ms/teams-sdk-ts.
npm install @microsoft/teams.appsimport { App } from '@microsoft/teams.apps';
const app = new App();
app.on('message', async ({ activity, reply }) => {
await reply(`You said: ${activity.text}`);
});
app.start().catch(console.error);By default, the app receives Teams activities at /api/messages.
@microsoft/teams.apps can start its own HTTP server, or plug into an existing server/framework with an HTTP adapter.
import express from 'express';
import { App, ExpressAdapter } from '@microsoft/teams.apps';
async function main() {
const server = express();
server.get('/health', (_req, res) => {
res.json({ status: 'ok' });
});
const app = new App({
httpServerAdapter: new ExpressAdapter(server),
});
app.on('message', async ({ activity, reply }) => {
await reply(`You said: ${activity.text}`);
});
await app.initialize(); // registers /api/messages on your server
server.listen(process.env.PORT || 3978);
}
main().catch(console.error);See the HTTP adapter examples for framework integration samples.
See the examples folder for agents, tabs, message extensions, proactive messaging, Graph, AI/MCP, A2A, and more.