Commit graph

802 commits

Author SHA1 Message Date
Jeremiah Lowin
254ff1a25d
Make CORS opt-in via middleware parameter (#2150) 2025-10-20 15:33:13 -04:00
Jeremiah Lowin
3321644ad3
Replace subprocess tests with in-process async servers (#2006)
* Use anyio as testing backend

* Remove asyncio markers

* Update streamable http tests

* Replace all subprocess tests

* Replace anyio task groups with asyncio context managers in tests

- Convert run_server_async from anyio task group pattern to asyncio.create_task with async context manager
- Remove task_group fixture from conftest
- Update all test fixtures to use async with run_server_async pattern
- Remove TaskGroup imports from all test files
- Tests now work with pytest-asyncio instead of pytest-anyio

* Update test_github_provider_integration.py
2025-10-19 10:47:54 -04:00
Jeremiah Lowin
9e78d755c2
Support custom server name, icons, and link in OAuth Proxy consent page (#2135)
* Implement icon support in fastmcp

* Fix icon feature tests

- Update snapshot for ResourceTemplate to include icons field
- Remove OAuth mounting tests (belong to PR #2119, not this feature)

* Update docs

* Customize consent screen

* Use server website link if available

* Anchor link shouldnt have trailing slash

* Remove 'a FastMCP server named' from consent page message

* Update docs
2025-10-18 11:49:26 -04:00
Omer Aharonian
5ce67f756b
transform NotFoundError to standard MCP error (#2133) 2025-10-18 11:46:57 -04:00
Jeremiah Lowin
6f627b58fd
Implement icon support (#2121)
* Implement icon support in fastmcp

* Fix icon feature tests

- Update snapshot for ResourceTemplate to include icons field
- Remove OAuth mounting tests (belong to PR #2119, not this feature)

* Update docs
2025-10-17 17:28:08 -04:00
Jeremiah Lowin
330eaed11f
OAuth proxy issues its own tokens (#2109)
* OAuth proxy issues its own tokens

Implement token factory pattern where proxy issues FastMCP JWTs
instead of forwarding upstream tokens. Tokens are minimal references
(JTI) that map to encrypted upstream credentials stored server-side.

* Update run-tests.yml

* Update secret generation and docs

* Add upgrade guide
2025-10-17 14:31:53 -04:00
Jeremiah Lowin
d472e30765
Support mounting OAuth-protected servers under path prefixes (#2119)
* Add issuer_url parameter to OAuth providers for mounting scenarios

* Add get_well_known_routes

* Update docs

* Improve docs and tests

* Trigger CI

* Fix conditional test execution for Windows
2025-10-17 11:44:49 -04:00
Jeremiah Lowin
4a9f02c87c
Upgrade to MCP 1.17+ with RFC 9728 compliance (#2122)
* Upgrade to MCP 1.17+ with RFC 9728 compliance

Updates FastMCP to require MCP 1.17+ and implements RFC 9728-compliant
OAuth protected resource metadata URL handling.

The key change is that .well-known/oauth-protected-resource endpoints
are now registered at path-aware locations. For example, if an MCP
server is mounted at /mcp, the metadata endpoint is now at
/.well-known/oauth-protected-resource/mcp instead of
/.well-known/oauth-protected-resource.

This ensures proper OAuth discovery for path-based resource servers
and aligns with the MCP SDK's implementation of RFC 9728 §3.1.

Changes include:
- Update minimum MCP version from 1.12.4 to 1.17.0
- Use build_resource_metadata_url() for RFC 9728 compliance
- Configure CI to test with latest package versions (--upgrade)
- Update tests for path-aware metadata URLs
- Add icons field to Tool model (introduced in MCP 1.17)

* Fix RemoteAuthProvider integration tests for RFC 9728

* Fix parameterized test for nested base URL paths
2025-10-17 09:29:23 -04:00
William Easton
b713b5e4d0
Merge branch 'main' into responsecachingmiddleware 2025-10-16 21:59:20 -05:00
William Easton
5831c4bb60
PR Clean-up 2025-10-16 21:56:55 -05:00
Jeremiah Lowin
52e9af1214
Add RFC 7662 token introspection provider (#2074) 2025-10-16 10:57:06 -04:00
Jeremiah Lowin
5988873601
Fix log handler to accept any JSON-serializable data type (#2102) 2025-10-15 10:20:04 -07:00
Jeremiah Lowin
b45499292f
Fix nullable enum validation in OpenAPI converter (#2093) 2025-10-15 06:30:30 -07:00
Jeremiah Lowin
59aabe2741
Fix experimental parser missing top-level response schemas (#2087) (#2092) 2025-10-14 15:31:30 -07:00
William Easton
67a19afe89
Merge branch 'main' into responsecachingmiddleware 2025-10-14 16:59:53 -05:00
Jeremiah Lowin
5f8461b7f0
Remove shell=True from Windows subprocess calls (#2091) 2025-10-14 12:30:46 -07:00
Jeremiah Lowin
2a20f54617
Escape all HTML to prevent XSS attack (#2090) 2025-10-14 12:30:21 -07:00
William Easton
5d195878c4
Switch Lifespan to being a Server Lifespan (#2013)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-10-14 11:49:53 -07:00
Jeremiah Lowin
e036cba383
Add Pydantic-compatible input validation (#2073) 2025-10-14 11:49:30 -07:00
William Easton
1ec2bd7d92
Also push client messages (info/warn/debug) to server debug log (#2063)
Co-authored-by: William Easton <strawgate@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-10-14 11:38:26 -07:00
Chris Guidry
7f4119dcf6
Fix asyncio error when running FastMCP 1.x servers (#2084)
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-14 11:24:51 -07:00
William Easton
6ea6351d57
PR Feedback 2025-10-13 09:47:13 -05:00
William Easton
b0db7803d6
Merge branch 'main' into ankesh/mixin-add-meta 2025-10-12 10:47:38 -04:00
Marcin Jan Puhacz
05a73e16f1
feat: expose errlog on stdio transport (#1991)
Co-authored-by: William Easton <williamseaston@gmail.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-10-11 18:33:06 -04:00
Jeremiah Lowin
82dc3bdff9
Merge branch 'main' into responsecachingmiddleware 2025-10-11 18:32:32 -04:00
Jeremiah Lowin
1f11b5e641
Refactor mounting logic from managers to server (#2069) 2025-10-11 18:28:21 -04:00
Jeremiah Lowin
7b7e277d5d
Prevent confused deputy attacks in OAuth proxy (#2056) 2025-10-11 10:53:54 -04:00
William Easton
57cb83a145
Update response caching PR 2025-10-10 19:35:38 -04:00
William Easton
28370827dc
Merge branch 'main' into responsecachingmiddleware 2025-10-10 17:37:34 -04:00
Ankesh
26e2414b48 feat: Add title, annotations and meta to mixin decorators 2025-10-10 14:23:02 +05:30
William Easton
93c41e815c
Merge branch 'main' into switch-kvstore 2025-10-09 09:20:55 -04:00
William Easton
de0c39c1b3
Add raise on validation error and set uniform collection names 2025-10-08 23:40:58 -04:00
Jeremiah Lowin
20c6749de9
Allow direct instantiation of Prompt and Resource classes (#2031) 2025-10-08 21:06:41 -04:00
Adam Azzam
a8d2a667d6
Add supabase auth (#1997) 2025-10-08 20:27:55 -04:00
Jeremiah Lowin
b1458c6082
Default to FastMCP version when server version not specified (#2022)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: William Easton <strawgate@users.noreply.github.com>
2025-10-08 19:57:30 -04:00
William Easton
00ffa6006a
Merge branch 'main' into switch-kvstore 2025-10-08 18:07:05 -04:00
Anders Julton
82cf3888dd
Azure (Entra) OAuth: Validate token against FastMCP app, not Graph. (#1891)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-10-08 09:06:35 -04:00
William Easton
efc35964e3
Updates to Logging Middleware (#1974)
Co-authored-by: William Easton <strawgate@users.noreply.github.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2025-10-08 08:52:28 -04:00
William Easton
1a9f95299a
lint cuz i dont have precommit 2025-10-07 17:40:52 -04:00
William Easton
2f59ad9380
Merge branch 'main' into switch-kvstore 2025-10-06 11:58:37 -05:00
William Easton
dd81a0beb3
Removing central storage configuration for now 2025-10-06 11:58:11 -05:00
Jeremiah Lowin
ba1ba86a64
Support initialize requests in middleware (#1546) 2025-10-05 10:20:13 -04:00
William Easton
598dfb9a9a
Merge branch 'main' into switch-kvstore 2025-10-05 09:15:26 -05:00
Jeremiah Lowin
91af3cd2ae
Internal refactor of MCP handlers (#2005) 2025-10-05 08:45:10 -04:00
William Easton
70364f555d
lint 2025-10-03 21:27:31 -05:00
William Easton
4b85b0c3ff
Mark github tests as flaky 2025-10-03 21:25:35 -05:00
William Easton
a99f1334a6
Merge branch 'main' into fix-fastmcp-type-list-to-text-content 2025-10-03 15:02:44 -05:00
William Easton
664b67d26f
Fix exclusion of content helpers if they are in a list 2025-10-03 15:02:26 -05:00
William Easton
5480cb5ba6
Merge branch 'main' into switch-kvstore 2025-10-02 09:11:03 -05:00
Jeremiah Lowin
35a8c32f61
Add RFC 6570 query parameter support to resource templates (#1971) 2025-09-30 16:28:09 -04:00