Skip to content

MCP Server Example on MCP SDK#534

Merged
MehakBindra merged 8 commits into
mainfrom
mehak/mcp-server
May 4, 2026
Merged

MCP Server Example on MCP SDK#534
MehakBindra merged 8 commits into
mainfrom
mehak/mcp-server

Conversation

@MehakBindra

@MehakBindra MehakBindra commented Apr 20, 2026

Copy link
Copy Markdown
Member

This pull request migrates and refactors the MCP (Model Context Protocol) Teams bot example from @examples/mcp to @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

  • The example is moved from @examples/mcp to @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

  • Implements a full-featured MCP server for Teams, supporting five tools: notify, ask, getReply, requestApproval, and getApproval. 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

  • Deletes the previous minimal MCP bot implementation and its associated files, including the old README.md, manifest.json, and TypeScript entry point, which are replaced with the new, more capable server.

Copilot AI review requested due to automatic review settings April 20, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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’s McpServer + Streamable HTTP transport.
  • Add in-memory state + Teams handlers to support notify, ask/getReply, and requestApproval/getApproval tools.
  • 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.2 requires Node >=22.7.5 (per the lockfile), but the repo’s root package.json declares engines.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.

Comment thread examples/mcp-server/src/index.ts Outdated
Comment thread examples/mcp-server/src/mcpTools.ts
Comment thread examples/mcp-server/src/index.ts Outdated
Comment thread examples/mcp-server/src/index.ts Outdated
Comment thread examples/mcp-server/src/app.ts Outdated
Comment thread examples/mcp-server/src/app.ts
Comment thread examples/mcp-server/src/index.ts Outdated

@corinagum corinagum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread examples/mcp-server/src/mcpTools.ts
Comment thread examples/mcp-server/src/index.ts Outdated

@rido-min rido-min left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still trying to get the sample running

Comment thread examples/mcp-server/src/state.ts
Comment thread examples/mcp-server/.gitignore
Comment thread examples/mcp-server/src/mcpTools.ts
Comment thread examples/mcp-server/package.json
Comment thread examples/mcp-server/package.json
Comment thread examples/mcp-server/package.json
Comment thread examples/mcp-server/package.json
Comment thread examples/mcp-server/README.md
Comment thread package-lock.json
Comment thread examples/mcp-server/package.json Outdated

@corinagum corinagum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the updates :)

@MehakBindra
MehakBindra merged commit 6b0da8a into main May 4, 2026
8 checks passed
@MehakBindra
MehakBindra deleted the mehak/mcp-server branch May 4, 2026 17:32
@heyitsaamir heyitsaamir mentioned this pull request May 6, 2026
heyitsaamir added a commit that referenced this pull request May 6, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants