Commit graph

1,406 commits

Author SHA1 Message Date
Jeremiah Lowin
18ae625fef Update docs and test 2025-06-20 13:06:48 -04:00
Jeremiah Lowin
d1ded43a43 Merge branch 'main' into trailing-slash 2025-06-20 12:54:09 -04:00
Jeremiah Lowin
ac95a3aaaf Update http.py 2025-06-20 12:53:42 -04:00
Jeremiah Lowin
b37686cf15 Use trailing slashes 2025-06-20 12:52:42 -04:00
Jeremiah Lowin
4b303f1ae0 Fix StreamableHTTP redirect issue for MCP spec compliance
Resolves 307 redirect from /mcp to /mcp/ by replacing Mount with explicit Route entries for both path variations. The MCP specification requires a single endpoint to handle both GET and POST requests without redirects.

Changes:
- Replace Mount with Route for both /mcp and /mcp/ paths
- Add PathNormalizingASGIApp wrapper to normalize trailing slashes for MCP SDK
- Apply same pattern to SSE transport for consistency
- Ensure both auth and non-auth configurations work correctly

This fixes the redirect issue mentioned in GitHub issue #828.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 12:29:25 -04:00
Jeremiah Lowin
fb9161d745
Merge pull request #895 from jlowin/claude-wt-20250620-120729 2025-06-20 12:28:51 -04:00
Jeremiah Lowin
ac252fc28f Fix CORS documentation example to properly handle preflight requests
The previous example only allowed GET methods, causing browser preflight
requests to fail with "Disallowed CORS method" errors. Updated to include
the required parameters for proper CORS support with MCP clients.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 12:27:22 -04:00
Jeremiah Lowin
f97ace175f
Merge pull request #894 from jlowin/claude-wt-20250620-120811 2025-06-20 12:25:01 -04:00
Jeremiah Lowin
a2f406faa4 Apply pre-commit formatting fixes 2025-06-20 12:17:47 -04:00
Jeremiah Lowin
42460480de Fix BearerAuthProvider audience type annotations to support List[str]
The audience parameter was typed as `str | None` but the implementation
already supported `List[str]`. This fix aligns the type annotations with
the actual functionality and adds comprehensive validation logic for all
audience type combinations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 12:13:00 -04:00
Jeremiah Lowin
a0242e1c68
Merge pull request #892 from jlowin/claude-wt-20250620-113451 2025-06-20 11:54:52 -04:00
Jeremiah Lowin
7b5ef3e5e5 Use specific ValidationError instead of broad Exception catch
Addresses PR feedback to use more specific exception handling for
URL validation failures.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 11:50:16 -04:00
Jeremiah Lowin
40ce687d0d Fix JWT issuer validation to support string values per RFC 7519
Resolves issue where BearerAuthProvider rejected tokens with non-URL
issuer claims. Works around the underlying SDK's URL validation while
maintaining RFC 7519 compliance for JWT processing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 11:47:34 -04:00
Jeremiah Lowin
4f4f27a3d2
Merge pull request #882 from jlowin/docs-session-id-update 2025-06-19 18:39:34 -04:00
Jeremiah Lowin
28fe5082d2 Add session_id to context documentation
Fast follow to #881 to document the new session_id property.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 18:35:59 -04:00
Jeremiah Lowin
5154f87f30
Merge pull request #881 from jlowin/dev-20250619-173841 2025-06-19 18:27:00 -04:00
Jeremiah Lowin
60c6441d7b Fix formatting per pre-commit hooks
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 18:22:02 -04:00
Jeremiah Lowin
370c44b745
Merge branch 'main' into dev-20250619-173841 2025-06-19 18:21:18 -04:00
Jeremiah Lowin
942fd5c13e Add session_id property to Context for session-based data sharing
Exposes MCP session ID from HTTP headers to enable Redis-based data sharing
between tools. Returns None for stdio/memory transports as expected.

