Commit graph

367 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
William Easton
67a19afe89
Merge branch 'main' into responsecachingmiddleware 2025-10-14 16:59:53 -05: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
William Easton
6ea6351d57
PR Feedback 2025-10-13 09:47:13 -05: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
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
Adam Azzam
a8d2a667d6
Add supabase auth (#1997) 2025-10-08 20:27:55 -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
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
William Easton
a9ee0b577a
Merge branch 'main' into switch-kvstore 2025-09-29 17:12:09 -05:00
Jeremiah Lowin
e8673b4d8b
Fix Python 3.13 websockets deprecation warning (#1949) 2025-09-29 15:24:20 -04:00
Jeremiah Lowin
d7c60511b9
Refactor OAuth 2.1 error handling with TokenHandler subclass (#1948) 2025-09-29 15:00:57 -04:00
Tomas Caraccia
1c323a8583
feat: Follow OAuth 2.1 spec requirements on auth failures (#1923)
Co-authored-by: Tomas <>
2025-09-29 14:10:59 -04:00
William Easton
55ac070a59
Merge branch 'main' into switch-kvstore 2025-09-28 21:35:46 -05:00
William Easton
ccd12c4b1b
Refactor for key-value 0.2.0 2025-09-28 21:35:22 -05:00
Akshay Parihar
7bcf8b562c
Add Scalekit Provider for Enterprise Authentication (#1927)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ravi Madabhushi <ravi.madabhushi@scalekit.com>
Co-authored-by: Ravi Madabhushi <innovativeravi@gmail.com>
Co-authored-by: saif-at-scalekit <saif.shaik@scalekit.com>
2025-09-26 16:58:03 -04:00
Jeremiah Lowin
b96e6ebbb2
Use lowercase namespace for fastmcp logger (#1791) 2025-09-26 12:13:02 -04:00
William Easton
7ca6bd422f
Merge branch 'main' into switch-kvstore 2025-09-25 12:47:39 -05:00
Stephan Eberle
5486b5a3b9
Add AWS Cognito OAuth Provider for Enterprise Authentication (#1873)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-09-25 11:08:45 -04:00
Jeremiah Lowin
fccd081758
Clean up code for creating the resource url (#1916) 2025-09-25 10:42:57 -04:00
raphael-linx
eb0db4fb77
Fix: get_resource_url nested URL handling (#1914) 2025-09-25 10:35:37 -04:00
William Easton
dee2bb51d9
Switch to DiskStore KV implementation 2025-09-24 18:07:57 -05:00
Jeremiah Lowin
a41600d838
Fix: Remove JSON schema title metadata while preserving parameters named 'title' (#1872) 2025-09-23 10:19:34 -04:00
nate nowack
04831b75c2
optimize test suite (#1893)
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-22 20:07:04 -04:00