python-sdk
python-sdk copied to clipboard
The official Python SDK for Model Context Protocol servers and clients
## Motivation and Context This is draft PR for the changes discussed in specification discussion [#523](https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/523). ## How Has This Been Tested? Tested by setting up a webhook, client and...
**Is your feature request related to a problem? Please describe.** The problem I am facing is that I am currently creating an MCP server that through tools creates artifacts (python...
**Describe the bug** When using `streamablehttp_client` and `ClientSession` with an `AsyncExitStack` to manage their lifecycle outside of a standard `async with` block, I encounter several warnings and `RuntimeError` exceptions during...
## Motivation and Context ## How Has This Been Tested? ## Breaking Changes ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x]...
Align the stdio shutdown sequence with the [MCP spec](https://modelcontextprotocol.io/specification/2025-03-26/basic/lifecycle#stdio): close the server’s input, wait for exit, send SIGTERM if needed, and SIGKILL as a last resort. ## Motivation and Context...
## Motivation and Context ## How Has This Been Tested? ## Breaking Changes ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ]...
#552
This pull request adds a new test to verify the fix for a Windows-specific process creation issue described in issue #552. The test ensures that the process creation function works...
**Describe the bug** I have developed a local MCP server which performs retrieval to an ElasticSearch database using hybrid search. The MCP server works fine when adding it to Claude...
https://github.com/modelcontextprotocol/python-sdk/blob/532b1176f9a71f0a41508b977fd280074176096d/src/mcp/server/session.py#L230 thanks
Just pointing out the issue where it malformed the endpoint url. Can we send full endpoint instead of passing the route as some sse integration requires full endpoints. **_>> sse.py...