Fixes #875, addresses python-sdk#986, python-sdk#942, python-sdk#485

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 18:16:34 -04:00
Jeremiah Lowin
ce8b43f282
Merge pull request #870 from jlowin/middleware-2 2025-06-19 18:15:36 -04:00
Jeremiah Lowin
7ad9fb6e51
Merge pull request #880 from jlowin/dev-20250619-173915 2025-06-19 18:04:39 -04:00
Jeremiah Lowin
3ce613b43a Add CLAUDE.md with FastMCP development guidelines
Establishes preference for in-memory transport when testing/investigating FastMCP servers, and recommends StreamableHttp over SSE for HTTP transport needs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-19 18:00:53 -04:00
Jeremiah Lowin
dee2f33a81 Update doc icons 2025-06-19 17:28:00 -04:00
Jeremiah Lowin
085c5b765b Update docs and tests 2025-06-19 17:06:54 -04:00
Jeremiah Lowin
0beb79d11a Minor updates 2025-06-19 15:28:55 -04:00
Jeremiah Lowin
725c061d66 Fix import prefix behavior 2025-06-19 15:19:31 -04:00
Jeremiah Lowin
703589e6f5 Add proxy middleware test 2025-06-19 15:00:11 -04:00
Jeremiah Lowin
2ae5a800e7 Fix proxy servers 2025-06-19 14:50:58 -04:00
Jeremiah Lowin
2e31b2704b Update tests 2025-06-19 14:05:19 -04:00
Jeremiah Lowin
d8235e1af7 Clean up mode kwarg 2025-06-19 12:44:34 -04:00
Jeremiah Lowin
35e13ef9bf Update resource manager 2025-06-19 12:22:14 -04:00
Jeremiah Lowin
6b1ba049c7 Update prompt manager 2025-06-19 11:33:46 -04:00
Jeremiah Lowin
607125abf8 Update tool manager 2025-06-19 11:04:50 -04:00
Jeremiah Lowin
cafa11d3ad Fix missing proxy arg 2025-06-18 21:57:19 -04:00
Jeremiah Lowin
dbb6a76f63 Update proxy behavior and conflict resolution 2025-06-18 21:53:03 -04:00
Jeremiah Lowin
a42c0c40b0 Add middleware for all current handlers 2025-06-18 21:41:28 -04:00
Jeremiah Lowin
c183e3a99c Updated list_tools 2025-06-18 21:17:38 -04:00
Jeremiah Lowin
e11417c3c2 Merge main 2025-06-18 21:10:25 -04:00
Jeremiah Lowin
e365c0b6fb Merge branch 'main' into middleware-2 2025-06-18 21:08:18 -04:00
Jeremiah Lowin
bed24d20cd
Merge pull request #869 from jlowin/key 2025-06-18 21:07:38 -04:00
Jeremiah Lowin
a2bb2314c7 Add key to component 2025-06-18 21:05:11 -04:00
Jeremiah Lowin
0702bad1c2 Add single-component methods 2025-06-18 19:47:19 -04:00
Jeremiah Lowin
c39e68fa9a
Merge pull request #861 from jlowin/mounting 2025-06-18 16:49:15 -04:00
Jeremiah Lowin
922e1d5b82 Update docs 2025-06-18 11:48:44 -04:00
Jeremiah Lowin
8eaa6096b4 Make prefixes optional 2025-06-18 11:28:24 -04:00
Jeremiah Lowin
baf2ce2257
Merge pull request #860 from rsp2k/rsp2k-patch-1
contrib.mcp_mixin: add support for enabled, mcp_tool: annotations, excl. parm, serializer
2025-06-17 20:54:06 -04:00
Jeremiah Lowin
084e52badd Consolidate prefix logic 2025-06-17 20:23:47 -04:00
Ryan Malloy
cf56bdd15e allow dicts to be passed as annotations 2025-06-17 16:14:20 -06:00
Ryan Malloy
3deddf542e Add moree docs 2025-06-17 15:05:24 -06:00
Ryan Malloy
a37df5077a add missing parameter, DOH! 2025-06-17 14:51:04 -06:00