MCP Server Example on MCP SDK#534
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the MCP Teams bot example from @examples/mcp to a new @examples/mcp-server workspace and expands it into a more complete MCP server that can message Teams users and support Q&A + approval flows via MCP tools.
Changes:
- Replace the old minimal MCP bot example (
examples/mcp) with a new MCP server implementation (examples/mcp-server) using@modelcontextprotocol/sdk’sMcpServer+ Streamable HTTP transport. - Add in-memory state + Teams handlers to support
notify,ask/getReply, andrequestApproval/getApprovaltools. - Update repo docs/lockfile to reflect the new example package and dependency set.
Reviewed changes
Copilot reviewed 11 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package-lock.json | Updates workspace entries and adds new deps for the MCP server example (including MCP inspector). |
| examples/mcp/src/index.ts | Removes the previous minimal MCP bot implementation. |
| examples/mcp/appPackage/manifest.json | Removes the old Teams app manifest for the prior example. |
| examples/mcp/appPackage/outline.png | Removes old app package asset (example app icon). |
| examples/mcp/appPackage/color.png | Removes old app package asset (example app icon). |
| examples/mcp/README.md | Removes the old example documentation. |
| examples/mcp-server/turbo.json | Adds Turbo build config for the new example workspace. |
| examples/mcp-server/tsconfig.json | Adds TypeScript config for building the new example. |
| examples/mcp-server/src/state.ts | Adds in-memory state maps for conversation IDs, asks, and approvals. |
| examples/mcp-server/src/mcpTools.ts | Implements MCP tool registrations and proactive Teams messaging/approval cards. |
| examples/mcp-server/src/index.ts | Boots the app and mounts the MCP Streamable HTTP transport at /mcp. |
| examples/mcp-server/src/app.ts | Adds Teams message and card.action handlers to capture replies and approvals. |
| examples/mcp-server/package.json | Renames package and updates deps/devDeps/scripts for the new MCP server example. |
| examples/mcp-server/eslint.config.js | Adds ESLint configuration for the new workspace. |
| examples/mcp-server/README.md | Adds documentation for tools, layout, and run/inspector flow. |
| examples/mcp-server/CHANGELOG.md | Updates changelog header for the renamed example package. |
| examples/mcp-server/.gitignore | Adds workspace-local ignores (env, infra, node_modules, etc.). |
| README.md | Updates the root examples list to point to @examples/mcp-server. |
| .gitignore | Adds .claude/settings.local.json to ignored local files. |
Comments suppressed due to low confidence (1)
examples/mcp-server/package.json:39
@modelcontextprotocol/inspector@^0.21.2requires Node>=22.7.5(per the lockfile), but the repo’s rootpackage.jsondeclaresengines.node >=20. This can cause install-time engine warnings or failures in CI/dev environments pinned to Node 20. Consider pinning the inspector to a version that supports Node 20, or updating the repo/tooling Node requirement consistently.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
corinagum
left a comment
There was a problem hiding this comment.
This sample won't start without TENANT_ID in env vars; I think in another sample either in TS or PY we started getting more explicit about tenant id. Here it should be added to the README as a pre-req.
rido-min
left a comment
There was a problem hiding this comment.
still trying to get the sample running
corinagum
left a comment
There was a problem hiding this comment.
lgtm, thanks for the updates :)
Merges main into release and sets version to 2.0.10. ## Commits since last release - 7147cd8 fix(apps): support AAD v1 issuers in token validation (#556) - eb8037e address model gaps (#525) - ac21af6 fix(http-stream): resolve race condition in close() and streamType override in final message (#553) - 6b0da8a MCP Server Example on MCP SDK (#534) - a749172 chore: bump version to 2.0.10-preview (#555)
This pull request migrates and refactors the MCP (Model Context Protocol) Teams bot example from
@examples/mcpto@examples/mcp-server, significantly expanding its functionality and improving its documentation and code structure. The new implementation provides a robust MCP server that exposes human-in-the-loop tools for Teams, including notification, question/answer, and approval flows.Key changes include:
1. Migration and Renaming
@examples/mcpto@examples/mcp-server, with all related files and documentation updated to reflect the new name. (README.md,CHANGELOG.md,package.json, directory and file renames)2. Major Feature Expansion
notify,ask,getReply,requestApproval, andgetApproval. These tools allow agents or clients to interact with real users via Teams for notifications, Q&A, and approval workflows.4. Removal of Old Implementation
README.md,manifest.json, and TypeScript entry point, which are replaced with the new, more capable server.