Skip to content

AI/MCPClient#572

Merged
MehakBindra merged 6 commits into
mainfrom
mehak/ai-sample
May 18, 2026
Merged

AI/MCPClient#572
MehakBindra merged 6 commits into
mainfrom
mehak/ai-sample

Conversation

@MehakBindra
Copy link
Copy Markdown
Contributor

@MehakBindra MehakBindra commented May 13, 2026

This pull request introduces a new sample bot, ai-mcp, which demonstrates integrating Azure OpenAI with the Model Context Protocol (MCP) in Microsoft Teams. The changes include a new codebase, updated documentation, and configuration to highlight streaming responses, per-conversation memory, clarification cards, MCP tool integration, inline citations, follow-up suggestions, and custom feedback. The sample replaces the previous ai example with a more advanced, MCP-enabled version.

Breaking Change:
PY and TS previously diverged in the way they added attachments, entities, etc to their final message activity in streaming. PY uses the final activity to build these (discarding any previous ones), introduced in this specific commit -microsoft/teams.py@7d5b445#diff-cfe4ab75f0e2e0cb406509120bf35f7f58362130916d7f08d85ac7d88de29b62. TS was previously accumulating it across all streaming activities but behavior now changes to reflect PY.

Key changes:

New ai-mcp Sample Implementation

  • Added a new sample bot in examples/ai-mcp that integrates Azure OpenAI and MCP, showcasing advanced Teams bot features such as streaming, tool-calling, inline citations, and feedback. The sample includes core files: agent.ts (agent logic and tool loop), citation-collector.ts (citation extraction and attachment), handlers.ts (Teams activity routing), and a detailed README.md explaining architecture and usage. [1] [2] [3] [4]

Project and Manifest Updates

  • Renamed the package and manifest from ai to ai-mcp, updated bot name and descriptions in package.json and appPackage/manifest.json to reflect the new MCP-enabled sample.

Dependency Changes

  • Removed legacy dependencies related to the old sample and added new dependencies: @modelcontextprotocol/sdk and openai, which are required for MCP and Azure OpenAI integration.

These changes collectively deliver a more feature-rich Teams bot sample that demonstrates modern AI and MCP integration patterns.

Copilot AI review requested due to automatic review settings May 13, 2026 21:04
@MehakBindra MehakBindra marked this pull request as draft May 13, 2026 21:04
@MehakBindra MehakBindra changed the title init AI/MCPClient May 13, 2026
MehakBindra and others added 3 commits May 13, 2026 14:24
Co-authored-by: Copilot <copilot@github.com>
@MehakBindra MehakBindra marked this pull request as ready for review May 14, 2026 00:52
Copy link
Copy Markdown
Collaborator

@corinagum corinagum left a comment

Choose a reason for hiding this comment

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

Sample looks great! Please add unit tests before merging.

I wasn't able to test it out myself but if you do a demo, I'd love to see it.

Comment thread packages/apps/src/http/http-stream.ts
Comment thread packages/apps/src/http/http-stream.ts
Comment thread examples/ai-mcp/src/agent.ts
@MehakBindra MehakBindra merged commit 91c010a into main May 18, 2026
8 checks passed
@MehakBindra MehakBindra deleted the mehak/ai-sample branch May 18, 2026 17:14
@Benjiiim
Copy link
Copy Markdown

Thanks for this new sample @MehakBindra!
May I ask why you chose to use Chat Completions API instead of the newer Responses API?

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.

3 participants