fastmcp 2.10.4__tar.gz → 2.10.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/labeler.yml +4 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/workflows/run-tests.yml +2 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.gitignore +3 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/PKG-INFO +1 -1
- fastmcp-2.10.5/README_OPENAPI.md +246 -0
- fastmcp-2.10.5/docs/clients/transports.mdx +310 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/docs.json +18 -14
- fastmcp-2.10.5/docs/integrations/fastapi.mdx +229 -0
- {fastmcp-2.10.4/docs/servers → fastmcp-2.10.5/docs/integrations}/openapi.mdx +88 -190
- fastmcp-2.10.5/docs/integrations/starlette.mdx +213 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/composition.mdx +1 -1
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/middleware.mdx +7 -7
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/proxy.mdx +29 -10
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/server.mdx +25 -3
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/install/claude_code.py +35 -6
- fastmcp-2.10.5/src/fastmcp/server/middleware/__init__.py +11 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/middleware/middleware.py +8 -34
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/openapi.py +125 -51
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/proxy.py +9 -4
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/server.py +24 -5
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/cli.py +6 -6
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/components.py +43 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/openapi.py +106 -11
- fastmcp-2.10.5/tests/integration_tests/test_github_mcp_remote.py +116 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/middleware/test_middleware.py +146 -0
- fastmcp-2.10.5/tests/server/openapi/test_deepobject_style.py +281 -0
- fastmcp-2.10.5/tests/server/openapi/test_parameter_collisions.py +258 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/proxy/test_proxy_server.py +158 -0
- fastmcp-2.10.5/tests/tools/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/openapi/test_openapi_output_schemas.py +40 -0
- fastmcp-2.10.4/docs/clients/transports.mdx +0 -449
- fastmcp-2.10.4/docs/deployment/asgi.mdx +0 -220
- fastmcp-2.10.4/src/fastmcp/server/middleware/__init__.py +0 -19
- fastmcp-2.10.4/tests/test_servers/fastmcp_server.py +0 -58
- fastmcp-2.10.4/tests/test_servers/sse.py +0 -6
- fastmcp-2.10.4/tests/test_servers/stdio.py +0 -6
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.ccignore +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.cursor/rules/core-mcp-objects.mdc +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/ISSUE_TEMPLATE/enhancement.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/dependabot.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/release.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/workflows/labeler.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/workflows/publish.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.github/workflows/run-static.yml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/.pre-commit-config.yaml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/AGENTS.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/CLAUDE.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/LICENSE +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/Windows_Notes.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/.cursor/rules/mintlify.mdc +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/assets/favicon.svg +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/assets/images/tutorial-rest-api-result.png +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/assets/updates/release-2-7.png +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/changelog.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/auth/bearer.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/auth/oauth.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/client.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/elicitation.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/logging.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/messages.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/progress.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/prompts.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/resources.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/roots.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/sampling.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/clients/tools.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/community/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/community/showcase.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/css/banner.css +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/css/python-sdk.css +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/css/style.css +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/css/version-badge.css +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/deployment/running-server.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/getting-started/installation.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/getting-started/quickstart.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/getting-started/welcome.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/anthropic.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/chatgpt.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/claude-code.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/claude-desktop.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/cursor-install-mcp.png +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/cursor.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/eunomia-authorization.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/gemini.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/mcp-json-configuration.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/integrations/openai.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/patterns/cli.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/patterns/contrib.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/patterns/decorating-methods.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/patterns/http-requests.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/patterns/testing.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/patterns/tool-transformation.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-cli-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-cli-claude.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-cli-cli.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-cli-run.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-auth-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-auth-bearer.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-auth-oauth.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-client.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-logging.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-oauth_callback.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-progress.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-roots.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-sampling.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-client-transports.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-exceptions.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-prompts-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-prompts-prompt.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-prompts-prompt_manager.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-resources-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-resources-resource.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-resources-resource_manager.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-resources-template.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-resources-types.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-auth-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-auth-auth.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-auth-providers-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-auth-providers-bearer_env.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-auth-providers-in_memory.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-context.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-dependencies.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-http.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-middleware-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-middleware-error_handling.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-middleware-logging.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-middleware-middleware.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-middleware-rate_limiting.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-middleware-timing.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-middleware.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-openapi.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-proxy.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-server-server.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-settings.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-tools-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-tools-tool.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-tools-tool_manager.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-tools-tool_transform.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-__init__.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-cache.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-components.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-exceptions.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-http.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-inspect.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-json_schema.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-logging.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-mcp_config.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-openapi.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-tests.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/python-sdk/fastmcp-utilities-types.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/auth/bearer.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/context.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/elicitation.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/logging.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/progress.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/prompts.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/resources.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/sampling.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/servers/tools.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/snippets/local-focus.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/snippets/version-badge.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/snippets/youtube-embed.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/tutorials/create-mcp-server.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/tutorials/mcp.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/tutorials/rest-api.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/docs/updates.mdx +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/demo.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/pyproject.toml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/__main__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/_atproto/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/_atproto/_client.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/_atproto/_posts.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/_atproto/_profile.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/_atproto/_read.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/_atproto/_social.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/py.typed +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/server.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/settings.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/atproto_mcp/src/atproto_mcp/types.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/complex_inputs.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/config_server.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/desktop.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/echo.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/get_file.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/in_memory_proxy_example.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/memory.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/mount_example.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/sampling.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/screenshot.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/serializer.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/simple_echo.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/pyproject.toml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/__main__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/hub.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/lights/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/lights/hue_utils.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/lights/server.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/py.typed +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/src/smart_home/settings.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/smart_home/uv.lock +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/tags_example.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/examples/text_me.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/justfile +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/pyproject.toml +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/claude.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/cli.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/install/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/install/claude_desktop.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/install/cursor.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/install/mcp_config.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/install/shared.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/cli/run.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/auth/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/auth/bearer.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/auth/oauth.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/client.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/elicitation.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/logging.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/messages.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/oauth_callback.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/progress.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/roots.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/sampling.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/client/transports.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/bulk_tool_caller/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/bulk_tool_caller/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/bulk_tool_caller/example.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/component_manager/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/component_manager/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/component_manager/component_manager.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/component_manager/component_service.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/component_manager/example.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/mcp_mixin/README.md +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/mcp_mixin/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/mcp_mixin/example.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/exceptions.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/mcp_config.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/prompts/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/prompts/prompt.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/prompts/prompt_manager.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/py.typed +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/resources/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/resources/resource.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/resources/resource_manager.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/resources/template.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/resources/types.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/auth/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/auth/auth.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/auth/providers/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/auth/providers/bearer.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/auth/providers/bearer_env.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/auth/providers/in_memory.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/context.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/dependencies.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/elicitation.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/http.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/low_level.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/middleware/error_handling.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/middleware/logging.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/middleware/rate_limiting.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/server/middleware/timing.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/settings.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/tools/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/tools/tool.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/tools/tool_manager.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/tools/tool_transform.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/cache.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/exceptions.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/http.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/inspect.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/json_schema.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/json_schema_type.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/logging.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/tests.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/src/fastmcp/utilities/types.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/auth/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/auth/providers/test_bearer.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/auth/providers/test_bearer_env.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/auth/providers/test_token_verifier.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/auth/test_oauth_client.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/cli/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/cli/test_cli.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/cli/test_cursor.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/cli/test_install.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/cli/test_run.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/cli/test_shared.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_client.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_elicitation.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_logs.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_notifications.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_openapi.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_progress.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_roots.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_sampling.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_sse.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_stdio.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/client/test_streamable_http.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/conftest.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/contrib/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/contrib/test_bulk_tool_caller.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/contrib/test_component_manager.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/contrib/test_mcp_mixin.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/test_deprecated.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/test_mount_import_arg_order.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/test_mount_separators.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/test_proxy_client.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/test_resource_prefixes.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/test_route_type_ignore.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/deprecated/test_settings.py +0 -0
- {fastmcp-2.10.4/tests/prompts → fastmcp-2.10.5/tests/integration_tests}/__init__.py +0 -0
- {fastmcp-2.10.4/tests/resources → fastmcp-2.10.5/tests/prompts}/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/prompts/test_prompt.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/prompts/test_prompt_manager.py +0 -0
- {fastmcp-2.10.4/tests/server → fastmcp-2.10.5/tests/resources}/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/resources/test_file_resources.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/resources/test_function_resources.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/resources/test_resource_manager.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/resources/test_resource_template.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/resources/test_resources.py +0 -0
- {fastmcp-2.10.4/tests/server/http → fastmcp-2.10.5/tests/server}/__init__.py +0 -0
- {fastmcp-2.10.4/tests/server/middleware → fastmcp-2.10.5/tests/server/http}/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/http/test_auth_setup.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/http/test_bearer_auth_backend.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/http/test_custom_routes.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/http/test_http_dependencies.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/http/test_http_middleware.py +0 -0
- {fastmcp-2.10.4/tests/server/openapi → fastmcp-2.10.5/tests/server/middleware}/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/middleware/test_error_handling.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/middleware/test_logging.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/middleware/test_rate_limiting.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/middleware/test_timing.py +0 -0
- {fastmcp-2.10.4/tests/server/proxy → fastmcp-2.10.5/tests/server/openapi}/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/conftest.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_advanced_behavior.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_basic_functionality.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_configuration.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_description_propagation.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_explode_integration.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_openapi_compatibility.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_openapi_path_parameters.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/openapi/test_route_map_fn.py +0 -0
- {fastmcp-2.10.4/tests/tools → fastmcp-2.10.5/tests/server/proxy}/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/proxy/test_proxy_client.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_app_state.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_auth_integration.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_context.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_file_server.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_import_server.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_logging.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_mount.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_resource_prefix_formats.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_run_server.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_server.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_server_interactions.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_tool_annotations.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/server/test_tool_exclude_args.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/test_examples.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/tools/test_tool.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/tools/test_tool_manager.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/tools/test_tool_transform.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/openapi/__init__.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/openapi/conftest.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/openapi/test_openapi.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/openapi/test_openapi_advanced.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/openapi/test_openapi_fastapi.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_cache.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_inspect.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_json_schema.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_json_schema_type.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_logging.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_mcp_config.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_tests.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_typeadapter.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/tests/utilities/test_types.py +0 -0
- {fastmcp-2.10.4 → fastmcp-2.10.5}/uv.lock +0 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# FastMCP OpenAPI Integration
|
|
2
|
+
|
|
3
|
+
This document explains how FastMCP's OpenAPI integration works, what features are supported, and how to extend it. The OpenAPI functionality is split across two main files:
|
|
4
|
+
|
|
5
|
+
- `server/openapi.py` - High-level FastMCP server implementation and MCP component creation
|
|
6
|
+
- `utilities/openapi.py` - Low-level OpenAPI parsing and intermediate representation
|
|
7
|
+
|
|
8
|
+
## Architecture Overview
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
OpenAPI Spec → Parse → HTTPRoute IR → Create MCP Components → FastMCP Server
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### 1. Parsing Phase (`utilities/openapi.py`)
|
|
15
|
+
|
|
16
|
+
OpenAPI specifications are parsed into an intermediate representation (IR) that normalizes differences between OpenAPI 3.0 and 3.1:
|
|
17
|
+
|
|
18
|
+
- **Input**: Raw OpenAPI spec (dict)
|
|
19
|
+
- **Output**: List of `HTTPRoute` objects with normalized parameter information
|
|
20
|
+
- **Key Classes**:
|
|
21
|
+
- `HTTPRoute` - Represents a single operation
|
|
22
|
+
- `ParameterInfo` - Represents a parameter with location, style, explode, etc.
|
|
23
|
+
- `RequestBodyInfo` - Represents request body information
|
|
24
|
+
- `ResponseInfo` - Represents response information
|
|
25
|
+
|
|
26
|
+
### 2. Component Creation Phase (`server/openapi.py`)
|
|
27
|
+
|
|
28
|
+
HTTPRoute objects are converted into FastMCP components based on route mapping rules:
|
|
29
|
+
|
|
30
|
+
- **Tools** (`OpenAPITool`) - HTTP operations that can be called
|
|
31
|
+
- **Resources** (`OpenAPIResource`) - HTTP endpoints that return data
|
|
32
|
+
- **Resource Templates** (`OpenAPIResourceTemplate`) - Parameterized resources
|
|
33
|
+
|
|
34
|
+
## Parameter Handling
|
|
35
|
+
|
|
36
|
+
FastMCP supports various OpenAPI parameter serialization styles and formats:
|
|
37
|
+
|
|
38
|
+
### Supported Parameter Locations
|
|
39
|
+
- `query` - Query string parameters
|
|
40
|
+
- `path` - Path parameters
|
|
41
|
+
- `header` - HTTP headers
|
|
42
|
+
- `cookie` - Cookie parameters (parsed but not used in requests)
|
|
43
|
+
|
|
44
|
+
### Supported Parameter Styles
|
|
45
|
+
|
|
46
|
+
#### Query Parameters
|
|
47
|
+
- **`form`** (default) - Standard query parameter format
|
|
48
|
+
- `explode=true` (default): `?tags=red&tags=blue`
|
|
49
|
+
- `explode=false`: `?tags=red,blue`
|
|
50
|
+
- **`deepObject`** - Object parameters with bracket notation
|
|
51
|
+
- `explode=true`: `?filter[name]=John&filter[age]=30`
|
|
52
|
+
- `explode=false`: Falls back to JSON string (non-standard, logs warning)
|
|
53
|
+
|
|
54
|
+
#### Path Parameters
|
|
55
|
+
- **`simple`** (default) - Comma-separated for arrays: `/users/1,2,3`
|
|
56
|
+
|
|
57
|
+
#### Header Parameters
|
|
58
|
+
- **`simple`** (default) - Standard header format
|
|
59
|
+
|
|
60
|
+
### Parameter Type Support
|
|
61
|
+
|
|
62
|
+
#### Arrays
|
|
63
|
+
- String arrays with `explode=true/false`
|
|
64
|
+
- Number arrays with `explode=true/false`
|
|
65
|
+
- Boolean arrays with `explode=true/false`
|
|
66
|
+
- Complex object arrays (basic support, may not handle all cases)
|
|
67
|
+
|
|
68
|
+
#### Objects
|
|
69
|
+
- Objects with `deepObject` style and `explode=true`
|
|
70
|
+
- Objects with other styles fall back to JSON serialization
|
|
71
|
+
|
|
72
|
+
#### Primitives
|
|
73
|
+
- Strings, numbers, booleans
|
|
74
|
+
- Enums
|
|
75
|
+
- Default values
|
|
76
|
+
|
|
77
|
+
## Request Body Handling
|
|
78
|
+
|
|
79
|
+
### Supported Content Types
|
|
80
|
+
- `application/json` - JSON request bodies
|
|
81
|
+
|
|
82
|
+
### Schema Support
|
|
83
|
+
- Object schemas with properties
|
|
84
|
+
- Array schemas
|
|
85
|
+
- Primitive schemas
|
|
86
|
+
- Schema references (`$ref` to local schemas only)
|
|
87
|
+
- Required properties
|
|
88
|
+
- Default values
|
|
89
|
+
|
|
90
|
+
## Response Handling
|
|
91
|
+
|
|
92
|
+
### Content Type Detection
|
|
93
|
+
- `application/json` - Parsed as JSON
|
|
94
|
+
- `text/*` - Returned as text
|
|
95
|
+
- `application/xml` - Returned as text
|
|
96
|
+
- Other types - Returned as binary
|
|
97
|
+
|
|
98
|
+
### Output Schema Generation
|
|
99
|
+
- Success response schemas (200, 201, 202, 204)
|
|
100
|
+
- Object response wrapping for MCP compliance
|
|
101
|
+
- Schema compression (removes unused `$defs`)
|
|
102
|
+
|
|
103
|
+
## Route Mapping
|
|
104
|
+
|
|
105
|
+
Routes are mapped to MCP component types using `RouteMap` configurations:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
RouteMap(
|
|
109
|
+
methods=["GET", "POST"], # HTTP methods to match
|
|
110
|
+
pattern=r"/api/users/.*", # Regex pattern for path
|
|
111
|
+
mcp_type=MCPType.RESOURCE_TEMPLATE, # Target component type
|
|
112
|
+
tags={"user"}, # OpenAPI tags to match (AND condition)
|
|
113
|
+
mcp_tags={"fastmcp-user"} # Tags to add to created components
|
|
114
|
+
)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Default Behavior
|
|
118
|
+
- All routes become **Tools** by default
|
|
119
|
+
- Use route maps to override specific patterns
|
|
120
|
+
|
|
121
|
+
### Component Types
|
|
122
|
+
- `MCPType.TOOL` - Callable operations
|
|
123
|
+
- `MCPType.RESOURCE` - Static data endpoints
|
|
124
|
+
- `MCPType.RESOURCE_TEMPLATE` - Parameterized data endpoints
|
|
125
|
+
- `MCPType.EXCLUDE` - Skip route entirely
|
|
126
|
+
|
|
127
|
+
## Known Limitations & Edge Cases
|
|
128
|
+
|
|
129
|
+
### Parameter Edge Cases
|
|
130
|
+
1. **Parameter Name Collisions** - When path/query parameters have same names as request body properties, non-body parameters get `__location` suffixes
|
|
131
|
+
2. **Complex Array Serialization** - Limited support for arrays containing objects
|
|
132
|
+
3. **Cookie Parameters** - Parsed but not used in requests
|
|
133
|
+
4. **Non-standard Combinations** - e.g., `deepObject` with `explode=false`
|
|
134
|
+
|
|
135
|
+
### Request Body Edge Cases
|
|
136
|
+
1. **Content Type Priority** - Only first available content type is used
|
|
137
|
+
2. **Nested Objects** - Deep nesting may not serialize correctly
|
|
138
|
+
3. **Binary Content** - No support for file uploads or binary data
|
|
139
|
+
|
|
140
|
+
### Response Edge Cases
|
|
141
|
+
1. **Multiple Content Types** - Only JSON-compatible types are used for output schemas
|
|
142
|
+
2. **Error Responses** - Not used for MCP output schema generation
|
|
143
|
+
3. **Response Headers** - Not captured or exposed
|
|
144
|
+
|
|
145
|
+
### Schema Edge Cases
|
|
146
|
+
1. **External References** - `$ref` to external files not supported
|
|
147
|
+
2. **Circular References** - May cause issues in schema processing
|
|
148
|
+
3. **Polymorphism** - `oneOf`/`anyOf`/`allOf` limited support
|
|
149
|
+
|
|
150
|
+
## Debugging Tips
|
|
151
|
+
|
|
152
|
+
### Common Issues
|
|
153
|
+
1. **"Unknown tool/resource"** - Check route mapping configuration
|
|
154
|
+
2. **Parameter not found** - Check for name collisions or incorrect style/explode
|
|
155
|
+
3. **Invalid request format** - Check parameter serialization and content types
|
|
156
|
+
4. **Schema validation errors** - Check for external refs or complex schemas
|
|
157
|
+
|
|
158
|
+
### Debugging Tools
|
|
159
|
+
```python
|
|
160
|
+
# Parse routes to inspect intermediate representation
|
|
161
|
+
routes = parse_openapi_to_http_routes(openapi_spec)
|
|
162
|
+
for route in routes:
|
|
163
|
+
print(f"{route.method} {route.path}")
|
|
164
|
+
for param in route.parameters:
|
|
165
|
+
print(f" {param.name} ({param.location}): style={param.style}, explode={param.explode}")
|
|
166
|
+
|
|
167
|
+
# Check component creation
|
|
168
|
+
server = FastMCP.from_openapi(openapi_spec, client)
|
|
169
|
+
tools = await server.get_tools()
|
|
170
|
+
print(f"Created {len(tools)} tools: {list(tools.keys())}")
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Logging
|
|
174
|
+
- Set `FASTMCP_LOG_LEVEL=DEBUG` to see detailed parameter processing
|
|
175
|
+
- Look for warnings about non-standard parameter combinations
|
|
176
|
+
- Check for schema parsing errors in logs
|
|
177
|
+
|
|
178
|
+
## Extension Points
|
|
179
|
+
|
|
180
|
+
### Adding New Parameter Styles
|
|
181
|
+
1. Add style handling in `utilities/openapi.py` - `ParameterInfo` class
|
|
182
|
+
2. Implement serialization logic in `server/openapi.py` - `OpenAPITool.run()`
|
|
183
|
+
3. Add tests for parsing and serialization
|
|
184
|
+
|
|
185
|
+
### Adding New Content Types
|
|
186
|
+
1. Extend request body handling in `OpenAPITool.run()`
|
|
187
|
+
2. Add response parsing logic for new types
|
|
188
|
+
3. Update content type priority in utilities
|
|
189
|
+
|
|
190
|
+
### Custom Route Mapping
|
|
191
|
+
Use `route_map_fn` for complex routing logic:
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
def custom_mapper(route: HTTPRoute, current_type: MCPType) -> MCPType:
|
|
195
|
+
if route.path.startswith("/admin"):
|
|
196
|
+
return MCPType.EXCLUDE
|
|
197
|
+
return current_type
|
|
198
|
+
|
|
199
|
+
server = FastMCP.from_openapi(spec, client, route_map_fn=custom_mapper)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Testing Patterns
|
|
203
|
+
|
|
204
|
+
### Unit Tests
|
|
205
|
+
- Test parameter parsing with various styles/explode combinations
|
|
206
|
+
- Test route mapping with different patterns and tags
|
|
207
|
+
- Test schema generation and compression
|
|
208
|
+
|
|
209
|
+
### Integration Tests
|
|
210
|
+
- Mock HTTP client to verify actual request parameters
|
|
211
|
+
- Test end-to-end component creation and execution
|
|
212
|
+
- Test error handling and edge cases
|
|
213
|
+
|
|
214
|
+
### Example Test Pattern
|
|
215
|
+
```python
|
|
216
|
+
async def test_parameter_style():
|
|
217
|
+
# 1. Create OpenAPI spec with specific parameter configuration
|
|
218
|
+
spec = {"openapi": "3.1.0", ...}
|
|
219
|
+
|
|
220
|
+
# 2. Parse and create components
|
|
221
|
+
routes = parse_openapi_to_http_routes(spec)
|
|
222
|
+
tool = OpenAPITool(mock_client, routes[0], ...)
|
|
223
|
+
|
|
224
|
+
# 3. Execute and verify request parameters
|
|
225
|
+
await tool.run({"param": "value"})
|
|
226
|
+
actual_params = mock_client.request.call_args.kwargs["params"]
|
|
227
|
+
assert actual_params == expected_params
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Testing
|
|
231
|
+
|
|
232
|
+
OpenAPI functionality is tested across multiple files in `tests/server/openapi/`:
|
|
233
|
+
|
|
234
|
+
- `test_basic_functionality.py` - Core component creation and execution
|
|
235
|
+
- `test_explode_integration.py` - Parameter explode behavior
|
|
236
|
+
- `test_deepobject_style.py` - DeepObject style parameter encoding
|
|
237
|
+
- `test_parameter_collisions.py` - Parameter name collision handling
|
|
238
|
+
- `test_openapi_path_parameters.py` - Path parameter serialization
|
|
239
|
+
- `test_configuration.py` - Route mapping and MCP names
|
|
240
|
+
- `test_description_propagation.py` - Schema and description handling
|
|
241
|
+
|
|
242
|
+
When adding new OpenAPI features, create focused test files rather than adding to existing monolithic files.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
*This document should be updated when new OpenAPI features are added or when edge cases are discovered and addressed.*
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Client Transports
|
|
3
|
+
sidebarTitle: Transports
|
|
4
|
+
description: Configure how FastMCP Clients connect to and communicate with servers.
|
|
5
|
+
icon: link
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
import { VersionBadge } from "/snippets/version-badge.mdx"
|
|
9
|
+
|
|
10
|
+
<VersionBadge version="2.0.0" />
|
|
11
|
+
|
|
12
|
+
The FastMCP `Client` communicates with MCP servers through transport objects that handle the underlying connection mechanics. While the client can automatically select a transport based on what you pass to it, instantiating transports explicitly gives you full control over configuration—environment variables, authentication, session management, and more.
|
|
13
|
+
|
|
14
|
+
Think of transports as configurable adapters between your client code and MCP servers. Each transport type handles a different communication pattern: subprocesses with pipes, HTTP connections, or direct in-memory calls.
|
|
15
|
+
|
|
16
|
+
## Choosing the Right Transport
|
|
17
|
+
|
|
18
|
+
- **Use [STDIO Transport](#stdio-transport)** when you need to run local MCP servers with full control over their environment and lifecycle
|
|
19
|
+
- **Use [Remote Transports](#remote-transports)** when connecting to production services or shared MCP servers running independently
|
|
20
|
+
- **Use [In-Memory Transport](#in-memory-transport)** for testing FastMCP servers without subprocess or network overhead
|
|
21
|
+
- **Use [MCP JSON Configuration](#mcp-json-configuration-transport)** when you need to connect to multiple servers defined in configuration files
|
|
22
|
+
|
|
23
|
+
## STDIO Transport
|
|
24
|
+
|
|
25
|
+
STDIO (Standard Input/Output) transport communicates with MCP servers through subprocess pipes. This is the standard mechanism used by desktop clients like Claude Desktop and is the primary way to run local MCP servers.
|
|
26
|
+
|
|
27
|
+
### The Client Runs the Server
|
|
28
|
+
|
|
29
|
+
<Warning>
|
|
30
|
+
**Critical Concept**: When using STDIO transport, your client actually launches and manages the server process. This is fundamentally different from network transports where you connect to an already-running server. Understanding this relationship is key to using STDIO effectively.
|
|
31
|
+
</Warning>
|
|
32
|
+
|
|
33
|
+
With STDIO transport, your client:
|
|
34
|
+
- Starts the server as a subprocess when you connect
|
|
35
|
+
- Manages the server's lifecycle (start, stop, restart)
|
|
36
|
+
- Controls the server's environment and configuration
|
|
37
|
+
- Communicates through stdin/stdout pipes
|
|
38
|
+
|
|
39
|
+
This architecture enables powerful local integrations but requires understanding environment isolation and process management.
|
|
40
|
+
|
|
41
|
+
### Environment Isolation
|
|
42
|
+
|
|
43
|
+
STDIO servers run in isolated environments by default. This is a security feature enforced by the MCP protocol to prevent accidental exposure of sensitive data.
|
|
44
|
+
|
|
45
|
+
When your client launches an MCP server:
|
|
46
|
+
- The server does NOT inherit your shell's environment variables
|
|
47
|
+
- API keys, paths, and other configuration must be explicitly passed
|
|
48
|
+
- The working directory and system paths may differ from your shell
|
|
49
|
+
|
|
50
|
+
To pass environment variables to your server, use the `env` parameter:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from fastmcp import Client
|
|
54
|
+
|
|
55
|
+
# If your server needs environment variables (like API keys),
|
|
56
|
+
# you must explicitly pass them:
|
|
57
|
+
client = Client(
|
|
58
|
+
"my_server.py",
|
|
59
|
+
env={"API_KEY": "secret", "DEBUG": "true"}
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# This won't work - the server runs in isolation:
|
|
63
|
+
# export API_KEY="secret" # in your shell
|
|
64
|
+
# client = Client("my_server.py") # server can't see API_KEY
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Basic Usage
|
|
68
|
+
|
|
69
|
+
To use STDIO transport, you create a transport instance with the command and arguments needed to run your server:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from fastmcp.client.transports import StdioTransport
|
|
73
|
+
|
|
74
|
+
transport = StdioTransport(
|
|
75
|
+
command="python",
|
|
76
|
+
args=["my_server.py"]
|
|
77
|
+
)
|
|
78
|
+
client = Client(transport)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
You can configure additional settings like environment variables, working directory, or command arguments:
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
transport = StdioTransport(
|
|
85
|
+
command="python",
|
|
86
|
+
args=["my_server.py", "--verbose"],
|
|
87
|
+
env={"LOG_LEVEL": "DEBUG"},
|
|
88
|
+
cwd="/path/to/server"
|
|
89
|
+
)
|
|
90
|
+
client = Client(transport)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For convenience, the client can also infer STDIO transport from file paths, but this doesn't allow configuration:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from fastmcp import Client
|
|
97
|
+
|
|
98
|
+
client = Client("my_server.py") # Limited - no configuration options
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Environment Variables
|
|
102
|
+
|
|
103
|
+
Since STDIO servers don't inherit your environment, you need strategies for passing configuration. Here are two common approaches:
|
|
104
|
+
|
|
105
|
+
**Selective forwarding** passes only the variables your server actually needs:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
import os
|
|
109
|
+
from fastmcp.client.transports import StdioTransport
|
|
110
|
+
|
|
111
|
+
required_vars = ["API_KEY", "DATABASE_URL", "REDIS_HOST"]
|
|
112
|
+
env = {
|
|
113
|
+
var: os.environ[var]
|
|
114
|
+
for var in required_vars
|
|
115
|
+
if var in os.environ
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
transport = StdioTransport(
|
|
119
|
+
command="python",
|
|
120
|
+
args=["server.py"],
|
|
121
|
+
env=env
|
|
122
|
+
)
|
|
123
|
+
client = Client(transport)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Loading from .env files** keeps configuration separate from code:
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from dotenv import dotenv_values
|
|
130
|
+
from fastmcp.client.transports import StdioTransport
|
|
131
|
+
|
|
132
|
+
env = dotenv_values(".env")
|
|
133
|
+
transport = StdioTransport(
|
|
134
|
+
command="python",
|
|
135
|
+
args=["server.py"],
|
|
136
|
+
env=env
|
|
137
|
+
)
|
|
138
|
+
client = Client(transport)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Session Persistence
|
|
142
|
+
|
|
143
|
+
STDIO transports maintain sessions across multiple client contexts by default (`keep_alive=True`). This improves performance by reusing the same subprocess for multiple connections, but can be controlled when you need isolation.
|
|
144
|
+
|
|
145
|
+
By default, the subprocess persists between connections:
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
from fastmcp.client.transports import StdioTransport
|
|
149
|
+
|
|
150
|
+
transport = StdioTransport(
|
|
151
|
+
command="python",
|
|
152
|
+
args=["server.py"]
|
|
153
|
+
)
|
|
154
|
+
client = Client(transport)
|
|
155
|
+
|
|
156
|
+
async def efficient_multiple_operations():
|
|
157
|
+
async with client:
|
|
158
|
+
await client.ping()
|
|
159
|
+
|
|
160
|
+
async with client: # Reuses the same subprocess
|
|
161
|
+
await client.call_tool("process_data", {"file": "data.csv"})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
For complete isolation between connections, disable session persistence:
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
transport = StdioTransport(
|
|
168
|
+
command="python",
|
|
169
|
+
args=["server.py"],
|
|
170
|
+
keep_alive=False
|
|
171
|
+
)
|
|
172
|
+
client = Client(transport)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Use `keep_alive=False` when you need complete isolation (e.g., in test suites) or when server state could cause issues between connections.
|
|
176
|
+
|
|
177
|
+
### Specialized STDIO Transports
|
|
178
|
+
|
|
179
|
+
FastMCP provides convenience transports that are thin wrappers around `StdioTransport` with pre-configured commands:
|
|
180
|
+
|
|
181
|
+
- **`PythonStdioTransport`** - Uses `python` command for `.py` files
|
|
182
|
+
- **`NodeStdioTransport`** - Uses `node` command for `.js` files
|
|
183
|
+
- **`UvxStdioTransport`** - Uses `uvx` for Python packages (uses `env_vars` parameter)
|
|
184
|
+
- **`NpxStdioTransport`** - Uses `npx` for Node packages (uses `env_vars` parameter)
|
|
185
|
+
|
|
186
|
+
For most use cases, instantiate `StdioTransport` directly with your desired command. These specialized transports are primarily useful for client inference shortcuts.
|
|
187
|
+
|
|
188
|
+
## Remote Transports
|
|
189
|
+
|
|
190
|
+
Remote transports connect to MCP servers running as web services. This is a fundamentally different model from STDIO transports—instead of your client launching and managing a server process, you connect to an already-running service that manages its own environment and lifecycle.
|
|
191
|
+
|
|
192
|
+
### Streamable HTTP Transport
|
|
193
|
+
|
|
194
|
+
<VersionBadge version="2.3.0" />
|
|
195
|
+
|
|
196
|
+
Streamable HTTP is the recommended transport for production deployments, providing efficient bidirectional streaming over HTTP connections.
|
|
197
|
+
|
|
198
|
+
- **Class:** `StreamableHttpTransport`
|
|
199
|
+
- **Server compatibility:** FastMCP servers running with `mcp run --transport http`
|
|
200
|
+
|
|
201
|
+
The transport requires a URL and optionally supports custom headers for authentication and configuration:
|
|
202
|
+
|
|
203
|
+
```python
|
|
204
|
+
from fastmcp.client.transports import StreamableHttpTransport
|
|
205
|
+
|
|
206
|
+
# Basic connection
|
|
207
|
+
transport = StreamableHttpTransport(url="https://api.example.com/mcp")
|
|
208
|
+
client = Client(transport)
|
|
209
|
+
|
|
210
|
+
# With custom headers for authentication
|
|
211
|
+
transport = StreamableHttpTransport(
|
|
212
|
+
url="https://api.example.com/mcp",
|
|
213
|
+
headers={
|
|
214
|
+
"Authorization": "Bearer your-token-here",
|
|
215
|
+
"X-Custom-Header": "value"
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
client = Client(transport)
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
For convenience, FastMCP also provides authentication helpers:
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
from fastmcp.client.auth import BearerAuth
|
|
225
|
+
|
|
226
|
+
client = Client(
|
|
227
|
+
"https://api.example.com/mcp",
|
|
228
|
+
auth=BearerAuth("your-token-here")
|
|
229
|
+
)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### SSE Transport (Legacy)
|
|
233
|
+
|
|
234
|
+
Server-Sent Events transport is maintained for backward compatibility but is superseded by Streamable HTTP for new deployments.
|
|
235
|
+
|
|
236
|
+
- **Class:** `SSETransport`
|
|
237
|
+
- **Server compatibility:** FastMCP servers running with `mcp run --transport sse`
|
|
238
|
+
|
|
239
|
+
SSE transport supports the same configuration options as Streamable HTTP:
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
from fastmcp.client.transports import SSETransport
|
|
243
|
+
|
|
244
|
+
transport = SSETransport(
|
|
245
|
+
url="https://api.example.com/sse",
|
|
246
|
+
headers={"Authorization": "Bearer token"}
|
|
247
|
+
)
|
|
248
|
+
client = Client(transport)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Use Streamable HTTP for new deployments unless you have specific infrastructure requirements for SSE.
|
|
252
|
+
|
|
253
|
+
## In-Memory Transport
|
|
254
|
+
|
|
255
|
+
In-memory transport connects directly to a FastMCP server instance within the same Python process. This eliminates both subprocess management and network overhead, making it ideal for testing and development.
|
|
256
|
+
|
|
257
|
+
- **Class:** `FastMCPTransport`
|
|
258
|
+
|
|
259
|
+
<Note>
|
|
260
|
+
Unlike STDIO transports, in-memory servers have full access to your Python process's environment. They share the same memory space and environment variables as your client code—no isolation or explicit environment passing required.
|
|
261
|
+
</Note>
|
|
262
|
+
|
|
263
|
+
```python
|
|
264
|
+
from fastmcp import FastMCP, Client
|
|
265
|
+
import os
|
|
266
|
+
|
|
267
|
+
mcp = FastMCP("TestServer")
|
|
268
|
+
|
|
269
|
+
@mcp.tool
|
|
270
|
+
def greet(name: str) -> str:
|
|
271
|
+
prefix = os.environ.get("GREETING_PREFIX", "Hello")
|
|
272
|
+
return f"{prefix}, {name}!"
|
|
273
|
+
|
|
274
|
+
client = Client(mcp)
|
|
275
|
+
|
|
276
|
+
async with client:
|
|
277
|
+
result = await client.call_tool("greet", {"name": "World"})
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## MCP JSON Configuration Transport
|
|
281
|
+
|
|
282
|
+
<VersionBadge version="2.4.0" />
|
|
283
|
+
|
|
284
|
+
This transport supports the emerging MCP JSON configuration standard for defining multiple servers:
|
|
285
|
+
|
|
286
|
+
- **Class:** `MCPConfigTransport`
|
|
287
|
+
|
|
288
|
+
```python
|
|
289
|
+
config = {
|
|
290
|
+
"mcpServers": {
|
|
291
|
+
"weather": {
|
|
292
|
+
"url": "https://weather.example.com/mcp",
|
|
293
|
+
"transport": "http"
|
|
294
|
+
},
|
|
295
|
+
"assistant": {
|
|
296
|
+
"command": "python",
|
|
297
|
+
"args": ["./assistant.py"],
|
|
298
|
+
"env": {"LOG_LEVEL": "INFO"}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
client = Client(config)
|
|
304
|
+
|
|
305
|
+
async with client:
|
|
306
|
+
# Tools are namespaced by server
|
|
307
|
+
weather = await client.call_tool("weather_get_forecast", {"city": "NYC"})
|
|
308
|
+
answer = await client.call_tool("assistant_ask", {"question": "What?"})
|
|
309
|
+
```
|
|
310
|
+
|
|
@@ -62,7 +62,11 @@
|
|
|
62
62
|
{
|
|
63
63
|
"group": "Servers",
|
|
64
64
|
"pages": [
|
|
65
|
-
|
|
65
|
+
{
|
|
66
|
+
"group": "Essentials",
|
|
67
|
+
"icon": "cube",
|
|
68
|
+
"pages": ["servers/server", "deployment/running-server"]
|
|
69
|
+
},
|
|
66
70
|
{
|
|
67
71
|
"group": "Core Components",
|
|
68
72
|
"icon": "toolbox",
|
|
@@ -77,32 +81,30 @@
|
|
|
77
81
|
"icon": "stars",
|
|
78
82
|
"pages": [
|
|
79
83
|
"servers/context",
|
|
84
|
+
"servers/proxy",
|
|
85
|
+
"servers/composition",
|
|
80
86
|
"servers/elicitation",
|
|
81
87
|
"servers/logging",
|
|
82
88
|
"servers/progress",
|
|
83
|
-
"servers/sampling"
|
|
89
|
+
"servers/sampling",
|
|
90
|
+
"servers/middleware"
|
|
84
91
|
]
|
|
85
92
|
},
|
|
86
93
|
{
|
|
87
94
|
"group": "Authentication",
|
|
88
95
|
"icon": "shield-check",
|
|
89
96
|
"pages": ["servers/auth/bearer"]
|
|
90
|
-
},
|
|
91
|
-
"servers/middleware",
|
|
92
|
-
"servers/openapi",
|
|
93
|
-
"servers/proxy",
|
|
94
|
-
"servers/composition",
|
|
95
|
-
{
|
|
96
|
-
"group": "Deployment",
|
|
97
|
-
"icon": "upload",
|
|
98
|
-
"pages": ["deployment/running-server", "deployment/asgi"]
|
|
99
97
|
}
|
|
100
98
|
]
|
|
101
99
|
},
|
|
102
100
|
{
|
|
103
101
|
"group": "Clients",
|
|
104
102
|
"pages": [
|
|
105
|
-
|
|
103
|
+
{
|
|
104
|
+
"group": "Essentials",
|
|
105
|
+
"icon": "cube",
|
|
106
|
+
"pages": ["clients/client", "clients/transports"]
|
|
107
|
+
},
|
|
106
108
|
{
|
|
107
109
|
"group": "Core Operations",
|
|
108
110
|
"icon": "handshake",
|
|
@@ -124,7 +126,6 @@
|
|
|
124
126
|
"clients/roots"
|
|
125
127
|
]
|
|
126
128
|
},
|
|
127
|
-
"clients/transports",
|
|
128
129
|
{
|
|
129
130
|
"group": "Authentication",
|
|
130
131
|
"icon": "user-shield",
|
|
@@ -141,9 +142,12 @@
|
|
|
141
142
|
"integrations/claude-desktop",
|
|
142
143
|
"integrations/cursor",
|
|
143
144
|
"integrations/eunomia-authorization",
|
|
145
|
+
"integrations/fastapi",
|
|
144
146
|
"integrations/gemini",
|
|
145
147
|
"integrations/mcp-json-configuration",
|
|
146
|
-
"integrations/openai"
|
|
148
|
+
"integrations/openai",
|
|
149
|
+
"integrations/openapi",
|
|
150
|
+
"integrations/starlette"
|
|
147
151
|
]
|
|
148
152
|
},
|
|
149
153
|
{
|