Commit graph

3,435 commits

Author SHA1 Message Date
Jeremiah Lowin
5dc7baa5a8
Add plugin auth hook and install-time contributions (#4022) 2026-05-04 12:09:33 -04:00
Jeremiah Lowin
18ddf28b79
Convert skills providers to the Skills plugin (#4017) 2026-04-22 15:43:53 -04:00
Jeremiah Lowin
a82979e433
Convert OpenAPI provider to the OpenAPI plugin (#4015) 2026-04-22 13:56:56 -04:00
Jeremiah Lowin
03f4a90e60
Convert prompts-as-tools and resources-as-tools to plugins (#4012) 2026-04-22 10:29:16 -04:00
Jeremiah Lowin
19fa2fc33e
Convert code-mode to the CodeMode plugin (#4002) 2026-04-22 09:46:29 -04:00
Jeremiah Lowin
3c0d248526
Convert search transforms to the Search plugin (#3989) 2026-04-20 19:44:41 -04:00
Jeremiah Lowin
34cb2218dc
Make PluginMeta.version optional; bundled plugins default to None (#3991) 2026-04-20 14:40:25 -04:00
Jeremiah Lowin
67f226d453
Enforce JSON-serializable contract on Plugin Config (#3986) 2026-04-20 13:00:00 -04:00
Jeremiah Lowin
cc290b3a2e
Make Plugin generic over its Config model (#3983) 2026-04-20 10:39:58 -04:00
Jeremiah Lowin
ff0ae10d88
Add Plugin.capabilities() hook and auto-derive Plugin.meta (#3982) 2026-04-19 11:41:47 -04:00
Jeremiah Lowin
e2e49f77d2
Add PluginMeta.from_package() helper (#3974) 2026-04-19 08:56:42 -04:00
Jeremiah Lowin
769e998017
Reject plugin registration after the setup pass completes (#3973) 2026-04-18 20:22:27 -04:00
Jeremiah Lowin
54e83367a3
Replace plugin setup/teardown with run(server) async context manager (#3972) 2026-04-18 19:23:14 -04:00
Jeremiah Lowin
823ea4c5fc
Add new FastMCP Plugin support (#3970) 2026-04-18 19:10:03 -04:00
Jeremiah Lowin
801385df44
fix: bound _refresh_locks with LRU eviction to prevent memory leak (#3968) 2026-04-18 11:07:38 -04:00
Jeremiah Lowin
64fbc52e1d
fix: skip stdio subprocess test on Windows CI (#3966)
Co-authored-by: Marvin Context Protocol <41898282+Marvin Context Protocol@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
2026-04-18 10:30:03 -04:00
dependabot[bot]
c759890d9e
chore(deps-dev): bump pydantic-monty from 0.0.11 to 0.0.12 (#3940)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-04-17 21:06:00 -04:00
marvin-context-protocol[bot]
b4c4cfd3d5
chore: Update SDK documentation (#3917)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-04-17 18:29:09 -04:00
Jeremiah Lowin
37a46231fd
Bump deps with open dependabot alerts (#3965) 2026-04-17 18:04:22 -04:00
Jeremiah Lowin
97bff96ef1
Revert "Forward backend capabilities in ProxyProvider (#3956)" (#3964)
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 17:51:27 -04:00
Jeremiah Lowin
1e67c53a17
Reject dot-segments in redirect URI allowlist matching (#3963) 2026-04-17 17:49:25 -04:00
Gnani Rahul
ff8aa484ff
docs: standardize ToolAnnotations examples (#3952) 2026-04-17 16:42:57 -04:00
Jeremiah Lowin
e1ea695d68
Restructure docs navigation (#3951)
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
Co-authored-by: Marvin Context Protocol <41898282+Marvin Context Protocol@users.noreply.github.com>
2026-04-17 16:42:39 -04:00
Jeremiah Lowin
789a298650
Graceful fallback for unsupported regex patterns in json_schema_to_type (#3959)
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 16:42:10 -04:00
Jeremiah Lowin
7fb037f20c
Harden OAuth Proxy silent consent against AS-in-the-middle (#3960) 2026-04-17 16:39:50 -04:00
Jeremiah Lowin
eb1426251c
Allow upstream client_id to be used directly without DCR (#3957)
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 15:22:44 -04:00
Jeremiah Lowin
98f69bdba0
Forward backend capabilities in ProxyProvider (#3956)
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 15:22:08 -04:00
Jeremiah Lowin
e3f845f558
Improve real-world schema crash test: failure dump, cluster analysis, TypeErrors baseline ratchet (#3958)
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 15:08:48 -04:00
Chris Guidry
34313ea112
Restore task snapshot via a worker-level dependency (#3945)
* Restore task snapshot via a worker-level dependency

`get_access_token()` returned `None` inside background tasks whenever
`FASTMCP_DOCKET_URL` pointed at a `redis+cluster://` URL. The write side
was fine — it went through `docket.redis()`, which is cluster-aware —
but fastmcp kept a parallel sync Redis client just to read the snapshot
back, and `Redis.from_url()` rejects the cluster scheme.

Docket 0.19.1 ships worker-level dependencies that resolve per task in
the same asyncio.Task as user code, so ContextVars propagate cleanly.
That lets us load the snapshot once via `restore_task_snapshot` and
drop the sync Redis path entirely. Sync helpers like
`get_access_token()` and `get_http_request()` now just read a
ContextVar; Docket is the sole Redis consumer.

Closes #3897

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert TaskKey stub to a plain return

NotImplementedError would fire at module import if anything evaluated
the default; a no-op stub keeps the module usable without the
fastmcp[tasks] extra, which is what we want.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:24:42 -04:00
Jeremiah Lowin
ac1416bd2e
fix tests that relied on task=True returning error results (#3954) 2026-04-17 07:48:46 -04:00
Bill Easton
39b421a464
OTEL: Instrument all MCP list operations and enrich delegate spans (#3890)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 18:45:50 -04:00
Bill Easton
5593cf3e11
fix: FileSystemProvider reload race condition (#3938)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 18:45:11 -04:00
Gnani Rahul
012f674ee4
Fix raise_on_error handling for tool tasks (#3946) 2026-04-16 18:37:52 -04:00
Bill Easton
7dd573980a
fix: OpenAPI request director sends multipart and form-urlencoded as JSON (#3932)
* fix: OpenAPI request director content-type dispatch and cookie params

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Stringify multipart form values and cookie params for httpx

httpx rejects non-string scalars in files= and cookies=.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add tests for non-string multipart values and cookie stringification

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Consolidate to single httpx.Request construction point

Eliminate early returns by using variables for files/data kwargs.
All httpx body kwargs accept None, so we set exactly one and
pass all to a single Request() call.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Use _query_scalar_to_str for multipart booleans, add tuple passthrough test

Reuse existing boolean serialization (true/false not True/False) for
multipart form fields. Add test for file-like tuple passthrough.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Normalize media type for dispatch, use OpenAPI serialization for cookies

- Strip content-type parameters (e.g. "; charset=utf-8") and lowercase
  before matching, so variants like "Multipart/Form-Data" match correctly
- Use _query_scalar_to_str for cookie values (true/false not True/False)
- Add boolean cookie test

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Preserve media-type parameters in Content-Type header

Use raw_content_type (with charset etc.) for the outgoing header,
normalized form only for dispatch matching.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Pass bytes/file-like values directly in multipart, add charset preservation test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:28:55 -04:00
Bill Easton
970b92bb16
fix: allow hyphens in resource template parameter names (#3929)
* fix: allow hyphens in resource template parameter names

Normalize hyphens to underscores at the regex group level in build_regex()
and at the param extraction level in from_function(). No API changes —
build_regex still returns Pattern | None, match_uri_template still returns
the same dict shape.

Closes #3921

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Guard against query params clobbering path params

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add tests for wildcard hyphens, expand, and query clobber guard

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ruff format fix

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add collision detection for hyphen/underscore param name normalization

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:28:51 -04:00
Bill Easton
7184a4ca21
OTEL: Fix attribute compliance with MCP semantic conventions (#3889)
* OTEL: Fix attribute compliance and improve telemetry helpers

Attribute compliance:
- Remove rpc.system/service/method (MCP is not traditional RPC)
- Add gen_ai.tool.name on tools/call spans
- Add gen_ai.prompt.name on prompts/get spans
- Fix session_id check (truthy -> is not None)

Telemetry helper improvements:
- Add is_recording() guards to skip work on non-recording spans
- Add error.type attribute with __qualname__ on error spans
- Use isinstance check for ToolError to set "tool_error" error type
- Include exception message in span status description
- Add tool_name/prompt_name params to server_span and client_span

Client call_tool enrichment:
- Reflect tool-level errors (result.isError) on client span status
  so callers see ERROR even though the MCP protocol call succeeded

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove resource URI from span names to avoid high-cardinality

Per MCP semantic conventions, resource URIs SHOULD NOT be included in
span names by default since they can be unbounded (especially with
templates like users://{id}/profile). The URI remains available via
the mcp.resource.uri attribute.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add missing gen_ai/mcp attributes to proxy and delegate spans

- Proxy tool spans: add gen_ai.tool.name
- Proxy prompt spans: add gen_ai.prompt.name
- All delegate spans: add mcp.method.name
- Docs: remove rpc.* references, update span names and attributes table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Hoist ToolError imports to module level, add rpc.* migration note

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 16:28:47 -04:00
Jeremiah Lowin
e4bb6666ab
Add default prefill to FormInput.collect_input (#3937) 2026-04-14 13:23:36 -04:00
Jeremiah Lowin
8c020adfc6
fix: narrow OpenAI audio format dict to Literal for ty (#3936) 2026-04-14 13:09:54 -04:00
Bill Easton
8d1b28958f
fix: prevent schema mutation in _prune_param and _convert_nullable_field (#3927)
🤖 Generated with Claude Code

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:10:27 -04:00
Bill Easton
4ea102b433
fix: ProxyTool crashes on non-TextContent error responses (#3926)
* fix: handle non-TextContent error responses in ProxyTool

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Avoid serializing binary content into ToolError messages

Use type name instead of str(content) to prevent dumping
large base64 payloads into error messages.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ruff format fix

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:10:23 -04:00
Bill Easton
757678bc7e
fix: reject self-mount to prevent infinite recursion (#3925)
* fix: server safety guards for self-mount, duplicate middleware, mount arg order

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Remove duplicate middleware and mount arg order checks

These are runtime type checking, not bugs — a type checker catches them.
Keep only the self-mount guard which is a semantic check.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:10:19 -04:00
Bill Easton
55f3cade10
Improve Claude workflow prompts based on output audit (#3934)
* Improve Claude workflow prompts based on 60-day output audit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Encourage tl;dr-first structure and collapsible details across workflows

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add quality gates, evidence standards, and calibration examples to workflows

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 11:06:12 -05:00
Jeremiah Lowin
7d7607473d
Stop pydantic 2.13 from leaking _WrappedResult docstring into tool output schemas (#3918) v3.2.4 2026-04-13 21:38:13 -04:00
Jeremiah Lowin
b732a4a516
Overhaul apps docs (#3915) 2026-04-13 21:24:00 -04:00
marvin-context-protocol[bot]
5c2ff1bd7b
chore: Update SDK documentation (#3914)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-04-13 21:23:43 -04:00
Jeremiah Lowin
f4f2ec07fb
Deprecate ctx.elicit() without response_type (#3916) 2026-04-13 21:23:31 -04:00
dependabot[bot]
338b80c3ae
chore(deps): bump the uv group across 2 directories with 1 update (#3913)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 20:12:30 -04:00
Jeremiah Lowin
110cd3adcb
Add response_title and response_description to ctx.elicit() (#3912) 2026-04-13 20:12:09 -04:00
marvin-context-protocol[bot]
3117846176
chore: Update SDK documentation (#3909)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-04-13 20:08:29 -04:00
Bill Easton
031c7e03b4
Fix RetryMiddleware not retrying tool errors (#3858)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-04-13 20:08:04 -04:00