Commit graph python-sdk/src/mcp/server
Author SHA1 Message Date
Max
b3025f93b4
Run transport security tests in process instead of over sockets (#2764) 2026-06-02 20:30:17 +01:00
Max
8cc187fac0
Remove Tasks (SEP-1686) from the SDK (#2714) 2026-06-02 18:27:05 +02:00
Siddhiraj Katkar
453cafb9a9
fix: add 'invalid_target' to AuthorizationErrorCode (RFC 8707) (#2642)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-06-02 16:01:50 +00:00
Max
616476f692
Bind transport sessions to the authenticated principal (#2718) 2026-05-29 17:48:40 +01:00
Max
24725633f1
test: interaction-model end-to-end suite with a requirements manifest (#2691) 2026-05-28 18:48:30 +00:00
Max
3eb579948a
Add subject and claims to AccessToken (#2686) 2026-05-26 13:13:55 +00:00
Dayna Blackwell
bf3e0010b8
fix: chain exceptions in get_prompt and read_resource handlers (#2542) 2026-05-08 14:28:36 +01:00
Gyeongjun Paik (Kent)
3d7b311de0
fix: align Context logging methods with MCP spec data type (#2366)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-04-14 21:41:51 +00:00
Max
5cbd259c3b
fix: catch PydanticUserError when generating output schema (pydantic 2.13 compat) (#2434) 2026-04-13 17:03:40 +01:00
Matt LeMay
c5f12ec1e9
Add resources parameter to MCPServer (#2414)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-04-12 14:42:12 +02:00
Marcelo Trylesinski
cf4e435db0
Use shared is_async_callable instead of inspect.iscoroutinefunction (#2389) 2026-04-08 13:12:20 +01:00
Marcelo Trylesinski
37891f42a4
Add basic OpenTelemetry tracing for client and server requests (#2381) 2026-03-31 20:33:33 +00:00
Max Isbey
3ce0f76e6e
Don't block the event loop on sync resource and prompt functions (#2380) 2026-03-31 13:43:56 -04:00
Marcelo Trylesinski
e6235d1667
Propagate contextvars.Context through anyio streams without modifying SessionMessage (#2298) 2026-03-31 12:49:38 -04:00
Max Isbey
3517a29c82
feat(server): restore dependencies parameter on MCPServer (#2358) 2026-03-27 13:42:15 +00:00
Max Isbey
92c693bb73
fix: cancel in-flight handlers when transport closes in server.run() (#2306) 2026-03-20 13:37:32 +00:00
Max Isbey
67201a9bbd
test: fix WS test port race; narrow to single smoke test covering both transport ends (#2267) 2026-03-18 15:48:30 +00:00
Max Isbey
7826ade12b
test: convert test_integration.py to in-memory transport (fix flaky) (#2277) 2026-03-18 15:25:11 +00:00
Max Isbey
1a2244f402
fix: handle non-UTF-8 bytes in stdio server stdin (#2302) 2026-03-17 18:40:39 +00:00
Max Isbey
62eb08e5b2
fix: don't send log notification on transport error (#2257) 2026-03-09 17:47:27 +00:00
Shivam Aggarwal
51c53f2c18
fix: accept wildcard media types in Accept header per RFC 7231 (#2152)
Co-authored-by: Shivam <shivam@Shivams-MacBook-Air-2.local>
2026-03-09 16:30:02 +00:00
Ramesh Reddy Adutla
eaf971cf25
Add warning log when rejecting request with unknown/expired session ID (#2212)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-03-06 16:55:37 +00:00
Max Isbey
92f1b1500d
fix: remove MIME type validation from MCPServer Resource (#2235) 2026-03-06 14:50:58 +00:00
Varun6578
b3149d2f33
fix: clean up SSE session on client disconnect (#2200)
Co-authored-by: Varun Sharma <sharmava@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-03-04 14:45:11 +00:00
Max Isbey
cc22bf5464
refactor: remove request_ctx ContextVar, thread Context explicitly (#2203)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-03-04 13:23:02 +00:00
Jonathan Hefner
cb07adeca3
docs: add code fences to Example: docstring blocks (#2104) 2026-02-19 21:06:11 +01:00
Jonathan Hefner
c0328540c9
docs: fix docstrings across public API surface (#2095) 2026-02-19 06:45:59 +01:00
Max Isbey
0e96aecd1d
fix: use exact match for loopback hosts in issuer URL validation (#2089) 2026-02-18 19:40:52 +00:00
Akshan Krithick
fc57c2c4c5
test: fix progress notification assertions for related_request_id (#2038)
Co-authored-by: Lee Hubbard <hubbard.zlee@unknowncyber.com>
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-02-18 11:53:03 +00:00
Felix Weinberger
92140e5086
Add idle session timeout to StreamableHTTPSessionManager (#2022) 2026-02-18 10:47:02 +00:00
Max Isbey
705497a593
fix: allow null id in JSONRPCError per JSON-RPC 2.0 spec (#2056) 2026-02-17 10:30:34 +00:00
Max Isbey
0a22a9dc33
refactor: replace lowlevel Server decorators with on_* constructor kwargs (#1985) 2026-02-12 15:55:54 +00:00
Aaron Abbott
f049c8e5c6
Fix leaked anyio streams in streamable_http (#1991)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-02-11 14:52:07 +00:00
Marcelo Trylesinski
1a8c14a5b8
refactor: replace mcp.types as types to from mcp import types (#1986) 2026-02-03 16:42:29 +00:00
Marcelo Trylesinski
4fc49c62bd feat: add ClientRequestContext type alias for client-side handlers (#1989) 2026-02-03 17:37:38 +01:00
Marcelo Trylesinski
b1f7eec3cd
refactor: split RequestContext between server and client (#1987) 2026-02-03 14:35:07 +01:00
Max Isbey
050aeb6456
Remove unnecessary MCPServer alias (#1984) 2026-02-03 08:59:58 +00:00
Marcelo Trylesinski
14744c66c5
Add tests for MCPServer.read_resource exception handling (#1957) 2026-01-27 13:49:06 +01:00
Marcelo Trylesinski
6f0e8e7851
refactor: code style improvements and formatting cleanup (#1962)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 13:48:52 +01:00
Marcelo Trylesinski
acba5478a9
refactor: McpError renamed to MCPError and flatten parameters (#1956)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-01-26 14:37:44 +01:00
Marcelo Trylesinski
65c614e48e
Rename FastMCP to MCPServer (#1951) 2026-01-25 14:45:52 +01:00
Max Isbey
a7ddfdae07
ci: add strict-no-cover to detect unnecessary coverage pragmas (#1897) 2026-01-23 21:00:20 +01:00
Marcelo Trylesinski
f0ab53e194
Add meta to Client methods (#1923) 2026-01-22 14:50:39 +01:00
Marcelo Trylesinski
7b728a243e
refactor: drop unused logger/logging (#1926) 2026-01-22 11:56:41 +01:00
Marcelo Trylesinski
656f887aff
fix: replace http code by jsonrpc (#1920) 2026-01-21 18:37:55 +01:00
Marcelo Trylesinski
3bcdc1763f
refactor: create the types subpackage, and the jsonrpc module (#1918) 2026-01-21 16:49:07 +01:00
Marcelo Trylesinski
ae7793efd6
refactor: avoid double JSON parsing (#1917) 2026-01-21 13:07:05 +01:00
Marcelo Trylesinski
6d463bb353
refactor: replace AnyFunction by proper types (#1916) 2026-01-21 13:06:46 +01:00
Marcelo Trylesinski
3dc8b72041
refactor: replace pydantic_core.from_json by json.loads (#1912) 2026-01-19 20:04:28 +01:00
Max Isbey
34e66a3812
refactor: move streamable HTTP app creation from FastMCP to lowlevel Server (#1899) 2026-01-19 18:48:04 +01:00