Skip to content

Python: improved MCP connect and additional samples#12696

Merged
eavanvalkenburg merged 5 commits into
microsoft:mainfrom
eavanvalkenburg:mcp_auth
Jul 22, 2025
Merged

Python: improved MCP connect and additional samples#12696
eavanvalkenburg merged 5 commits into
microsoft:mainfrom
eavanvalkenburg:mcp_auth

Conversation

@eavanvalkenburg

@eavanvalkenburg eavanvalkenburg commented Jul 10, 2025

Copy link
Copy Markdown
Member

Motivation and Context

Adding a sample using StreamableHTTPServer towards Github.
Added a demo showing how to connect to a OAuth protected MCP server.
Also some improvements in the connect logic for MCP.

Description

Contribution Checklist

@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner July 10, 2025 12:02
@moonbox3 moonbox3 added python Pull requests for the Python Semantic Kernel documentation labels Jul 10, 2025
Comment thread python/samples/demos/mcp_with_oauth/agent/main.py
@eavanvalkenburg eavanvalkenburg changed the title Python: additional MCP samples Python: improved MCP connect and additional samples Jul 18, 2025
@moonbox3

moonbox3 commented Jul 18, 2025

Copy link
Copy Markdown
Collaborator

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
__init__.py40100% 
connectors
   mcp.py41920351%75, 87, 95–102, 108–109, 114, 126–133, 141–145, 147–148, 150, 157–159, 244–250, 285–287, 292–294, 308–309, 312–313, 321–323, 335–336, 340–341, 343, 345, 347–353, 357–359, 361–371, 375–376, 380–381, 385, 387, 391–392, 396, 410, 425–433, 439–440, 442–443, 446–447, 453–454, 469–470, 473–474, 477–482, 486–487, 490–491, 494–500, 574, 576, 643, 645, 647, 649, 718, 720, 722, 724, 726, 784, 827–832, 834–837, 842, 895, 897, 900, 913, 933–935, 942–947, 950–952, 955, 957, 961–962, 964, 967–968, 977–978, 980–982, 996–997, 999–1000, 1002–1004, 1007, 1014–1017, 1025, 1030–1035, 1040, 1042, 1045–1048
connectors/ai/hugging_face/services
   hf_text_completion.py60395%103, 112, 127
TOTAL26661457882% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3654 22 💤 0 ❌ 0 🔥 1m 57s ⏱️

Comment thread python/samples/concepts/mcp/agent_with_http_mcp_plugin.py Outdated
@TaoChenOSU

Copy link
Copy Markdown
Contributor

I think in general we still need to copyright header in demo application code.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jul 22, 2025
Merged via the queue into microsoft:main with commit c79f5a5 Jul 22, 2025
28 checks passed
@eavanvalkenburg eavanvalkenburg deleted the mcp_auth branch July 22, 2025 15:29
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Adding a sample using StreamableHTTPServer towards Github.
Added a demo showing how to connect to a OAuth protected MCP server.
Also some improvements in the connect logic for MCP.


### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants