Commit graph

775 commits

Author SHA1 Message Date
Jeremiah Lowin
1ac166bd49
Restore proxy request context for resources, templates, and prompts
The request-context stash that lets proxy forwarding handlers relay
server-initiated requests (list_roots/sampling/elicitation) back to the
proxy's own client was only applied on the ProxyTool path. Proxied
resources, templates, and prompts whose backend called a server-initiated
feature would deadlock until timeout. Extract the stash into a shared
helper used by all four proxy paths.
2026-07-06 11:44:17 -04:00
Jeremiah Lowin
3acb239a7a
Merge remote-tracking branch 'origin/main' into sdkv2
# Conflicts:
#	fastmcp_slim/fastmcp/server/providers/proxy.py
#	tests/test_apps_prefab.py
2026-07-06 00:56:15 -04:00
Jeremiah Lowin
ea9a1c6382
Fix ty diagnostics in tests for SDK v2 migration 2026-07-06 00:48:03 -04:00
Jeremiah Lowin
4985788f57
Fix content-type helpers and connection-survival scoping in era matrix 2026-07-06 00:14:58 -04:00
Jeremiah Lowin
d14a4c37bc
Add dual-era protocol test matrix 2026-07-06 00:10:35 -04:00
Jeremiah Lowin
3ccf9c926b
Align auth integration tests with v2 SDK error codes (invalid_client, grant_types) 2026-07-05 23:57:19 -04:00
Jeremiah Lowin
0fb6464ce2
Fix v2 content shapes: str uri for BlobResourceContents, tolerant request_id assertion 2026-07-05 23:52:22 -04:00
Jeremiah Lowin
8c9b1b6131
Reorder imports in auth provider tests (ruff) 2026-07-05 23:37:12 -04:00
Jeremiah Lowin
ec9f00bb0c
Assert MCPError for v2 401 surface in auth provider unauthorized tests 2026-07-05 23:36:39 -04:00
Jeremiah Lowin
72c636dd4c
Spawn ping keepalive per Connection via asyncio task (SDK v2 has no per-connection task group) 2026-07-05 23:33:11 -04:00
Jeremiah Lowin
3f8e45b84b
Update v2 test idioms: MCPError 401 surface, unwrapped notifications, strict Annotations, request-id-agnostic, caching/storage snapshots 2026-07-05 23:23:48 -04:00
Jeremiah Lowin
b0adc8eb9c
Update middleware logging snapshots and rate-limit tests for SDK v2 (param shapes, MCPError surface) 2026-07-05 23:03:47 -04:00
Jeremiah Lowin
01a05f29ff
Update proxy_server tests to client API and v2 error-message shapes 2026-07-05 22:53:47 -04:00
Jeremiah Lowin
e56bec7a0a
Re-key stateful proxy cache by Connection, not per-request ServerSession (SDK v2) 2026-07-05 22:51:28 -04:00
Jeremiah Lowin
93e35cbe2f
Fix AnyUrl content-type test idioms; xfail wire-unexpressible prompt/resource tasks and background sampling (sdk-feedback #3/#9) 2026-07-05 22:46:11 -04:00
Jeremiah Lowin
f12ecc7e24
Deliver task status notifications: persist subscription task, nest params _meta (SDK v2) 2026-07-05 22:36:54 -04:00
Jeremiah Lowin
3fc6848cea
Drive AuthMiddleware list tests through in-memory client (SDK v2 dispatch chain) 2026-07-05 22:21:32 -04:00
Jeremiah Lowin
0b7bcdcf85
Preserve tasks/result payload via permissive result type; fix AnyUrl test import 2026-07-05 22:06:50 -04:00
Jeremiah Lowin
5a77eab277
Adapt proxy meta-forwarding and tests to SDK v2 request-context shim 2026-07-05 20:34:26 -04:00
Jeremiah Lowin
1a9b1c435f
Port HTTP session manager, event store, and transport run paths to SDK v2 2026-07-05 19:15:03 -04:00
Jeremiah Lowin
691766b5d0
[codex] Fix OpenAPI resource template requests (#4407) 2026-07-05 19:11:03 -04:00
Jeremiah Lowin
250900350a
Port server-core handlers to MCP SDK v2 (Phase B) 2026-07-05 19:09:57 -04:00
Jeremiah Lowin
42e72d71e9
Add sdkv2 import shims pending server/client port 2026-07-05 18:26:15 -04:00
Jeremiah Lowin
2ea012ead4
Adopt snake_case SDK type constructor kwargs 2026-07-05 18:11:04 -04:00
Jeremiah Lowin
ed85d477f5
Adopt snake_case SDK type attribute access 2026-07-05 18:09:03 -04:00
Jeremiah Lowin
fdac9f9f2e
Rename McpError to MCPError and convert construction sites 2026-07-05 18:07:02 -04:00
Jeremiah Lowin
2f49f9f7c0
Migrate mcp.types imports to mcp_types 2026-07-05 18:03:43 -04:00
Jeremiah Lowin
c1b0396c0a
Block IPv6 transition SSRF bypasses (#4426) 2026-07-05 17:52:57 -04:00
Jeremiah Lowin
67527c1f69
Block unsafe OAuth redirect schemes (#4419) 2026-07-05 17:16:10 -04:00
Jeremiah Lowin
57a279928d
Protect streamable HTTP from DNS rebinding (#4405) 2026-07-05 17:11:08 -04:00
Jeremiah Lowin
cccb529f50
Fix DCR redirect URI validation (#4408) 2026-07-05 17:05:13 -04:00
Jeremiah Lowin
de521e651d
Fix versioned auth middleware checks (#4401) 2026-06-28 10:43:34 -04:00
Jeremiah Lowin
feaae683a4
[codex] Fix event store replay isolation (#4402) 2026-06-27 12:49:24 -04:00
Jeremiah Lowin
5de15e0c21
Block NAT64 SSRF bypass (#4400) 2026-06-27 12:21:37 -04:00
Jeremiah Lowin
a8bb1b08c2
Raise fastmcp.ValidationError for invalid tool arguments (#4392)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-06-27 11:14:20 -04:00
Jacky Su
0668eb7b80
Fix/cimd flow issue (#4206) 2026-06-27 10:57:58 -04:00
Jeremiah Lowin
0cffe41115
fix: validate task tool arguments against declared types (#4373) 2026-06-27 10:03:59 -04:00
Jeremiah Lowin
a612846224
fix: bound default OIDC discovery timeout and expose it on provider wrappers (#4374) 2026-06-24 17:16:18 -04:00
Jeremiah Lowin
ade2b3ff46
fix: bracket IPv6 hosts in server startup log URL (#4372) 2026-06-24 17:15:40 -04:00
Bobby Davidson
7f2d034f4d
Forward IdP auth errors to MCP client instead of showing HTML error page (#4293)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-06-24 12:09:09 -04:00
Tomasz Czochański
4ce8e2a5d0
Fix: async rate limiting middleware get_client_id callbacks (#4319)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-24 10:27:30 -04:00
Jeremiah Lowin
3b8538e242
Allow private JWT headers (#4290) 2026-06-06 02:23:48 +01:00
Jeremiah Lowin
e58f386bac
Log refresh-token misses in OAuthProxy instead of failing silently (#4276) 2026-06-03 11:22:35 -04:00
René Mulder
0f4f78c464
Fix resource templates with query params on proxied servers (#4251)
Co-authored-by: René Mulder <rene@silverflow.com>
2026-05-31 14:03:49 -04:00
Jeremiah Lowin
58e0f5320b
Decouple FastMCP access token lifetime from upstream expires_in (#4254) 2026-05-30 11:48:23 -04:00
Jeremiah Lowin
53b20168c8
Close upstream OAuth clients (#4248) 2026-05-27 19:45:45 -04:00
Jeremiah Lowin
140d96aadd
Forward proxy initialize as bridge behavior (#4228) 2026-05-27 10:41:49 -04:00
Bill Easton
802ceaaa6b
Add targeted coverage tests (#4230)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-05-25 18:57:28 -04:00
Jeremiah Lowin
2bff3725bf
Surface proxy upstream failures (#4227) 2026-05-23 14:56:10 -04:00
Jeremiah Lowin
59223f6e89
Allow pre-bound HTTP sockets (#4222) 2026-05-23 10:08:49 -04:00