Commit graph

526 commits

Author SHA1 Message Date
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
228425e309
Avoid propagating logs (#1042)
* Avoid propagating logs

* Set up caplog for non-root loggers

* Update tests
2025-07-04 12:22:11 -04:00
hopeful0
f7dfd5be9c
Proxy support advanced MCP features (#1022)
* Proxy support advanced MCP features

* Optimize ProxyClient testing

* Add documentation for ProxyClient
2025-07-04 12:21:57 -04:00
Jeremiah Lowin
e182231fc8
Add path expansion to image/audio/file (#1038)
* Add path expansion to image/audio/file

* Make path tests platform agnostic
2025-07-04 09:51:30 -04:00
Jeremiah Lowin
61c191b920 Update test_openapi_compatibility.py 2025-07-03 21:09:27 -04:00
Jeremiah Lowin
68c355d740 Fix test to properly expect ValidationError with pytest.raises 2025-07-03 21:05:56 -04:00
Jeremiah Lowin
23d7337a97 Add comprehensive OpenAPI 3.0 vs 3.1 compatibility tests
Adds test coverage for specific differences between OpenAPI 3.0 and 3.1 that can cause validation issues, including the scenario reported in GitHub issue #1021.

Test coverage includes:
- OpenAPI 3.0 boolean exclusiveMaximum format vs 3.1 numeric format
- OpenAPI 3.0 nullable vs 3.1 type array format
- Complex schemas with $defs and multiple exclusive constraints
- Edge cases with both exclusiveMaximum and exclusiveMinimum

These tests serve as regression prevention and document expected behavior for both OpenAPI versions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 20:55:32 -04:00
Jeremiah Lowin
54276a589d
Merge pull request #1033 from jlowin/claude-wt-20250703-195810
Support 'scp' claim for OAuth scopes in BearerAuthProvider
2025-07-03 20:37:29 -04:00
Jeremiah Lowin
f052ae2d6a Split giant test file into smaller files 2025-07-03 20:31:03 -04:00
Jeremiah Lowin
63f3940c6f Support 'scp' claim for OAuth scopes in BearerAuthProvider
Some Identity Providers use 'scp' claim instead of the standard 'scope' claim for OAuth scopes. This change updates the scope extraction logic to support both claims, with 'scope' taking precedence when both are present.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 20:18:54 -04:00
Jeremiah Lowin
cfd4ab7969
Merge pull request #1018 from jlowin/stateless-arg
Expose stateless_http kwarg for mcp.run()
2025-07-03 19:57:52 -04:00
Jeremiah Lowin
a52c28c319 Ensure tests use stateless mode 2025-07-03 19:55:49 -04:00
Jeremiah Lowin
756e5c31e3 Reapply "Add CLI banner"
This reverts commit 41359ec99d.
2025-07-02 18:28:29 -04:00
Jeremiah Lowin
41359ec99d
Revert "Add CLI banner" 2025-07-02 00:53:20 -04:00
Jeremiah Lowin
39f7b30a8b
Merge pull request #1008 from jlowin/claude-wt-20250701-104804
Fix OpenAPI array parameter explode handling
2025-07-01 19:17:06 -04:00
Jeremiah Lowin
f14be9ab77 Fix OpenAPI array parameter explode handling 2025-07-01 19:06:35 -04:00
Jeremiah Lowin
f9e20bf63e Fix tests 2025-07-01 10:47:37 -04:00
Jeremiah Lowin
7e0a237945 Fix schema wrapping for non-object union types in output schemas 2025-06-30 14:12:40 -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
7d3dcdca03 Add tests for title priority logic in tools
- Test that explicit title takes priority over annotations.title
- Test that annotations.title is used as fallback when no explicit title
- Ensures the improved to_mcp_tool logic works correctly
- Add proper type guards for annotations None checks

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 19:58:38 -04:00
Jeremiah Lowin
24deabf568 Add title field support to FastMCP components
- Add optional title field to FastMCPComponent base class
- Support title parameter in all component decorators (@tool, @resource, @prompt)
- Include title in MCP protocol serialization when provided
- Add get_display_name() method to prefer title over name for display
- Add comprehensive tests for title functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-28 18:11:29 -04:00
Jeremiah Lowin
9b9c0fce2c Merge branch 'main' into elicitation 2025-06-28 15:08:16 -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
79c086febe
Merge branch 'main' into auth 2025-06-28 08:16:16 -04:00
Jeremiah Lowin
e22267142e
Merge pull request #901 from jlowin/output-schema
MCP 6/18/25: Add output schema to tools
2025-06-28 08:16:06 -04:00
Jeremiah Lowin
3598e947b2 Update test_mcp_config.py 2025-06-28 08:15:43 -04:00
Jeremiah Lowin
b10bab9423 Fix output schema test 2025-06-28 08:14:31 -04:00
Jeremiah Lowin
c412a63d4e Update docs 2025-06-27 22:38:55 -04:00
Jeremiah Lowin
5520102821 Update failing tests 2025-06-27 22:06:35 -04:00
Jeremiah Lowin
b3799e7a73 Update typing 2025-06-27 21:54:17 -04:00
Jeremiah Lowin
db24c85359 Update all tests 2025-06-27 21:41:37 -04:00
Jeremiah Lowin
037b1f35b1
Merge pull request #977 from cortexapps/add-extensions
Add OpenAPI extensions support to HTTPRoute
2025-06-27 20:45:01 -04:00
Jeremiah Lowin
a7eb2da273 Update output schema control 2025-06-27 20:17:10 -04:00
Aditya Bansal
f524652f25 Add OpenAPI extensions support to HTTPRoute
- Add extensions field to HTTPRoute class to store x-* fields
  - Extract extensions from operation's model_extra in parser
  - Add test to verify extensions are properly parsed
2025-06-27 15:27:36 -07:00
Goro
852952dd6d Add tests when custom path is provided 2025-06-27 23:30:41 +02:00
Goro
510f3fb3f2 Merge branch 'main' of https://github.com/jlowin/fastmcp into feature/component-manager 2025-06-27 22:18:33 +02:00
Goro
7d252e6da4 Add missing documentation 2025-06-27 22:17:44 +02:00
Jeremiah Lowin
ddb557ba30 Update for 'result' kwarg instead of 'value' 2025-06-27 15:44:46 -04:00
Jeremiah Lowin
d8dc28b9b2 Add structured content & update almost all tests 2025-06-27 15:40:52 -04:00
Goro
f2fe4f94b0 Refactor duplicated logic 2025-06-27 21:12:17 +02:00
Goro
02a905e8b9 Add component manager tests 2025-06-27 20:04:25 +02:00
Jeremiah Lowin
7f0622b707 Fix contrib tests 2025-06-26 20:17:02 -04:00
Jeremiah Lowin
1e29149d5f Merge branch 'main' into output-schema 2025-06-26 19:30:35 -04:00