Updated FunctionPrompt.render() to accept dict[str, Any] instead of
dict[str, str | Context] to preserve the developer experience of
passing properly typed arguments while also supporting string-only
arguments from MCP clients.
The _convert_string_arguments method now intelligently handles both
scenarios:
- Already-typed arguments are passed through unchanged
- String arguments are converted to expected types when needed
This maintains backward compatibility while enabling MCP spec compliance.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive server inspection utility supporting both FastMCP 1.x and 2.x
- Create detailed info dataclasses for tools, prompts, resources, and templates
- Implement CLI command with path:object notation and JSON output
- Add version reporting (fastmcp_version, mcp_version, server_version)
- Include comprehensive unit tests for utilities and CLI
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>