Commit graph

14 commits

Author SHA1 Message Date
zzstoatzz
8ccd2ea9e6 test: update OAuth tests to match MCP implementation behavior
- Remove CORS header assertions as CORSMiddleware handles these at ASGI level
- Simplify OPTIONS test to just verify endpoint responds
- MCP's create_protected_resource_routes already wraps handlers properly
2025-07-22 10:11:18 -05:00
zzstoatzz
e104811d0e fix: add OAuth protected resource metadata endpoint
Implements the missing /.well-known/oauth-protected-resource endpoint
required by the MCP spec for OAuth discovery. Also adds proper
resource_metadata URL to WWW-Authenticate headers for 401 responses.

This fixes OAuth authentication issues with FastMCP Client and Claude
Integration by providing the complete OAuth discovery mechanism.

Closes #972

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 11:21:55 -05: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