Commit graph

26 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
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
Jeremiah Lowin
91af3cd2ae
Internal refactor of MCP handlers (#2005) 2025-10-05 08:45:10 -04:00
nate nowack
04831b75c2
optimize test suite (#1893)
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-22 20:07:04 -04:00
Jeremiah Lowin
d36ea42b92
Fix OAuth resource URL handling and WWW-Authenticate header (#1706) 2025-09-02 15:14:05 -04:00
Jeremiah Lowin
ce0a044835
Remove trailing slash in unit tests (#1535) 2025-08-18 08:10:46 -04:00
Jeremiah Lowin
c6768dad5f
Add documentation for get_access_token() dependency function (#1446)
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2025-08-11 13:01:44 -04:00
Panos Argyrakis
c3f4623690
fixes #1398: Add JWT claims to AccessToken (#1399)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-08-09 20:58:09 -04:00
Jeremiah Lowin
87e103222e
Improve redirect handling to address 307's (#1387) 2025-08-08 11:55:30 -04:00
Jeremiah Lowin
ec52e74b48
Introduce RemoteAuthProvider for cleaner external identity provider integration, update docs (#1346) 2025-08-02 20:36:38 -04:00
Jeremiah Lowin
b46d4934a8
Add comprehensive OAuth 2.1 authentication system with WorkOS integration (#1327) 2025-08-01 17:06:55 -04:00
Jeremiah Lowin
60ca72bb0b
Add complete support for TokenVerifier protocol (#1297) 2025-07-29 20:01:40 -04:00
Daniel Campos Olivares
448e794dc7
feat: Allow Resource Metadata URL as field in OAuthProvider (#1287) 2025-07-29 17:40:46 -04:00
Jeremiah Lowin
db24c85359 Update all tests 2025-06-27 21:41:37 -04:00
Jeremiah Lowin
b98b080c98 Implement TokenVerifier protocol for mcp-python-sdk compatibility
Fixes breaking changes from mcp-python-sdk PR #982 which updated
BearerAuthBackend to use TokenVerifier protocol instead of OAuth providers.

Changes:
- Add verify_token() method to BearerAuthProvider implementing TokenVerifier protocol
- Add verify_token() method to InMemoryOAuthProvider implementing TokenVerifier protocol
- Update BearerAuthBackend usage in setup_auth_middleware_and_routes() to pass TokenVerifier
- Add comprehensive unit tests for TokenVerifier implementations
- Add integration tests for BearerAuthBackend with TokenVerifier
- Add tests for HTTP auth setup functions

All existing functionality preserved with full backwards compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-26 15:08:31 -04:00
Jeremiah Lowin
76e3df1bc1 Add "http" as an alias for streamable-http 2025-06-22 18:55:07 -04:00
Jeremiah Lowin
18ae625fef Update docs and test 2025-06-20 13:06:48 -04:00
Jeremiah Lowin
099d340208 Update tests for prompts 2025-06-04 16:37:41 -04:00
Jeremiah Lowin
18615bc48b Remove empty parens 2025-06-04 15:41:28 -04:00
Jeremiah Lowin
8fb709c98c Simplify code for running servers in processes 2025-06-01 09:35:06 -04:00
Jeremiah Lowin
3e2fbb606b
Merge branch 'main' into fix-typing 2025-05-31 20:47:12 -04:00
Jeremiah Lowin
f1e3713fc6 Update test typing 2025-05-31 20:41:18 -04:00
Jeremiah Lowin
2390fb4da6 clean up test inits 2025-05-31 19:32:08 -04:00
Jeremiah Lowin
213abc4244 Pass client headers through to OpenAPI client 2025-05-23 12:38:24 -04:00
Jeremiah Lowin
189389a3a4 Ensure custom routes are respected 2025-05-22 12:20:29 -04:00