Commit graph

120 commits

Author SHA1 Message Date
Jeremiah Lowin
5fe8e2fe6b
Fix OAuth token expiry handling (#1649) (#1671) 2025-08-29 21:14:56 -04:00
William Easton
3fc21a2811
Merge branch 'main' into claude/issue-1625-20250826-0138 2025-08-25 22:40:29 -05:00
William Easton
f848b4d14c
stdio client updates 2025-08-25 22:37:24 -05:00
Jeremiah Lowin
953d3eb64b
Fix elicitation enums (#1632) 2025-08-25 22:14:00 -04:00
William Easton
d32a2b953e
Fallback to a Completions API when Sampling is not available (#1145) 2025-08-21 07:49:29 -04:00
nate nowack
77b425c47d
switch from pyright to ty (#1545) 2025-08-19 17:22:52 -04:00
Jeremiah Lowin
ce0a044835
Remove trailing slash in unit tests (#1535) 2025-08-18 08:10:46 -04:00
William Easton
8d14c0916c
Improve stdio and mcp_config clean-up (#1444) 2025-08-15 11:03:44 -04:00
Jeremiah Lowin
87e103222e
Improve redirect handling to address 307's (#1387) 2025-08-08 11:55:30 -04:00
633WHU
dd1389178c
Fix client-side logging bug #1394 (#1397) 2025-08-08 11:37:10 -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
c40149d970
Ensure validation errors are raised when masked (#1330) 2025-08-01 17:06:27 -04:00
Jeremiah Lowin
23f7873314
Add unit test for sampling with image messages (#1329) 2025-08-01 15:55:05 -04:00
Colin Jermain
7f3c3cc24b
Structured client-side logging (#1326) 2025-08-01 14:47:21 -04:00
William Easton
3be8f5ea93
Add UV Transport (#1270)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-07-28 15:41:36 -04:00
Jeremiah Lowin
d043511370
Add tests for headers with both legacy and experimental openapi parser (#1259) 2025-07-25 15:11:17 -04:00
Jeremiah Lowin
c452164e86
Fix concurrent proxy client operations with session isolation (#1083)
* Refactor Client session state with ClientSessionState dataclass

Fixes #1068 by introducing ClientSessionState to encapsulate session management
attributes, simplifying Client.new() and preventing concurrent proxy client
context mixing through client factory pattern.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Update proxy documentation for new client factory pattern

Documents the new session management behavior, client_factory parameter,
and concurrent operation safety introduced in v2.10.3 to fix #1068.

* Remove deprecation of client parameter and update documentation

- Undeprecated FastMCPProxy client parameter
- Made client_factory the advanced option for custom control
- Added detailed explanation of how client factories work internally
- Removed outdated note about proxy feature limitations
- Removed fabricated Advanced Usage section

* Re-do proxy documentation

* Fix deprecated client parameter to provide session isolation

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-08 17:22:43 -04:00
Jeremiah Lowin
0600834da4 Fix single-element list unwrapping in tool content
Single-element lists like [1] were being incorrectly unwrapped to "1"
in unstructured content while multi-element lists remained as lists.
This created inconsistent behavior where the structure was lost for
single items.

This fix ensures lists always preserve their structure in unstructured
content regardless of length, making behavior consistent and predictable.

Also removes pretty-printing from JSON serialization for more compact
output across tools, prompts, and resources.

Fixes #1064

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 12:07:16 -04:00
Jeremiah Lowin
ef742d9400
Ensure multi-client configurations use new ProxyClient (#1045)
* Validate elicitation responses are dicts

* Ensure advanced MCP features are forwarded through proxy

* Use proxy client in tests
2025-07-05 11:57:03 -04:00
Jeremiah Lowin
a52c28c319 Ensure tests use stateless mode 2025-07-03 19:55:49 -04:00
Jeremiah Lowin
aab1f74810 response_type is None 2025-06-30 13:12:25 -04:00
Jeremiah Lowin
eaf27c710d Support "no response" elicitation requests 2025-06-30 13:03:57 -04:00
Jeremiah Lowin
ed331e717b Improve early error handling for stdio transport 2025-06-28 21:37:48 -04:00
Jeremiah Lowin
ebc721bdf1 Fix tests 2025-06-28 20:19:08 -04:00
Jeremiah Lowin
ecfbf5de00 Support implicit Elicitation acceptance 2025-06-28 20:15:23 -04:00
Jeremiah Lowin
a34fb9e3bb Support constrained choice 2025-06-28 14:59:31 -04:00
Jeremiah Lowin
3805ac9b44 Provide a response type to client 2025-06-28 09:47:14 -04:00
Jeremiah Lowin
45d9814374 Handler must be async; add to sessionkwargs 2025-06-28 08:32:48 -04:00
Jeremiah Lowin
11d2bacbb4 Merge branch 'main' into elicitation 2025-06-28 08:26:55 -04:00
Jeremiah Lowin
d8dc28b9b2 Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
Jeremiah Lowin
38036b1f42 Add automatic MCP list change notifications and client message handling
Implements comprehensive notification system for tools, resources, and prompts with automatic client updates and flexible message handlers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 22:33:06 -04:00
Jeremiah Lowin
987dd85826 Update test_streamable_http.py 2025-06-22 20:08:36 -04:00
Jeremiah Lowin
ffe0c92d63 Alias streamable-http as http 2025-06-22 20:00:11 -04:00
Jeremiah Lowin
76e3df1bc1 Add "http" as an alias for streamable-http 2025-06-22 18:55:07 -04:00
Jeremiah Lowin
c685c30b8d
Merge branch 'protocol-update' into elicitation 2025-06-22 13:46:08 -04:00
Jeremiah Lowin
73e1aa2112 Apply pre-commit formatting changes
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 10:29:15 -04:00
Jeremiah Lowin
a7f14d90a4 Implement client-side argument serialization with focused tests
- Add pydantic_core.to_json() serialization for non-string prompt arguments
- Update type annotations to accept dict[str, Any] instead of dict[str, str]
- Add focused tests covering specific scenarios:
  * Client always serializes non-string args regardless of server types
  * Integration with server-side type conversion
  * Client serialization error with specific PydanticSerializationError
  * Server deserialization error with specific McpError match

This ensures MCP protocol compliance while maintaining developer experience
with typed arguments.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 10:18:48 -04:00
Jeremiah Lowin
18ae625fef Update docs and test 2025-06-20 13:06:48 -04:00
Jeremiah Lowin
c0d3313ac6 Implement elicitation feature for FastMCP following sampling pattern
Added comprehensive elicitation support including:
- Client-side handler infrastructure following sampling pattern
- Server-side Context.elicit() method with type safety and validation
- Support for primitive types (str, int, float, bool) with automatic wrapping
- Support for dataclasses and other complex types
- Pattern matching with AcceptedElicitation, DeclinedElicitation, CancelledElicitation
- Comprehensive atomic test coverage for all scenarios

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 09:47:53 -04:00
Jeremiah Lowin
725c061d66 Fix import prefix behavior 2025-06-19 15:19:31 -04:00
Miki Yutani
60dada7026 Fix code formatting for pre-commit hooks 2025-06-16 13:08:44 +09:00
Miki Yutani
42121b2767 Add version parameter to FastMCP constructor 2025-06-16 12:38:15 +09:00
Alexander Seeliger
ec24a07060 chore: fix format 2025-06-15 18:25:55 +02:00
Alexander Seeliger
68567e5b59 chore: revert change 2025-06-15 18:12:14 +02:00
Alexander Seeliger
64bf0a4112 chore: clean up tests 2025-06-15 18:11:43 +02:00
Alexander Seeliger
92d3cffa53 chore: remove other tests 2025-06-15 17:52:13 +02:00
Alexander Seeliger
bdc3e395e1 fix: missing related_request_id for report_progress 2025-06-15 17:47:09 +02:00
Jeremiah Lowin
a1955eb5cd Remove old client test; ensure server starts on every test 2025-06-14 14:16:18 -04:00
Jeremiah Lowin
c9c10a55d8 Try expanding timeout because test error 2025-06-14 10:46:20 -04:00
Jeremiah Lowin
1866c17400 Update tests 2025-06-10 17:08:23 -04:00