fastmcp 2.9.0__tar.gz → 2.9.2__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.9.0 → fastmcp-2.9.2}/CLAUDE.md +1 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/PKG-INFO +2 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/changelog.mdx +97 -0
- fastmcp-2.9.2/docs/clients/messages.mdx +129 -0
- fastmcp-2.9.0/docs/style.css → fastmcp-2.9.2/docs/css/banner.css +0 -52
- fastmcp-2.9.2/docs/css/python-sdk.css +3 -0
- fastmcp-2.9.2/docs/css/style.css +13 -0
- fastmcp-2.9.2/docs/css/version-badge.css +39 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/docs.json +17 -19
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-cli-claude.mdx +2 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-cli-cli.mdx +18 -17
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-cli-run.mdx +6 -6
- fastmcp-2.9.2/docs/python-sdk/fastmcp-client-auth-bearer.mdx +18 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-client-auth-oauth.mdx +9 -9
- fastmcp-2.9.2/docs/python-sdk/fastmcp-client-client.mdx +94 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-client-logging.mdx +1 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-client-oauth_callback.mdx +5 -5
- fastmcp-2.9.2/docs/python-sdk/fastmcp-client-roots.mdx +20 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-client-sampling.mdx +1 -1
- fastmcp-2.9.2/docs/python-sdk/fastmcp-client-transports.mdx +192 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-exceptions.mdx +65 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-prompts-prompt.mdx +7 -7
- fastmcp-2.9.2/docs/python-sdk/fastmcp-prompts-prompt_manager.mdx +43 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-resources-resource.mdx +8 -8
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-resources-resource_manager.mdx +7 -7
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-resources-template.mdx +11 -11
- fastmcp-2.9.2/docs/python-sdk/fastmcp-resources-types.mdx +83 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-auth-auth.mdx +10 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx +6 -6
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-auth-providers-bearer_env.mdx +22 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-auth-providers-in_memory.mdx +1 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-context.mdx +8 -8
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-dependencies.mdx +3 -3
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-http.mdx +8 -8
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-middleware-__init__.mdx +8 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-middleware-error_handling.mdx +40 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-middleware-logging.mdx +29 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-middleware-middleware.mdx +56 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-middleware-rate_limiting.mdx +47 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-middleware-timing.mdx +29 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-openapi.mdx +58 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-server-proxy.mdx +101 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-server.mdx +177 -90
- fastmcp-2.9.2/docs/python-sdk/fastmcp-settings.mdx +59 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-tools-tool.mdx +9 -9
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-tools-tool_manager.mdx +5 -5
- fastmcp-2.9.2/docs/python-sdk/fastmcp-tools-tool_transform.mdx +139 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-utilities-cache.mdx +30 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-utilities-components.mdx +52 -0
- fastmcp-2.9.2/docs/python-sdk/fastmcp-utilities-exceptions.mdx +20 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-utilities-http.mdx +1 -1
- fastmcp-2.9.2/docs/python-sdk/fastmcp-utilities-inspect.mdx +41 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-utilities-json_schema.mdx +1 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-utilities-logging.mdx +2 -2
- fastmcp-2.9.2/docs/python-sdk/fastmcp-utilities-mcp_config.mdx +50 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-utilities-openapi.mdx +11 -11
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-utilities-tests.mdx +3 -3
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-utilities-types.mdx +11 -11
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/context.mdx +19 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/prompts.mdx +22 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/resources.mdx +23 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/tools.mdx +22 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/updates.mdx +16 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/README.md +11 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/demo.py +32 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/_atproto/__init__.py +2 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/_atproto/_posts.py +102 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/server.py +26 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/types.py +21 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/mount_example.py +13 -9
- {fastmcp-2.9.0 → fastmcp-2.9.2}/pyproject.toml +1 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/client.py +2 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/logging.py +1 -2
- fastmcp-2.9.2/src/fastmcp/client/messages.py +126 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/prompts/prompt.py +18 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/prompts/prompt_manager.py +2 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/resources/resource.py +16 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/resources/resource_manager.py +4 -4
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/resources/template.py +17 -1
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/auth/providers/bearer.py +38 -11
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/context.py +72 -8
- fastmcp-2.9.2/src/fastmcp/server/low_level.py +35 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/server.py +134 -46
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/tools/tool.py +16 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/tools/tool_manager.py +2 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/tools/tool_transform.py +42 -16
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/openapi.py +70 -2
- fastmcp-2.9.2/tests/client/test_notifications.py +422 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/prompts/test_prompt_manager.py +2 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/resources/test_resource_template.py +2 -2
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/openapi/test_openapi_path_parameters.py +28 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/tools/test_tool_manager.py +5 -5
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/openapi/test_openapi_advanced.py +49 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/uv.lock +1 -1
- fastmcp-2.9.0/docs/python-sdk/fastmcp-client-auth-bearer.mdx +0 -18
- fastmcp-2.9.0/docs/python-sdk/fastmcp-client-client.mdx +0 -94
- fastmcp-2.9.0/docs/python-sdk/fastmcp-client-roots.mdx +0 -20
- fastmcp-2.9.0/docs/python-sdk/fastmcp-client-transports.mdx +0 -191
- fastmcp-2.9.0/docs/python-sdk/fastmcp-exceptions.mdx +0 -65
- fastmcp-2.9.0/docs/python-sdk/fastmcp-prompts-prompt_manager.mdx +0 -43
- fastmcp-2.9.0/docs/python-sdk/fastmcp-resources-types.mdx +0 -83
- fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-auth.mdx +0 -10
- fastmcp-2.9.0/docs/python-sdk/fastmcp-server-auth-providers-bearer_env.mdx +0 -22
- fastmcp-2.9.0/docs/python-sdk/fastmcp-server-openapi.mdx +0 -58
- fastmcp-2.9.0/docs/python-sdk/fastmcp-server-proxy.mdx +0 -101
- fastmcp-2.9.0/docs/python-sdk/fastmcp-settings.mdx +0 -59
- fastmcp-2.9.0/docs/python-sdk/fastmcp-tools-tool_transform.mdx +0 -117
- fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-cache.mdx +0 -30
- fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-components.mdx +0 -52
- fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-exceptions.mdx +0 -20
- fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-inspect.mdx +0 -41
- fastmcp-2.9.0/docs/python-sdk/fastmcp-utilities-mcp_config.mdx +0 -50
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.cursor/rules/core-mcp-objects.mdc +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/ISSUE_TEMPLATE/enhancement.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/dependabot.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/labeler.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/release.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/workflows/labeler.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/workflows/publish.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/workflows/run-static.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.github/workflows/run-tests.yml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.gitignore +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/.pre-commit-config.yaml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/AGENTS.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/LICENSE +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/README.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/Windows_Notes.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/.cursor/rules/mintlify.mdc +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/assets/demo-inspector.png +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/assets/favicon.ico +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/assets/images/tutorial-rest-api-result.png +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/assets/logo.png +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/assets/updates/release-2-7.png +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/auth/bearer.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/auth/oauth.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/client.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/logging.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/progress.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/prompts.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/resources.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/roots.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/sampling.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/tools.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/clients/transports.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/community/README.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/community/showcase.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/deployment/asgi.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/deployment/running-server.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/getting-started/installation.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/getting-started/quickstart.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/getting-started/welcome.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/integrations/anthropic.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/integrations/chatgpt.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/integrations/claude-code.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/integrations/claude-desktop.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/integrations/contrib.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/integrations/gemini.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/integrations/openai.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/patterns/cli.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/patterns/decorating-methods.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/patterns/http-requests.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/patterns/testing.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/patterns/tool-transformation.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-cli-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-client-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-client-auth-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-client-progress.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-prompts-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-resources-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-auth-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-auth-providers-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-server-middleware.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-tools-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/python-sdk/fastmcp-utilities-__init__.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/auth/bearer.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/composition.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/middleware.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/openapi.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/proxy.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/servers/server.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/snippets/version-badge.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/snippets/youtube-embed.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/tutorials/create-mcp-server.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/tutorials/mcp.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/docs/tutorials/rest-api.mdx +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/pyproject.toml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/__main__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/_atproto/_client.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/_atproto/_profile.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/_atproto/_read.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/_atproto/_social.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/py.typed +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/atproto_mcp/src/atproto_mcp/settings.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/complex_inputs.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/config_server.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/desktop.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/echo.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/get_file.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/in_memory_proxy_example.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/memory.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/sampling.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/screenshot.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/serializer.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/simple_echo.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/README.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/pyproject.toml +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/__main__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/hub.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/lights/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/lights/hue_utils.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/lights/server.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/py.typed +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/src/smart_home/settings.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/smart_home/uv.lock +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/tags_example.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/examples/text_me.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/justfile +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/cli/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/cli/claude.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/cli/cli.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/cli/run.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/auth/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/auth/bearer.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/auth/oauth.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/oauth_callback.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/progress.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/roots.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/sampling.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/client/transports.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/README.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/bulk_tool_caller/README.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/bulk_tool_caller/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/bulk_tool_caller/example.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/mcp_mixin/README.md +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/mcp_mixin/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/mcp_mixin/example.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/exceptions.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/prompts/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/py.typed +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/resources/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/resources/types.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/auth/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/auth/auth.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/auth/providers/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/auth/providers/bearer_env.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/auth/providers/in_memory.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/dependencies.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/http.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/middleware/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/middleware/error_handling.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/middleware/logging.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/middleware/middleware.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/middleware/rate_limiting.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/middleware/timing.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/openapi.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/server/proxy.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/settings.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/tools/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/cache.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/components.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/exceptions.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/http.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/inspect.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/json_schema.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/logging.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/mcp_config.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/tests.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/src/fastmcp/utilities/types.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/auth/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/auth/providers/test_bearer.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/auth/providers/test_bearer_env.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/auth/test_oauth_client.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/cli/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/cli/test_cli.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/cli/test_run.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_client.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_logs.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_openapi.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_progress.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_roots.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_sampling.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_sse.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_stdio.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/client/test_streamable_http.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/conftest.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/contrib/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/contrib/test_bulk_tool_caller.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/contrib/test_mcp_mixin.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/deprecated/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/deprecated/test_deprecated.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/deprecated/test_mount_import_arg_order.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/deprecated/test_mount_separators.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/deprecated/test_resource_prefixes.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/deprecated/test_route_type_ignore.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/deprecated/test_settings.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/prompts/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/prompts/test_prompt.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/resources/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/resources/test_file_resources.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/resources/test_function_resources.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/resources/test_resource_manager.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/resources/test_resources.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/http/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/http/test_custom_routes.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/http/test_http_dependencies.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/http/test_http_middleware.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/middleware/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/middleware/test_error_handling.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/middleware/test_logging.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/middleware/test_middleware.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/middleware/test_rate_limiting.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/middleware/test_timing.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/openapi/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/openapi/test_openapi.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/openapi/test_route_map_fn.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_app_state.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_auth_integration.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_context.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_file_server.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_import_server.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_logging.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_mount.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_proxy.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_resource_prefix_formats.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_run_server.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_server.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_server_interactions.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_tool_annotations.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/server/test_tool_exclude_args.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/test_examples.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/test_servers/fastmcp_server.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/test_servers/sse.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/test_servers/stdio.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/tools/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/tools/test_tool.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/tools/test_tool_transform.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/openapi/__init__.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/openapi/conftest.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/openapi/test_openapi.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/openapi/test_openapi_fastapi.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_cache.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_inspect.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_json_schema.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_logging.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_mcp_config.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_tests.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_typeadapter.py +0 -0
- {fastmcp-2.9.0 → fastmcp-2.9.2}/tests/utilities/test_types.py +0 -0
|
@@ -34,3 +34,4 @@ async with Client(transport=StreamableHttpTransport(server_url)) as client:
|
|
|
34
34
|
- You must always run pre-commit if you open a PR, because it is run as part of a required check.
|
|
35
35
|
- When opening PRs, apply labels appropriately for bugs/breaking changes/enhancements/features. Generally, improvements are enhancements (not features) unless told otherwise.
|
|
36
36
|
- NEVER modify files in docs/python-sdk/**, as they are auto-generated.
|
|
37
|
+
- Use # type: ignore[attr-defined] in unit tests when accessing an MCP result of indeterminate type instead of asserting its type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastmcp
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.2
|
|
4
4
|
Summary: The fast, Pythonic way to build MCP servers.
|
|
5
5
|
Project-URL: Homepage, https://gofastmcp.com
|
|
6
6
|
Project-URL: Repository, https://github.com/jlowin/fastmcp
|
|
@@ -20,7 +20,7 @@ Requires-Python: >=3.10
|
|
|
20
20
|
Requires-Dist: authlib>=1.5.2
|
|
21
21
|
Requires-Dist: exceptiongroup>=1.2.2
|
|
22
22
|
Requires-Dist: httpx>=0.28.1
|
|
23
|
-
Requires-Dist: mcp<
|
|
23
|
+
Requires-Dist: mcp<1.10.0,>=1.9.4
|
|
24
24
|
Requires-Dist: openapi-pydantic>=0.5.1
|
|
25
25
|
Requires-Dist: python-dotenv>=1.1.0
|
|
26
26
|
Requires-Dist: rich>=13.9.4
|
|
@@ -2,6 +2,103 @@
|
|
|
2
2
|
icon: "list-check"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
<Update label="v2.9.0" description="2024-06-23">
|
|
6
|
+
|
|
7
|
+
## [v2.9.0: Stuck in the Middleware With You](https://github.com/jlowin/fastmcp/releases/tag/v2.9.0)
|
|
8
|
+
|
|
9
|
+
FastMCP 2.9 introduces two important features that push beyond the basic MCP protocol: MCP Middleware and server-side type conversion.
|
|
10
|
+
|
|
11
|
+
### MCP Middleware
|
|
12
|
+
MCP middleware lets you intercept and modify requests and responses at the protocol level, giving you powerful capabilities for logging, authentication, validation, and more. This is particularly useful for building production-ready MCP servers that need sophisticated request handling.
|
|
13
|
+
|
|
14
|
+
### Server-side Type Conversion
|
|
15
|
+
This release also introduces server-side type conversion for prompt arguments, ensuring that data is properly formatted before being passed to your functions. This reduces the burden on individual tools and prompts to handle type validation and conversion.
|
|
16
|
+
|
|
17
|
+
## What's Changed
|
|
18
|
+
### New Features 🎉
|
|
19
|
+
* Add File utility for binary data by [@gorocode](https://github.com/gorocode) in [#843](https://github.com/jlowin/fastmcp/pull/843)
|
|
20
|
+
* Consolidate prefix logic into FastMCP methods by [@jlowin](https://github.com/jlowin) in [#861](https://github.com/jlowin/fastmcp/pull/861)
|
|
21
|
+
* Add MCP Middleware by [@jlowin](https://github.com/jlowin) in [#870](https://github.com/jlowin/fastmcp/pull/870)
|
|
22
|
+
* Implement server-side type conversion for prompt arguments by [@jlowin](https://github.com/jlowin) in [#908](https://github.com/jlowin/fastmcp/pull/908)
|
|
23
|
+
### Enhancements 🔧
|
|
24
|
+
* Fix tool description indentation issue by [@zfflxx](https://github.com/zfflxx) in [#845](https://github.com/jlowin/fastmcp/pull/845)
|
|
25
|
+
* Add version parameter to FastMCP constructor by [@mkyutani](https://github.com/mkyutani) in [#842](https://github.com/jlowin/fastmcp/pull/842)
|
|
26
|
+
* Update version to not be positional by [@jlowin](https://github.com/jlowin) in [#848](https://github.com/jlowin/fastmcp/pull/848)
|
|
27
|
+
* Add key to component by [@jlowin](https://github.com/jlowin) in [#869](https://github.com/jlowin/fastmcp/pull/869)
|
|
28
|
+
* Add session_id property to Context for data sharing by [@jlowin](https://github.com/jlowin) in [#881](https://github.com/jlowin/fastmcp/pull/881)
|
|
29
|
+
* Fix CORS documentation example by [@jlowin](https://github.com/jlowin) in [#895](https://github.com/jlowin/fastmcp/pull/895)
|
|
30
|
+
### Fixes 🐞
|
|
31
|
+
* "report_progress missing passing related_request_id causes notifications not working" by [@alexsee](https://github.com/alexsee) in [#838](https://github.com/jlowin/fastmcp/pull/838)
|
|
32
|
+
* Fix JWT issuer validation to support string values per RFC 7519 by [@jlowin](https://github.com/jlowin) in [#892](https://github.com/jlowin/fastmcp/pull/892)
|
|
33
|
+
* Fix BearerAuthProvider audience type annotations by [@jlowin](https://github.com/jlowin) in [#894](https://github.com/jlowin/fastmcp/pull/894)
|
|
34
|
+
### Docs 📚
|
|
35
|
+
* Add CLAUDE.md development guidelines by [@jlowin](https://github.com/jlowin) in [#880](https://github.com/jlowin/fastmcp/pull/880)
|
|
36
|
+
* Update context docs for session_id property by [@jlowin](https://github.com/jlowin) in [#882](https://github.com/jlowin/fastmcp/pull/882)
|
|
37
|
+
* Add API reference by [@zzstoatzz](https://github.com/zzstoatzz) in [#893](https://github.com/jlowin/fastmcp/pull/893)
|
|
38
|
+
* Fix API ref rendering by [@zzstoatzz](https://github.com/zzstoatzz) in [#900](https://github.com/jlowin/fastmcp/pull/900)
|
|
39
|
+
* Simplify docs nav by [@jlowin](https://github.com/jlowin) in [#902](https://github.com/jlowin/fastmcp/pull/902)
|
|
40
|
+
* Add fastmcp inspect command by [@jlowin](https://github.com/jlowin) in [#904](https://github.com/jlowin/fastmcp/pull/904)
|
|
41
|
+
* Update client docs by [@jlowin](https://github.com/jlowin) in [#912](https://github.com/jlowin/fastmcp/pull/912)
|
|
42
|
+
* Update docs nav by [@jlowin](https://github.com/jlowin) in [#913](https://github.com/jlowin/fastmcp/pull/913)
|
|
43
|
+
* Update integration documentation for Claude Desktop, ChatGPT, and Claude Code by [@jlowin](https://github.com/jlowin) in [#915](https://github.com/jlowin/fastmcp/pull/915)
|
|
44
|
+
* Add http as an alias for streamable http by [@jlowin](https://github.com/jlowin) in [#917](https://github.com/jlowin/fastmcp/pull/917)
|
|
45
|
+
* Clean up parameter documentation by [@jlowin](https://github.com/jlowin) in [#918](https://github.com/jlowin/fastmcp/pull/918)
|
|
46
|
+
* Add middleware examples for timing, logging, rate limiting, and error handling by [@jlowin](https://github.com/jlowin) in [#919](https://github.com/jlowin/fastmcp/pull/919)
|
|
47
|
+
* ControlFlow → FastMCP rename by [@jlowin](https://github.com/jlowin) in [#922](https://github.com/jlowin/fastmcp/pull/922)
|
|
48
|
+
### Examples & Contrib 💡
|
|
49
|
+
* Add contrib.mcp_mixin support for annotations by [@rsp2k](https://github.com/rsp2k) in [#860](https://github.com/jlowin/fastmcp/pull/860)
|
|
50
|
+
* Add ATProto (Bluesky) MCP Server Example by [@zzstoatzz](https://github.com/zzstoatzz) in [#916](https://github.com/jlowin/fastmcp/pull/916)
|
|
51
|
+
* Fix path in atproto example pyproject by [@zzstoatzz](https://github.com/zzstoatzz) in [#920](https://github.com/jlowin/fastmcp/pull/920)
|
|
52
|
+
* Remove uv source in example by [@zzstoatzz](https://github.com/zzstoatzz) in [#921](https://github.com/jlowin/fastmcp/pull/921)
|
|
53
|
+
|
|
54
|
+
## New Contributors
|
|
55
|
+
* [@alexsee](https://github.com/alexsee) made their first contribution in [#838](https://github.com/jlowin/fastmcp/pull/838)
|
|
56
|
+
* [@zfflxx](https://github.com/zfflxx) made their first contribution in [#845](https://github.com/jlowin/fastmcp/pull/845)
|
|
57
|
+
* [@mkyutani](https://github.com/mkyutani) made their first contribution in [#842](https://github.com/jlowin/fastmcp/pull/842)
|
|
58
|
+
* [@gorocode](https://github.com/gorocode) made their first contribution in [#843](https://github.com/jlowin/fastmcp/pull/843)
|
|
59
|
+
* [@rsp2k](https://github.com/rsp2k) made their first contribution in [#860](https://github.com/jlowin/fastmcp/pull/860)
|
|
60
|
+
* [@owtaylor](https://github.com/owtaylor) made their first contribution in [#897](https://github.com/jlowin/fastmcp/pull/897)
|
|
61
|
+
* [@Jason-CKY](https://github.com/Jason-CKY) made their first contribution in [#906](https://github.com/jlowin/fastmcp/pull/906)
|
|
62
|
+
|
|
63
|
+
**Full Changelog**: [v2.8.1...v2.9.0](https://github.com/jlowin/fastmcp/compare/v2.8.1...v2.9.0)
|
|
64
|
+
|
|
65
|
+
</Update>
|
|
66
|
+
|
|
67
|
+
<Update label="v2.8.1" description="2024-06-15">
|
|
68
|
+
|
|
69
|
+
## [v2.8.1: Sound Judgement](https://github.com/jlowin/fastmcp/releases/tag/v2.8.1)
|
|
70
|
+
|
|
71
|
+
2.8.1 introduces audio support, as well as minor fixes and updates for deprecated features.
|
|
72
|
+
|
|
73
|
+
### Audio Support
|
|
74
|
+
This release adds support for audio content in MCP tools and resources, expanding FastMCP's multimedia capabilities beyond text and images.
|
|
75
|
+
|
|
76
|
+
## What's Changed
|
|
77
|
+
### New Features 🎉
|
|
78
|
+
* Add audio support by [@jlowin](https://github.com/jlowin) in [#833](https://github.com/jlowin/fastmcp/pull/833)
|
|
79
|
+
### Enhancements 🔧
|
|
80
|
+
* Add flag for disabling deprecation warnings by [@jlowin](https://github.com/jlowin) in [#802](https://github.com/jlowin/fastmcp/pull/802)
|
|
81
|
+
* Add examples to Tool Arg Param transformation by [@strawgate](https://github.com/strawgate) in [#806](https://github.com/jlowin/fastmcp/pull/806)
|
|
82
|
+
### Fixes 🐞
|
|
83
|
+
* Restore .settings access as deprecated by [@jlowin](https://github.com/jlowin) in [#800](https://github.com/jlowin/fastmcp/pull/800)
|
|
84
|
+
* Ensure handling of false http kwargs correctly; removed unused kwarg by [@jlowin](https://github.com/jlowin) in [#804](https://github.com/jlowin/fastmcp/pull/804)
|
|
85
|
+
* Bump mcp 1.9.4 by [@jlowin](https://github.com/jlowin) in [#835](https://github.com/jlowin/fastmcp/pull/835)
|
|
86
|
+
### Docs 📚
|
|
87
|
+
* Update changelog for 2.8.0 by [@jlowin](https://github.com/jlowin) in [#794](https://github.com/jlowin/fastmcp/pull/794)
|
|
88
|
+
* Update welcome docs by [@jlowin](https://github.com/jlowin) in [#808](https://github.com/jlowin/fastmcp/pull/808)
|
|
89
|
+
* Update headers in docs by [@jlowin](https://github.com/jlowin) in [#809](https://github.com/jlowin/fastmcp/pull/809)
|
|
90
|
+
* Add MCP group to tutorials by [@jlowin](https://github.com/jlowin) in [#810](https://github.com/jlowin/fastmcp/pull/810)
|
|
91
|
+
* Add Community section to documentation by [@zzstoatzz](https://github.com/zzstoatzz) in [#819](https://github.com/jlowin/fastmcp/pull/819)
|
|
92
|
+
* Add 2.8 update by [@jlowin](https://github.com/jlowin) in [#821](https://github.com/jlowin/fastmcp/pull/821)
|
|
93
|
+
* Embed YouTube videos in community showcase by [@zzstoatzz](https://github.com/zzstoatzz) in [#820](https://github.com/jlowin/fastmcp/pull/820)
|
|
94
|
+
### Other Changes 🦾
|
|
95
|
+
* Ensure http args are passed through by [@jlowin](https://github.com/jlowin) in [#803](https://github.com/jlowin/fastmcp/pull/803)
|
|
96
|
+
* Fix install link in readme by [@jlowin](https://github.com/jlowin) in [#836](https://github.com/jlowin/fastmcp/pull/836)
|
|
97
|
+
|
|
98
|
+
**Full Changelog**: [v2.8.0...v2.8.1](https://github.com/jlowin/fastmcp/compare/v2.8.0...v2.8.1)
|
|
99
|
+
|
|
100
|
+
</Update>
|
|
101
|
+
|
|
5
102
|
<Update label="v2.8.0" description="2024-06-10">
|
|
6
103
|
|
|
7
104
|
## [v2.8.0: Transform and Roll Out](https://github.com/jlowin/fastmcp/releases/tag/v2.8.0)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Message Handling
|
|
3
|
+
sidebarTitle: Messages
|
|
4
|
+
description: Handle MCP messages, requests, and notifications with custom message handlers.
|
|
5
|
+
icon: envelope
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
import { VersionBadge } from "/snippets/version-badge.mdx";
|
|
9
|
+
|
|
10
|
+
<VersionBadge version="2.9.1" />
|
|
11
|
+
|
|
12
|
+
MCP clients can receive various types of messages from servers, including requests that need responses and notifications that don't. The message handler provides a unified way to process all these messages.
|
|
13
|
+
|
|
14
|
+
## Function-Based Handler
|
|
15
|
+
|
|
16
|
+
The simplest way to handle messages is with a function that receives all messages:
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from fastmcp import Client
|
|
20
|
+
|
|
21
|
+
async def message_handler(message):
|
|
22
|
+
"""Handle all MCP messages from the server."""
|
|
23
|
+
if hasattr(message, 'root'):
|
|
24
|
+
method = message.root.method
|
|
25
|
+
print(f"Received: {method}")
|
|
26
|
+
|
|
27
|
+
# Handle specific notifications
|
|
28
|
+
if method == "notifications/tools/list_changed":
|
|
29
|
+
print("Tools have changed - might want to refresh tool cache")
|
|
30
|
+
elif method == "notifications/resources/list_changed":
|
|
31
|
+
print("Resources have changed")
|
|
32
|
+
|
|
33
|
+
client = Client(
|
|
34
|
+
"my_mcp_server.py",
|
|
35
|
+
message_handler=message_handler,
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Message Handler Class
|
|
40
|
+
|
|
41
|
+
For fine-grained targeting, FastMCP provides a `MessageHandler` class you can subclass to take advantage of specific hooks:
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from fastmcp import Client
|
|
45
|
+
from fastmcp.client.messages import MessageHandler
|
|
46
|
+
import mcp.types
|
|
47
|
+
|
|
48
|
+
class MyMessageHandler(MessageHandler):
|
|
49
|
+
async def on_tool_list_changed(
|
|
50
|
+
self, notification: mcp.types.ToolListChangedNotification
|
|
51
|
+
) -> None:
|
|
52
|
+
"""Handle tool list changes specifically."""
|
|
53
|
+
print("Tool list changed - refreshing available tools")
|
|
54
|
+
|
|
55
|
+
client = Client(
|
|
56
|
+
"my_mcp_server.py",
|
|
57
|
+
message_handler=MyMessageHandler(),
|
|
58
|
+
)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Available Handler Methods
|
|
62
|
+
|
|
63
|
+
All handler methods receive a single argument - the specific message type:
|
|
64
|
+
|
|
65
|
+
<Card icon="code" title="Message Handler Methods">
|
|
66
|
+
<ResponseField name="on_message(message)" type="Any MCP message">
|
|
67
|
+
Called for ALL messages (requests and notifications)
|
|
68
|
+
</ResponseField>
|
|
69
|
+
|
|
70
|
+
<ResponseField name="on_request(request)" type="mcp.types.ClientRequest">
|
|
71
|
+
Called for requests that expect responses
|
|
72
|
+
</ResponseField>
|
|
73
|
+
|
|
74
|
+
<ResponseField name="on_notification(notification)" type="mcp.types.ServerNotification">
|
|
75
|
+
Called for notifications (fire-and-forget)
|
|
76
|
+
</ResponseField>
|
|
77
|
+
|
|
78
|
+
<ResponseField name="on_tool_list_changed(notification)" type="mcp.types.ToolListChangedNotification">
|
|
79
|
+
Called when the server's tool list changes
|
|
80
|
+
</ResponseField>
|
|
81
|
+
|
|
82
|
+
<ResponseField name="on_resource_list_changed(notification)" type="mcp.types.ResourceListChangedNotification">
|
|
83
|
+
Called when the server's resource list changes
|
|
84
|
+
</ResponseField>
|
|
85
|
+
|
|
86
|
+
<ResponseField name="on_prompt_list_changed(notification)" type="mcp.types.PromptListChangedNotification">
|
|
87
|
+
Called when the server's prompt list changes
|
|
88
|
+
</ResponseField>
|
|
89
|
+
|
|
90
|
+
<ResponseField name="on_progress(notification)" type="mcp.types.ProgressNotification">
|
|
91
|
+
Called for progress updates during long-running operations
|
|
92
|
+
</ResponseField>
|
|
93
|
+
|
|
94
|
+
<ResponseField name="on_logging_message(notification)" type="mcp.types.LoggingMessageNotification">
|
|
95
|
+
Called for log messages from the server
|
|
96
|
+
</ResponseField>
|
|
97
|
+
</Card>
|
|
98
|
+
|
|
99
|
+
## Example: Handling Tool Changes
|
|
100
|
+
|
|
101
|
+
Here's a practical example of handling tool list changes:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from fastmcp.client.messages import MessageHandler
|
|
105
|
+
import mcp.types
|
|
106
|
+
|
|
107
|
+
class ToolCacheHandler(MessageHandler):
|
|
108
|
+
def __init__(self):
|
|
109
|
+
self.cached_tools = []
|
|
110
|
+
|
|
111
|
+
async def on_tool_list_changed(
|
|
112
|
+
self, notification: mcp.types.ToolListChangedNotification
|
|
113
|
+
) -> None:
|
|
114
|
+
"""Clear tool cache when tools change."""
|
|
115
|
+
print("Tools changed - clearing cache")
|
|
116
|
+
self.cached_tools = [] # Force refresh on next access
|
|
117
|
+
|
|
118
|
+
client = Client("server.py", message_handler=ToolCacheHandler())
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Handling Requests
|
|
122
|
+
|
|
123
|
+
While the message handler receives server-initiated requests, for most use cases you should use the dedicated callback parameters instead:
|
|
124
|
+
|
|
125
|
+
- **Sampling requests**: Use [`sampling_handler`](/clients/sampling)
|
|
126
|
+
- **Progress requests**: Use [`progress_handler`](/clients/progress)
|
|
127
|
+
- **Log requests**: Use [`log_handler`](/clients/logging)
|
|
128
|
+
|
|
129
|
+
The message handler is primarily for monitoring and handling notifications rather than responding to requests.
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/* Code highlighting -- target only inline code elements, not code blocks */
|
|
2
|
-
p code:not(pre code),
|
|
3
|
-
table code:not(pre code),
|
|
4
|
-
li code:not(pre code),
|
|
5
|
-
h1 code:not(pre code),
|
|
6
|
-
h2 code:not(pre code),
|
|
7
|
-
h3 code:not(pre code),
|
|
8
|
-
h4 code:not(pre code),
|
|
9
|
-
h5 code:not(pre code),
|
|
10
|
-
h6 code:not(pre code) {
|
|
11
|
-
color: #f72585 !important;
|
|
12
|
-
background-color: rgba(247, 37, 133, 0.09);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
1
|
/* Banner styling -- improve readability with better contrast */
|
|
16
2
|
#banner {
|
|
17
3
|
background: #f1f5f9 !important;
|
|
@@ -79,41 +65,3 @@ h6 code:not(pre code) {
|
|
|
79
65
|
color: #f1f5f9 !important;
|
|
80
66
|
}
|
|
81
67
|
|
|
82
|
-
/* Version badge -- display a badge with the current version of the documentation */
|
|
83
|
-
.version-badge {
|
|
84
|
-
display: inline-block;
|
|
85
|
-
align-items: center;
|
|
86
|
-
gap: 0.3em;
|
|
87
|
-
font-size: 1em;
|
|
88
|
-
margin-top: 0px;
|
|
89
|
-
margin-bottom: 0px;
|
|
90
|
-
padding-top: 6px;
|
|
91
|
-
padding-bottom: 6px;
|
|
92
|
-
padding-left: 20px;
|
|
93
|
-
padding-right: 20px;
|
|
94
|
-
font-family: "Inter", sans-serif;
|
|
95
|
-
color: #ff5400;
|
|
96
|
-
background: #fef2f2;
|
|
97
|
-
border: 1px solid rgba(220, 38, 38, 0.3);
|
|
98
|
-
border-radius: 12px;
|
|
99
|
-
box-shadow: none;
|
|
100
|
-
vertical-align: middle;
|
|
101
|
-
position: relative;
|
|
102
|
-
transition: box-shadow 0.2s, transform 0.15s;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.version-badge-container {
|
|
106
|
-
margin: 0;
|
|
107
|
-
padding: 0;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.version-badge:hover {
|
|
111
|
-
box-shadow: 0 2px 8px 0 rgba(160, 132, 252, 0.1);
|
|
112
|
-
transform: translateY(-1px) scale(1.03);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.dark .version-badge {
|
|
116
|
-
color: #f1f5f9;
|
|
117
|
-
background: #334155;
|
|
118
|
-
border: 1px solid #64748b;
|
|
119
|
-
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* Code highlighting -- target only inline code elements, not code blocks */
|
|
2
|
+
p code:not(pre code),
|
|
3
|
+
table code:not(pre code),
|
|
4
|
+
li code:not(pre code),
|
|
5
|
+
h1 code:not(pre code),
|
|
6
|
+
h2 code:not(pre code),
|
|
7
|
+
h3 code:not(pre code),
|
|
8
|
+
h4 code:not(pre code),
|
|
9
|
+
h5 code:not(pre code),
|
|
10
|
+
h6 code:not(pre code) {
|
|
11
|
+
color: #f72585 !important;
|
|
12
|
+
background-color: rgba(247, 37, 133, 0.09);
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* Version badge -- display a badge with the current version of the documentation */
|
|
2
|
+
.version-badge {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 0.3em;
|
|
6
|
+
font-size: 1em;
|
|
7
|
+
margin-top: 0px;
|
|
8
|
+
margin-bottom: 0px;
|
|
9
|
+
padding-top: 6px;
|
|
10
|
+
padding-bottom: 6px;
|
|
11
|
+
padding-left: 20px;
|
|
12
|
+
padding-right: 20px;
|
|
13
|
+
font-family: "Inter", sans-serif;
|
|
14
|
+
color: #ff5400;
|
|
15
|
+
background: #fef2f2;
|
|
16
|
+
border: 1px solid rgba(220, 38, 38, 0.3);
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
box-shadow: none;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
position: relative;
|
|
21
|
+
transition: box-shadow 0.2s, transform 0.15s;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.version-badge-container {
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.version-badge:hover {
|
|
30
|
+
box-shadow: 0 2px 8px 0 rgba(160, 132, 252, 0.1);
|
|
31
|
+
transform: translateY(-1px) scale(1.03);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dark .version-badge {
|
|
35
|
+
color: #f1f5f9;
|
|
36
|
+
background: #334155;
|
|
37
|
+
border: 1px solid #64748b;
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -76,9 +76,7 @@
|
|
|
76
76
|
{
|
|
77
77
|
"group": "Authentication",
|
|
78
78
|
"icon": "shield-check",
|
|
79
|
-
"pages": [
|
|
80
|
-
"servers/auth/bearer"
|
|
81
|
-
]
|
|
79
|
+
"pages": ["servers/auth/bearer"]
|
|
82
80
|
},
|
|
83
81
|
"servers/middleware",
|
|
84
82
|
"servers/openapi",
|
|
@@ -87,10 +85,7 @@
|
|
|
87
85
|
{
|
|
88
86
|
"group": "Deployment",
|
|
89
87
|
"icon": "upload",
|
|
90
|
-
"pages": [
|
|
91
|
-
"deployment/running-server",
|
|
92
|
-
"deployment/asgi"
|
|
93
|
-
]
|
|
88
|
+
"pages": ["deployment/running-server", "deployment/asgi"]
|
|
94
89
|
}
|
|
95
90
|
]
|
|
96
91
|
},
|
|
@@ -114,6 +109,7 @@
|
|
|
114
109
|
"clients/logging",
|
|
115
110
|
"clients/progress",
|
|
116
111
|
"clients/sampling",
|
|
112
|
+
"clients/messages",
|
|
117
113
|
"clients/roots"
|
|
118
114
|
]
|
|
119
115
|
},
|
|
@@ -121,10 +117,7 @@
|
|
|
121
117
|
{
|
|
122
118
|
"group": "Authentication",
|
|
123
119
|
"icon": "user-shield",
|
|
124
|
-
"pages": [
|
|
125
|
-
"clients/auth/oauth",
|
|
126
|
-
"clients/auth/bearer"
|
|
127
|
-
]
|
|
120
|
+
"pages": ["clients/auth/oauth", "clients/auth/bearer"]
|
|
128
121
|
}
|
|
129
122
|
]
|
|
130
123
|
},
|
|
@@ -163,17 +156,12 @@
|
|
|
163
156
|
},
|
|
164
157
|
{
|
|
165
158
|
"anchor": "What's New",
|
|
166
|
-
"pages": [
|
|
167
|
-
"updates",
|
|
168
|
-
"changelog"
|
|
169
|
-
]
|
|
159
|
+
"pages": ["updates", "changelog"]
|
|
170
160
|
},
|
|
171
161
|
{
|
|
172
162
|
"anchor": "Community",
|
|
173
163
|
"icon": "users",
|
|
174
|
-
"pages": [
|
|
175
|
-
"community/showcase"
|
|
176
|
-
]
|
|
164
|
+
"pages": ["community/showcase"]
|
|
177
165
|
}
|
|
178
166
|
]
|
|
179
167
|
},
|
|
@@ -257,7 +245,17 @@
|
|
|
257
245
|
"python-sdk/fastmcp-server-context",
|
|
258
246
|
"python-sdk/fastmcp-server-dependencies",
|
|
259
247
|
"python-sdk/fastmcp-server-http",
|
|
260
|
-
|
|
248
|
+
{
|
|
249
|
+
"group": "middleware",
|
|
250
|
+
"pages": [
|
|
251
|
+
"python-sdk/fastmcp-server-middleware-__init__",
|
|
252
|
+
"python-sdk/fastmcp-server-middleware-error_handling",
|
|
253
|
+
"python-sdk/fastmcp-server-middleware-logging",
|
|
254
|
+
"python-sdk/fastmcp-server-middleware-middleware",
|
|
255
|
+
"python-sdk/fastmcp-server-middleware-rate_limiting",
|
|
256
|
+
"python-sdk/fastmcp-server-middleware-timing"
|
|
257
|
+
]
|
|
258
|
+
},
|
|
261
259
|
"python-sdk/fastmcp-server-openapi",
|
|
262
260
|
"python-sdk/fastmcp-server-proxy",
|
|
263
261
|
"python-sdk/fastmcp-server-server"
|
|
@@ -10,7 +10,7 @@ Claude app integration utilities.
|
|
|
10
10
|
|
|
11
11
|
## Functions
|
|
12
12
|
|
|
13
|
-
### `get_claude_config_path`
|
|
13
|
+
### `get_claude_config_path` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/claude.py#L14"><Icon icon="github" size="14" /></a></sup>
|
|
14
14
|
|
|
15
15
|
```python
|
|
16
16
|
get_claude_config_path() -> Path | None
|
|
@@ -20,7 +20,7 @@ get_claude_config_path() -> Path | None
|
|
|
20
20
|
Get the Claude config directory based on platform.
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
### `update_claude_config`
|
|
23
|
+
### `update_claude_config` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/claude.py#L32"><Icon icon="github" size="14" /></a></sup>
|
|
24
24
|
|
|
25
25
|
```python
|
|
26
26
|
update_claude_config(file_spec: str, server_name: str) -> bool
|
|
@@ -10,13 +10,13 @@ FastMCP CLI tools.
|
|
|
10
10
|
|
|
11
11
|
## Functions
|
|
12
12
|
|
|
13
|
-
### `version`
|
|
13
|
+
### `version` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L87"><Icon icon="github" size="14" /></a></sup>
|
|
14
14
|
|
|
15
15
|
```python
|
|
16
16
|
version(ctx: Context)
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
### `dev`
|
|
19
|
+
### `dev` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L110"><Icon icon="github" size="14" /></a></sup>
|
|
20
20
|
|
|
21
21
|
```python
|
|
22
22
|
dev(server_spec: str = typer.Argument(..., help='Python file to run, optionally with :object suffix'), with_editable: Annotated[Path | None, typer.Option('--with-editable', '-e', help='Directory containing pyproject.toml to install in editable mode', exists=True, file_okay=False, resolve_path=True)] = None, with_packages: Annotated[list[str], typer.Option('--with', help='Additional packages to install')] = [], inspector_version: Annotated[str | None, typer.Option('--inspector-version', help='Version of the MCP Inspector to use')] = None, ui_port: Annotated[int | None, typer.Option('--ui-port', help='Port for the MCP Inspector UI')] = None, server_port: Annotated[int | None, typer.Option('--server-port', help='Port for the MCP Inspector Proxy server')] = None) -> None
|
|
@@ -26,10 +26,10 @@ dev(server_spec: str = typer.Argument(..., help='Python file to run, optionally
|
|
|
26
26
|
Run a MCP server with the MCP Inspector.
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
### `run`
|
|
29
|
+
### `run` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L227"><Icon icon="github" size="14" /></a></sup>
|
|
30
30
|
|
|
31
31
|
```python
|
|
32
|
-
run(ctx: typer.Context, server_spec: str = typer.Argument(..., help='Python file, object specification (file:obj), or URL'), transport: Annotated[str | None, typer.Option('--transport', '-t', help='Transport protocol to use (stdio,
|
|
32
|
+
run(ctx: typer.Context, server_spec: str = typer.Argument(..., help='Python file, object specification (file:obj), or URL'), transport: Annotated[str | None, typer.Option('--transport', '-t', help='Transport protocol to use (stdio, http, or sse)')] = None, host: Annotated[str | None, typer.Option('--host', help='Host to bind to when using http transport (default: 127.0.0.1)')] = None, port: Annotated[int | None, typer.Option('--port', '-p', help='Port to bind to when using http transport (default: 8000)')] = None, log_level: Annotated[str | None, typer.Option('--log-level', '-l', help='Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)')] = None) -> None
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
|
|
@@ -51,7 +51,7 @@ Server arguments can be passed after -- :
|
|
|
51
51
|
fastmcp run server.py -- --config config.json --debug
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
### `install`
|
|
54
|
+
### `install` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L313"><Icon icon="github" size="14" /></a></sup>
|
|
55
55
|
|
|
56
56
|
```python
|
|
57
57
|
install(server_spec: str = typer.Argument(..., help='Python file to run, optionally with :object suffix'), server_name: Annotated[str | None, typer.Option('--name', '-n', help="Custom name for the server (defaults to server's name attribute or file name)")] = None, with_editable: Annotated[Path | None, typer.Option('--with-editable', '-e', help='Directory containing pyproject.toml to install in editable mode', exists=True, file_okay=False, resolve_path=True)] = None, with_packages: Annotated[list[str], typer.Option('--with', help='Additional packages to install')] = [], env_vars: Annotated[list[str], typer.Option('--env-var', '-v', help='Environment variables in KEY=VALUE format')] = [], env_file: Annotated[Path | None, typer.Option('--env-file', '-f', help='Load environment variables from a .env file', exists=True, file_okay=True, dir_okay=False, resolve_path=True)] = None) -> None
|
|
@@ -64,7 +64,7 @@ Environment variables are preserved once added and only updated if new values
|
|
|
64
64
|
are explicitly provided.
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
### `inspect`
|
|
67
|
+
### `inspect` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L444"><Icon icon="github" size="14" /></a></sup>
|
|
68
68
|
|
|
69
69
|
```python
|
|
70
70
|
inspect(server_spec: str = typer.Argument(..., help='Python file to inspect, optionally with :object suffix'), output: Annotated[Path, typer.Option('--output', '-o', help='Output file path for the JSON report (default: server-info.json)')] = Path('server-info.json')) -> None
|
|
@@ -73,14 +73,15 @@ inspect(server_spec: str = typer.Argument(..., help='Python file to inspect, opt
|
|
|
73
73
|
|
|
74
74
|
Inspect a FastMCP server and generate a JSON report.
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
76
|
+
This command analyzes a FastMCP server (v1.x or v2.x) and generates
|
|
77
|
+
a comprehensive JSON report containing information about the server's
|
|
78
|
+
name, instructions, version, tools, prompts, resources, templates,
|
|
79
|
+
and capabilities.
|
|
80
|
+
|
|
81
|
+
**Examples:**
|
|
82
|
+
|
|
83
|
+
fastmcp inspect server.py
|
|
84
|
+
fastmcp inspect server.py -o report.json
|
|
85
|
+
fastmcp inspect server.py:mcp -o analysis.json
|
|
86
|
+
fastmcp inspect path/to/server.py:app -o /tmp/server-info.json
|
|
87
|
+
|
|
@@ -10,7 +10,7 @@ FastMCP run command implementation.
|
|
|
10
10
|
|
|
11
11
|
## Functions
|
|
12
12
|
|
|
13
|
-
### `is_url`
|
|
13
|
+
### `is_url` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L14"><Icon icon="github" size="14" /></a></sup>
|
|
14
14
|
|
|
15
15
|
```python
|
|
16
16
|
is_url(path: str) -> bool
|
|
@@ -20,7 +20,7 @@ is_url(path: str) -> bool
|
|
|
20
20
|
Check if a string is a URL.
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
### `parse_file_path`
|
|
23
|
+
### `parse_file_path` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L20"><Icon icon="github" size="14" /></a></sup>
|
|
24
24
|
|
|
25
25
|
```python
|
|
26
26
|
parse_file_path(server_spec: str) -> tuple[Path, str | None]
|
|
@@ -36,7 +36,7 @@ Parse a file path that may include a server object specification.
|
|
|
36
36
|
- Tuple of (file_path, server_object)
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
### `import_server`
|
|
39
|
+
### `import_server` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L51"><Icon icon="github" size="14" /></a></sup>
|
|
40
40
|
|
|
41
41
|
```python
|
|
42
42
|
import_server(file: Path, server_object: str | None = None) -> Any
|
|
@@ -53,7 +53,7 @@ Import a MCP server from a file.
|
|
|
53
53
|
- The server object
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
### `create_client_server`
|
|
56
|
+
### `create_client_server` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L121"><Icon icon="github" size="14" /></a></sup>
|
|
57
57
|
|
|
58
58
|
```python
|
|
59
59
|
create_client_server(url: str) -> Any
|
|
@@ -69,7 +69,7 @@ Create a FastMCP server from a client URL.
|
|
|
69
69
|
- A FastMCP server instance
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
### `import_server_with_args`
|
|
72
|
+
### `import_server_with_args` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L141"><Icon icon="github" size="14" /></a></sup>
|
|
73
73
|
|
|
74
74
|
```python
|
|
75
75
|
import_server_with_args(file: Path, server_object: str | None = None, server_args: list[str] | None = None) -> Any
|
|
@@ -87,7 +87,7 @@ Import a server with optional command line arguments.
|
|
|
87
87
|
- The imported server object
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
### `run_command`
|
|
90
|
+
### `run_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/run.py#L165"><Icon icon="github" size="14" /></a></sup>
|
|
91
91
|
|
|
92
92
|
```python
|
|
93
93
|
run_command(server_spec: str, transport: str | None = None, host: str | None = None, port: int | None = None, log_level: str | None = None, server_args: list[str] | None = None) -> None
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: bearer
|
|
3
|
+
sidebarTitle: bearer
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `fastmcp.client.auth.bearer`
|
|
7
|
+
|
|
8
|
+
## Classes
|
|
9
|
+
|
|
10
|
+
### `BearerAuth` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/bearer.py#L11"><Icon icon="github" size="14" /></a></sup>
|
|
11
|
+
|
|
12
|
+
**Methods:**
|
|
13
|
+
|
|
14
|
+
#### `auth_flow` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/bearer.py#L15"><Icon icon="github" size="14" /></a></sup>
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
auth_flow(self, request)
|
|
18
|
+
```
|