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
d8dc28b9b2
Add structured content & update almost all tests
2025-06-27 15:40:52 -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
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
Jeremiah Lowin
bc59a4fbf5
Ensure client is only initialized once
2025-06-08 14:48:05 -04:00
Jeremiah Lowin
6d36171f38
Fix passing token string to client auth
2025-06-07 21:39:50 -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
d1549c3d35
Remove empty parens
2025-06-04 15:37:55 -04:00
Jeremiah Lowin
f1e3713fc6
Update test typing
2025-05-31 20:41:18 -04:00
Jeremiah Lowin
814a6e4419
Add concurrency test
2025-05-31 18:08:43 -04:00
Jeremiah Lowin
4e6b1bf611
Merge branch 'main' into mask-errors
2025-05-23 08:36:10 -04:00
Jeremiah Lowin
451fc3bfc2
Merge branch 'main' into clientconfig
2025-05-22 11:23:52 -04:00
Jeremiah Lowin
06b9b98b6c
Raise an error if a Client is created with no servers in config
2025-05-22 11:22:45 -04:00
Jeremiah Lowin
53b067b4e7
Make error masking configurable
2025-05-22 09:08:16 -04:00
Jeremiah Lowin
1afe73c136
feat: support FastMCP v1 server transport
2025-05-21 17:42:26 -04:00
Jeremiah Lowin
fa1c94ccdc
Support creating clients from mcpconfig
2025-05-20 20:48:16 -04:00
Jeremiah Lowin
02cb6f8291
Add config inference test
2025-05-20 17:45:13 -04:00
Jeremiah Lowin
7cad7373dd
Merge branch 'main' into initialize-result
2025-05-20 10:41:21 -04:00
Jeremiah Lowin
3beabdbd1b
Merge branch 'main' into sse-inference
2025-05-20 10:29:47 -04:00
Jeremiah Lowin
a0e69a4cb2
Skip timeout tests on windows
2025-05-20 09:33:17 -04:00
Jeremiah Lowin
dde2dc4712
Flaky test
2025-05-20 09:30:03 -04:00
Jeremiah Lowin
8490905b0c
Infer sse transport from url
2025-05-20 08:57:02 -04:00
Jeremiah Lowin
526b831bec
Store the initialize result on the client
2025-05-19 20:49:03 -04:00
davenpi
a9c8969c12
Increase timeout in flaky test for reliability
2025-05-16 15:58:25 -04:00
Jeremiah Lowin
837d4c407d
Add timeout support to client ( #455 )
...
* Add timeouts kwargs
* Add timeout support
* Fix windows handling and docs
* Update client.mdx
* Windows tests
* Update test_sse.py
* Update test_sse.py
* Update test_sse.py
* Update test_sse.py
* Fix windows
2025-05-14 20:50:24 -04:00
Jeremiah Lowin
e7e301815f
Handle template errors
2025-05-13 14:33:11 -04:00
Jeremiah Lowin
6fa7c1704a
Improve error handling for tools and resources
2025-05-13 14:19:55 -04:00
Jeremiah Lowin
2eb0e7c1b3
Ensure prompts return descriptions
2025-05-05 12:33:05 -04:00
Jeremiah Lowin
085d4ae460
Update tests
2025-05-02 16:36:48 -04:00
Jeremiah Lowin
5ed101284a
Remove mock transport
2025-04-23 14:26:13 -04:00
yihuang
ad41ca7dc8
fix format
2025-04-21 13:21:11 +08:00
yihuang
e962f4d312
fix test
2025-04-21 13:18:11 +08:00
yihuang
5bbad74044
add unit test
2025-04-21 13:14:46 +08:00
Jeremiah Lowin
d27141a935
Refactor remote servers
2025-04-15 20:28:14 -04:00
Jeremiah Lowin
d39f787537
rename mount -> import
2025-04-15 13:01:36 -04:00
Jeremiah Lowin
c2ca6e1fa2
Fix matching logic
2025-04-15 11:06:51 -04:00
Jeremiah Lowin
ea13dc114f
Improve client return types
2025-04-12 12:16:07 -04:00