fastmcp-slim 3.3.0b1__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_slim-3.3.0b1/.gitignore +80 -0
- fastmcp_slim-3.3.0b1/PKG-INFO +208 -0
- fastmcp_slim-3.3.0b1/README.md +120 -0
- fastmcp_slim-3.3.0b1/fastmcp/__init__.py +117 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/__init__.py +18 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/app.py +427 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/approval.py +198 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/choice.py +141 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/config.py +177 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/file_upload.py +405 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/form.py +229 -0
- fastmcp_slim-3.3.0b1/fastmcp/apps/generative.py +199 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/__init__.py +3 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/__main__.py +5 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/apps_dev.py +1825 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/auth.py +13 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/cimd.py +218 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/cli.py +1116 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/client.py +986 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/discovery.py +375 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/generate.py +806 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/__init__.py +26 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/claude_code.py +242 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/claude_desktop.py +232 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/cursor.py +321 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/gemini_cli.py +239 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/goose.py +208 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/mcp_json.py +191 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/shared.py +195 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/install/stdio.py +156 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/run.py +489 -0
- fastmcp_slim-3.3.0b1/fastmcp/cli/tasks.py +110 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/__init__.py +36 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/auth/__init__.py +4 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/auth/bearer.py +17 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/auth/oauth.py +430 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/client.py +911 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/dependencies.py +20 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/elicitation.py +88 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/logging.py +54 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/messages.py +128 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/mixins/__init__.py +13 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/mixins/prompts.py +325 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/mixins/resources.py +382 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/mixins/task_management.py +157 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/mixins/tools.py +476 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/oauth_callback.py +251 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/progress.py +41 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/roots.py +78 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/sampling/__init__.py +71 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/__init__.py +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/anthropic.py +449 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/google_genai.py +403 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/sampling/handlers/openai.py +513 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/tasks.py +584 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/telemetry.py +57 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/__init__.py +36 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/base.py +82 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/config.py +224 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/http.py +220 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/inference.py +170 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/memory.py +115 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/sse.py +158 -0
- fastmcp_slim-3.3.0b1/fastmcp/client/transports/stdio.py +567 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/README.md +19 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/README.md +35 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/__init__.py +3 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py +151 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/bulk_tool_caller/example.py +17 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/README.md +164 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/__init__.py +3 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/component_manager.py +121 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/component_manager/example.py +59 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/README.md +147 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/__init__.py +8 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/example.py +52 -0
- fastmcp_slim-3.3.0b1/fastmcp/contrib/mcp_mixin/mcp_mixin.py +321 -0
- fastmcp_slim-3.3.0b1/fastmcp/decorators.py +41 -0
- fastmcp_slim-3.3.0b1/fastmcp/dependencies.py +40 -0
- fastmcp_slim-3.3.0b1/fastmcp/exceptions.py +63 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/__init__.py +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/sampling/__init__.py +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/sampling/handlers/__init__.py +5 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/sampling/handlers/openai.py +5 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/server/openapi/__init__.py +42 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/transforms/__init__.py +1 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/transforms/code_mode.py +573 -0
- fastmcp_slim-3.3.0b1/fastmcp/experimental/utilities/openapi/__init__.py +37 -0
- fastmcp_slim-3.3.0b1/fastmcp/mcp_config.py +383 -0
- fastmcp_slim-3.3.0b1/fastmcp/prompts/__init__.py +20 -0
- fastmcp_slim-3.3.0b1/fastmcp/prompts/base.py +440 -0
- fastmcp_slim-3.3.0b1/fastmcp/prompts/function_prompt.py +515 -0
- fastmcp_slim-3.3.0b1/fastmcp/py.typed +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/resources/__init__.py +32 -0
- fastmcp_slim-3.3.0b1/fastmcp/resources/base.py +497 -0
- fastmcp_slim-3.3.0b1/fastmcp/resources/function_resource.py +343 -0
- fastmcp_slim-3.3.0b1/fastmcp/resources/template.py +673 -0
- fastmcp_slim-3.3.0b1/fastmcp/resources/types.py +188 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/__init__.py +19 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/app.py +19 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/apps.py +22 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/__init__.py +75 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/auth.py +848 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/authorization.py +182 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/cimd.py +797 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/handlers/__init__.py +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/handlers/authorize.py +326 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/jwt_issuer.py +283 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/middleware.py +96 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/__init__.py +14 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/consent.py +560 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/models.py +261 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/proxy.py +2201 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/oauth_proxy/ui.py +300 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/oidc_proxy.py +498 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/__init__.py +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/auth0.py +137 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/aws.py +231 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/azure.py +860 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/clerk.py +390 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/debug.py +114 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/descope.py +209 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/discord.py +290 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/github.py +305 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/google.py +367 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/in_memory.py +366 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/introspection.py +305 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/jwt.py +616 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/keycloak.py +74 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/oci.py +189 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/propelauth.py +234 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/scalekit.py +212 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/supabase.py +181 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/providers/workos.py +430 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/redirect_validation.py +248 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/auth/ssrf.py +356 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/context.py +1457 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/dependencies.py +1385 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/elicitation.py +508 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/event_store.py +177 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/http.py +406 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/lifespan.py +198 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/low_level.py +351 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/__init__.py +15 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/authorization.py +321 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/caching.py +590 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/dereference.py +78 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/error_handling.py +226 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/logging.py +256 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/middleware.py +205 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/ping.py +73 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/rate_limiting.py +231 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/response_limiting.py +137 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/timing.py +156 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/middleware/tool_injection.py +141 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/mixins/__init__.py +7 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/mixins/lifespan.py +299 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/mixins/mcp_operations.py +373 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/mixins/transport.py +369 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/openapi/__init__.py +57 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/openapi/components.py +30 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/openapi/routing.py +48 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/openapi/server.py +125 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/__init__.py +71 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/addressing.py +69 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/aggregate.py +308 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/base.py +627 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/fastmcp_provider.py +731 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/filesystem.py +225 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/filesystem_discovery.py +390 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/__init__.py +11 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/__init__.py +15 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/prompts.py +258 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/resources.py +242 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/decorators/tools.py +423 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/local_provider/local_provider.py +465 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/README.md +266 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/__init__.py +39 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/components.py +421 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/provider.py +436 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/openapi/routing.py +109 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/prefab_synthesis.py +247 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/proxy.py +1110 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/__init__.py +59 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/_common.py +107 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/claude_provider.py +44 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/directory_provider.py +153 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/skill_provider.py +449 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/skills/vendor_providers.py +142 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/providers/wrapped_provider.py +148 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/proxy.py +43 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/sampling/__init__.py +10 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/sampling/run.py +747 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/sampling/sampling_tool.py +204 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/server.py +2480 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/__init__.py +38 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/capabilities.py +44 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/config.py +147 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/context.py +334 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/elicitation.py +347 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/handlers.py +231 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/keys.py +165 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/notifications.py +308 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/requests.py +477 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/routing.py +76 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/tasks/subscriptions.py +222 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/telemetry.py +148 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/__init__.py +240 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/catalog.py +245 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/namespace.py +193 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/prompts_as_tools.py +169 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/resources_as_tools.py +180 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/__init__.py +31 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/base.py +269 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/bm25.py +144 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/search/regex.py +55 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/tool_transform.py +96 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/version_filter.py +148 -0
- fastmcp_slim-3.3.0b1/fastmcp/server/transforms/visibility.py +526 -0
- fastmcp_slim-3.3.0b1/fastmcp/settings.py +381 -0
- fastmcp_slim-3.3.0b1/fastmcp/telemetry.py +122 -0
- fastmcp_slim-3.3.0b1/fastmcp/tools/__init__.py +20 -0
- fastmcp_slim-3.3.0b1/fastmcp/tools/base.py +612 -0
- fastmcp_slim-3.3.0b1/fastmcp/tools/function_parsing.py +313 -0
- fastmcp_slim-3.3.0b1/fastmcp/tools/function_tool.py +548 -0
- fastmcp_slim-3.3.0b1/fastmcp/tools/tool_transform.py +1028 -0
- fastmcp_slim-3.3.0b1/fastmcp/types.py +32 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/__init__.py +1 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/async_utils.py +82 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/auth.py +91 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/cli.py +268 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/components.py +262 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/docstring_parsing.py +65 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/exceptions.py +49 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/http.py +8 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/inspect.py +494 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/json_schema.py +671 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/json_schema_type.py +796 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/lifespan.py +56 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/logging.py +244 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/__init__.py +25 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/__init__.py +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/environments/__init__.py +6 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/environments/base.py +29 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/environments/uv.py +271 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py +447 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/schema.json +365 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/sources/__init__.py +0 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/sources/base.py +29 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py +217 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/mime.py +27 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/README.md +211 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/__init__.py +61 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/director.py +375 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/formatters.py +355 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/json_schema_converter.py +346 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/models.py +88 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/parser.py +825 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/openapi/schemas.py +607 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/pagination.py +80 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/skills.py +257 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/tests.py +274 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/timeout.py +47 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/token_cache.py +173 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/types.py +499 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/ui.py +626 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/version_check.py +153 -0
- fastmcp_slim-3.3.0b1/fastmcp/utilities/versions.py +333 -0
- fastmcp_slim-3.3.0b1/pyproject.toml +117 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
wheels/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
*.egg
|
|
10
|
+
MANIFEST
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.loq_cache
|
|
13
|
+
.coverage
|
|
14
|
+
htmlcov/
|
|
15
|
+
.tox/
|
|
16
|
+
nosetests.xml
|
|
17
|
+
coverage.xml
|
|
18
|
+
*.cover
|
|
19
|
+
|
|
20
|
+
# Virtual environments
|
|
21
|
+
.venv
|
|
22
|
+
venv/
|
|
23
|
+
env/
|
|
24
|
+
ENV/
|
|
25
|
+
.env
|
|
26
|
+
|
|
27
|
+
# System files
|
|
28
|
+
.DS_Store
|
|
29
|
+
|
|
30
|
+
# Version file
|
|
31
|
+
src/fastmcp/_version.py
|
|
32
|
+
|
|
33
|
+
# Editors and IDEs
|
|
34
|
+
.cursorrules
|
|
35
|
+
.vscode/
|
|
36
|
+
.idea/
|
|
37
|
+
*.swp
|
|
38
|
+
*.swo
|
|
39
|
+
*~
|
|
40
|
+
.project
|
|
41
|
+
.pydevproject
|
|
42
|
+
.settings/
|
|
43
|
+
|
|
44
|
+
# Jupyter Notebook
|
|
45
|
+
.ipynb_checkpoints
|
|
46
|
+
|
|
47
|
+
# Type checking
|
|
48
|
+
.mypy_cache/
|
|
49
|
+
.dmypy.json
|
|
50
|
+
dmypy.json
|
|
51
|
+
.pyre/
|
|
52
|
+
.pytype/
|
|
53
|
+
|
|
54
|
+
# Local development
|
|
55
|
+
.python-version
|
|
56
|
+
.envrc
|
|
57
|
+
.envrc.private
|
|
58
|
+
.direnv/
|
|
59
|
+
|
|
60
|
+
# Logs and databases
|
|
61
|
+
*.log
|
|
62
|
+
*.sqlite
|
|
63
|
+
*.db
|
|
64
|
+
*.ddb
|
|
65
|
+
|
|
66
|
+
# Claude worktree management
|
|
67
|
+
.claude-wt/worktrees
|
|
68
|
+
.claude/worktrees/
|
|
69
|
+
|
|
70
|
+
# Agents
|
|
71
|
+
/PLAN.md
|
|
72
|
+
/TODO.md
|
|
73
|
+
/STATUS.md
|
|
74
|
+
plans/
|
|
75
|
+
|
|
76
|
+
# Common FastMCP test files
|
|
77
|
+
/test.py
|
|
78
|
+
/server.py
|
|
79
|
+
/client.py
|
|
80
|
+
/test.json
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fastmcp-slim
|
|
3
|
+
Version: 3.3.0b1
|
|
4
|
+
Summary: The dependency-slim FastMCP package.
|
|
5
|
+
Project-URL: Homepage, https://gofastmcp.com
|
|
6
|
+
Project-URL: Repository, https://github.com/PrefectHQ/fastmcp
|
|
7
|
+
Project-URL: Documentation, https://gofastmcp.com
|
|
8
|
+
Author: Jeremiah Lowin
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
Keywords: agent,fastmcp,llm,mcp,mcp client,mcp server,model context protocol
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: platformdirs>=4.0.0
|
|
21
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
|
22
|
+
Requires-Dist: pydantic[email]>=2.11.7
|
|
23
|
+
Requires-Dist: python-dotenv>=1.1.0
|
|
24
|
+
Requires-Dist: rich>=13.9.4
|
|
25
|
+
Requires-Dist: typing-extensions>=4.0.0
|
|
26
|
+
Provides-Extra: anthropic
|
|
27
|
+
Requires-Dist: anthropic>=0.48.0; extra == 'anthropic'
|
|
28
|
+
Provides-Extra: apps
|
|
29
|
+
Requires-Dist: prefab-ui>=0.18.0; extra == 'apps'
|
|
30
|
+
Provides-Extra: azure
|
|
31
|
+
Requires-Dist: azure-identity>=1.16.0; extra == 'azure'
|
|
32
|
+
Requires-Dist: pyjwt>=2.12.0; extra == 'azure'
|
|
33
|
+
Provides-Extra: client
|
|
34
|
+
Requires-Dist: authlib>=1.6.11; extra == 'client'
|
|
35
|
+
Requires-Dist: exceptiongroup>=1.2.2; extra == 'client'
|
|
36
|
+
Requires-Dist: httpx<1.0,>=0.28.1; extra == 'client'
|
|
37
|
+
Requires-Dist: mcp<2.0,>=1.24.0; extra == 'client'
|
|
38
|
+
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'client'
|
|
39
|
+
Requires-Dist: py-key-value-aio[filetree,keyring,memory]<0.5.0,>=0.4.4; extra == 'client'
|
|
40
|
+
Provides-Extra: code-mode
|
|
41
|
+
Requires-Dist: pydantic-monty==0.0.16; extra == 'code-mode'
|
|
42
|
+
Provides-Extra: full
|
|
43
|
+
Requires-Dist: authlib>=1.6.11; extra == 'full'
|
|
44
|
+
Requires-Dist: cyclopts>=4.0.0; extra == 'full'
|
|
45
|
+
Requires-Dist: exceptiongroup>=1.2.2; extra == 'full'
|
|
46
|
+
Requires-Dist: griffelib>=2.0.0; extra == 'full'
|
|
47
|
+
Requires-Dist: httpx<1.0,>=0.28.1; extra == 'full'
|
|
48
|
+
Requires-Dist: jsonref>=1.1.0; extra == 'full'
|
|
49
|
+
Requires-Dist: jsonschema-path>=0.3.4; extra == 'full'
|
|
50
|
+
Requires-Dist: mcp<2.0,>=1.24.0; extra == 'full'
|
|
51
|
+
Requires-Dist: openapi-pydantic>=0.5.1; extra == 'full'
|
|
52
|
+
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'full'
|
|
53
|
+
Requires-Dist: packaging>=24.0; extra == 'full'
|
|
54
|
+
Requires-Dist: py-key-value-aio[filetree,keyring,memory]<0.5.0,>=0.4.4; extra == 'full'
|
|
55
|
+
Requires-Dist: pyperclip>=1.9.0; extra == 'full'
|
|
56
|
+
Requires-Dist: python-multipart>=0.0.26; extra == 'full'
|
|
57
|
+
Requires-Dist: pyyaml<7.0,>=6.0; extra == 'full'
|
|
58
|
+
Requires-Dist: uncalled-for>=0.2.0; extra == 'full'
|
|
59
|
+
Requires-Dist: uvicorn>=0.35; extra == 'full'
|
|
60
|
+
Requires-Dist: watchfiles>=1.0.0; extra == 'full'
|
|
61
|
+
Requires-Dist: websockets>=15.0.1; extra == 'full'
|
|
62
|
+
Provides-Extra: gemini
|
|
63
|
+
Requires-Dist: google-genai>=1.18.0; extra == 'gemini'
|
|
64
|
+
Requires-Dist: jsonref>=1.1.0; extra == 'gemini'
|
|
65
|
+
Provides-Extra: openai
|
|
66
|
+
Requires-Dist: openai>=1.102.0; extra == 'openai'
|
|
67
|
+
Provides-Extra: server
|
|
68
|
+
Requires-Dist: authlib>=1.6.11; extra == 'server'
|
|
69
|
+
Requires-Dist: exceptiongroup>=1.2.2; extra == 'server'
|
|
70
|
+
Requires-Dist: griffelib>=2.0.0; extra == 'server'
|
|
71
|
+
Requires-Dist: httpx<1.0,>=0.28.1; extra == 'server'
|
|
72
|
+
Requires-Dist: jsonref>=1.1.0; extra == 'server'
|
|
73
|
+
Requires-Dist: jsonschema-path>=0.3.4; extra == 'server'
|
|
74
|
+
Requires-Dist: mcp<2.0,>=1.24.0; extra == 'server'
|
|
75
|
+
Requires-Dist: openapi-pydantic>=0.5.1; extra == 'server'
|
|
76
|
+
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'server'
|
|
77
|
+
Requires-Dist: packaging>=24.0; extra == 'server'
|
|
78
|
+
Requires-Dist: py-key-value-aio[filetree,keyring,memory]<0.5.0,>=0.4.4; extra == 'server'
|
|
79
|
+
Requires-Dist: python-multipart>=0.0.26; extra == 'server'
|
|
80
|
+
Requires-Dist: pyyaml<7.0,>=6.0; extra == 'server'
|
|
81
|
+
Requires-Dist: uncalled-for>=0.2.0; extra == 'server'
|
|
82
|
+
Requires-Dist: uvicorn>=0.35; extra == 'server'
|
|
83
|
+
Requires-Dist: watchfiles>=1.0.0; extra == 'server'
|
|
84
|
+
Requires-Dist: websockets>=15.0.1; extra == 'server'
|
|
85
|
+
Provides-Extra: tasks
|
|
86
|
+
Requires-Dist: pydocket>=0.20.0; extra == 'tasks'
|
|
87
|
+
Description-Content-Type: text/markdown
|
|
88
|
+
|
|
89
|
+
<div align="center">
|
|
90
|
+
|
|
91
|
+
<!-- omit in toc -->
|
|
92
|
+
|
|
93
|
+
<picture>
|
|
94
|
+
<source width="550" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4-dark.png">
|
|
95
|
+
<source width="550" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4.png">
|
|
96
|
+
<img width="550" alt="FastMCP Logo" src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-2.png">
|
|
97
|
+
</picture>
|
|
98
|
+
|
|
99
|
+
# FastMCP 🚀
|
|
100
|
+
|
|
101
|
+
<strong>Move fast and make things.</strong>
|
|
102
|
+
|
|
103
|
+
*Made with 💙 by [Prefect](https://www.prefect.io/)*
|
|
104
|
+
|
|
105
|
+
[](https://gofastmcp.com)
|
|
106
|
+
[](https://discord.gg/uu8dJCgttd)
|
|
107
|
+
[](https://pypi.org/project/fastmcp)
|
|
108
|
+
[](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml)
|
|
109
|
+
[](https://github.com/PrefectHQ/fastmcp/blob/main/LICENSE)
|
|
110
|
+
|
|
111
|
+
<a href="https://trendshift.io/repositories/13266" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13266" alt="prefecthq%2Ffastmcp | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) connects LLMs to tools and data. FastMCP gives you everything you need to go from prototype to production:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from fastmcp import FastMCP
|
|
120
|
+
|
|
121
|
+
mcp = FastMCP("Demo 🚀")
|
|
122
|
+
|
|
123
|
+
@mcp.tool
|
|
124
|
+
def add(a: int, b: int) -> int:
|
|
125
|
+
"""Add two numbers"""
|
|
126
|
+
return a + b
|
|
127
|
+
|
|
128
|
+
if __name__ == "__main__":
|
|
129
|
+
mcp.run()
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Why FastMCP
|
|
133
|
+
|
|
134
|
+
Building an effective MCP application is harder than it looks. FastMCP handles all of it. Declare a tool with a Python function, and the schema, validation, and documentation are generated automatically. Connect to a server with a URL, and transport negotiation, authentication, and protocol lifecycle are managed for you. You focus on your logic, and the MCP part just works: **with FastMCP, best practices are built in.**
|
|
135
|
+
|
|
136
|
+
**That's why FastMCP is the standard framework for working with MCP.** FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024. Today, the actively maintained standalone project is downloaded a million times a day, and some version of FastMCP powers 70% of MCP servers across all languages.
|
|
137
|
+
|
|
138
|
+
FastMCP has three pillars:
|
|
139
|
+
|
|
140
|
+
<table>
|
|
141
|
+
<tr>
|
|
142
|
+
<td align="center" valign="top" width="33%">
|
|
143
|
+
<a href="https://gofastmcp.com/servers/server">
|
|
144
|
+
<img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/servers-card.png" alt="Servers" />
|
|
145
|
+
<br /><strong>Servers</strong>
|
|
146
|
+
</a>
|
|
147
|
+
<br />Expose tools, resources, and prompts to LLMs.
|
|
148
|
+
</td>
|
|
149
|
+
<td align="center" valign="top" width="33%">
|
|
150
|
+
<a href="https://gofastmcp.com/apps/overview">
|
|
151
|
+
<img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/apps-card.png" alt="Apps" />
|
|
152
|
+
<br /><strong>Apps</strong>
|
|
153
|
+
</a>
|
|
154
|
+
<br />Give your tools interactive UIs rendered directly in the conversation.
|
|
155
|
+
</td>
|
|
156
|
+
<td align="center" valign="top" width="33%">
|
|
157
|
+
<a href="https://gofastmcp.com/clients/client">
|
|
158
|
+
<img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/clients-card.png" alt="Clients" />
|
|
159
|
+
<br /><strong>Clients</strong>
|
|
160
|
+
</a>
|
|
161
|
+
<br />Connect to any MCP server — local or remote, programmatic or CLI.
|
|
162
|
+
</td>
|
|
163
|
+
</tr>
|
|
164
|
+
</table>
|
|
165
|
+
|
|
166
|
+
**[Servers](https://gofastmcp.com/servers/server)** wrap your Python functions into MCP-compliant tools, resources, and prompts. **[Clients](https://gofastmcp.com/clients/client)** connect to any server with full protocol support. And **[Apps](https://gofastmcp.com/apps/overview)** give your tools interactive UIs rendered directly in the conversation.
|
|
167
|
+
|
|
168
|
+
Ready to build? Start with the [installation guide](https://gofastmcp.com/getting-started/installation) or jump straight to the [quickstart](https://gofastmcp.com/getting-started/quickstart).
|
|
169
|
+
|
|
170
|
+
## Run FastMCP in production with Horizon
|
|
171
|
+
|
|
172
|
+
FastMCP is the standard way to build MCP servers. **[Prefect Horizon](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_body)** is the enterprise MCP gateway for running them safely.
|
|
173
|
+
|
|
174
|
+
Built by the FastMCP team, Horizon packages the best practices we've learned shipping the world's most popular MCP framework.
|
|
175
|
+
|
|
176
|
+
Deploy FastMCP servers from GitHub with branch previews and instant rollback. Create a private registry of every MCP your company uses. Secure access with SSO and tool-level RBAC. Get audit logs, observability, and governance across your MCP stack. Remix approved tools into purpose-built endpoints for teams and agents.
|
|
177
|
+
|
|
178
|
+
Start with FastMCP. [Scale with Horizon →](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_cta)
|
|
179
|
+
|
|
180
|
+
## Installation
|
|
181
|
+
|
|
182
|
+
We recommend installing FastMCP with [uv](https://docs.astral.sh/uv/):
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
uv pip install fastmcp
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
For full installation instructions, including verification and upgrading, see the [**Installation Guide**](https://gofastmcp.com/getting-started/installation).
|
|
189
|
+
|
|
190
|
+
**Upgrading?** We have guides for:
|
|
191
|
+
- [Upgrading from FastMCP v2](https://gofastmcp.com/getting-started/upgrading/from-fastmcp-2)
|
|
192
|
+
- [Upgrading from the MCP Python SDK](https://gofastmcp.com/getting-started/upgrading/from-mcp-sdk)
|
|
193
|
+
- [Upgrading from the low-level SDK](https://gofastmcp.com/getting-started/upgrading/from-low-level-sdk)
|
|
194
|
+
|
|
195
|
+
## 📚 Documentation
|
|
196
|
+
|
|
197
|
+
FastMCP's complete documentation is available at **[gofastmcp.com](https://gofastmcp.com)**, including detailed guides, API references, and advanced patterns.
|
|
198
|
+
|
|
199
|
+
Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily:
|
|
200
|
+
|
|
201
|
+
- [`llms.txt`](https://gofastmcp.com/llms.txt) is essentially a sitemap, listing all the pages in the documentation.
|
|
202
|
+
- [`llms-full.txt`](https://gofastmcp.com/llms-full.txt) contains the entire documentation. Note this may exceed the context window of your LLM.
|
|
203
|
+
|
|
204
|
+
**Community:** Join our [Discord server](https://discord.gg/uu8dJCgttd) to connect with other FastMCP developers and share what you're building.
|
|
205
|
+
|
|
206
|
+
## Contributing
|
|
207
|
+
|
|
208
|
+
We welcome contributions! See the [Contributing Guide](https://gofastmcp.com/development/contributing) for setup instructions, testing requirements, and PR guidelines.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<!-- omit in toc -->
|
|
4
|
+
|
|
5
|
+
<picture>
|
|
6
|
+
<source width="550" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4-dark.png">
|
|
7
|
+
<source width="550" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-4.png">
|
|
8
|
+
<img width="550" alt="FastMCP Logo" src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/brand/f-watercolor-waves-2.png">
|
|
9
|
+
</picture>
|
|
10
|
+
|
|
11
|
+
# FastMCP 🚀
|
|
12
|
+
|
|
13
|
+
<strong>Move fast and make things.</strong>
|
|
14
|
+
|
|
15
|
+
*Made with 💙 by [Prefect](https://www.prefect.io/)*
|
|
16
|
+
|
|
17
|
+
[](https://gofastmcp.com)
|
|
18
|
+
[](https://discord.gg/uu8dJCgttd)
|
|
19
|
+
[](https://pypi.org/project/fastmcp)
|
|
20
|
+
[](https://github.com/PrefectHQ/fastmcp/actions/workflows/run-tests.yml)
|
|
21
|
+
[](https://github.com/PrefectHQ/fastmcp/blob/main/LICENSE)
|
|
22
|
+
|
|
23
|
+
<a href="https://trendshift.io/repositories/13266" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13266" alt="prefecthq%2Ffastmcp | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) connects LLMs to tools and data. FastMCP gives you everything you need to go from prototype to production:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from fastmcp import FastMCP
|
|
32
|
+
|
|
33
|
+
mcp = FastMCP("Demo 🚀")
|
|
34
|
+
|
|
35
|
+
@mcp.tool
|
|
36
|
+
def add(a: int, b: int) -> int:
|
|
37
|
+
"""Add two numbers"""
|
|
38
|
+
return a + b
|
|
39
|
+
|
|
40
|
+
if __name__ == "__main__":
|
|
41
|
+
mcp.run()
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Why FastMCP
|
|
45
|
+
|
|
46
|
+
Building an effective MCP application is harder than it looks. FastMCP handles all of it. Declare a tool with a Python function, and the schema, validation, and documentation are generated automatically. Connect to a server with a URL, and transport negotiation, authentication, and protocol lifecycle are managed for you. You focus on your logic, and the MCP part just works: **with FastMCP, best practices are built in.**
|
|
47
|
+
|
|
48
|
+
**That's why FastMCP is the standard framework for working with MCP.** FastMCP 1.0 was incorporated into the official MCP Python SDK in 2024. Today, the actively maintained standalone project is downloaded a million times a day, and some version of FastMCP powers 70% of MCP servers across all languages.
|
|
49
|
+
|
|
50
|
+
FastMCP has three pillars:
|
|
51
|
+
|
|
52
|
+
<table>
|
|
53
|
+
<tr>
|
|
54
|
+
<td align="center" valign="top" width="33%">
|
|
55
|
+
<a href="https://gofastmcp.com/servers/server">
|
|
56
|
+
<img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/servers-card.png" alt="Servers" />
|
|
57
|
+
<br /><strong>Servers</strong>
|
|
58
|
+
</a>
|
|
59
|
+
<br />Expose tools, resources, and prompts to LLMs.
|
|
60
|
+
</td>
|
|
61
|
+
<td align="center" valign="top" width="33%">
|
|
62
|
+
<a href="https://gofastmcp.com/apps/overview">
|
|
63
|
+
<img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/apps-card.png" alt="Apps" />
|
|
64
|
+
<br /><strong>Apps</strong>
|
|
65
|
+
</a>
|
|
66
|
+
<br />Give your tools interactive UIs rendered directly in the conversation.
|
|
67
|
+
</td>
|
|
68
|
+
<td align="center" valign="top" width="33%">
|
|
69
|
+
<a href="https://gofastmcp.com/clients/client">
|
|
70
|
+
<img src="https://raw.githubusercontent.com/PrefectHQ/fastmcp/main/docs/assets/images/clients-card.png" alt="Clients" />
|
|
71
|
+
<br /><strong>Clients</strong>
|
|
72
|
+
</a>
|
|
73
|
+
<br />Connect to any MCP server — local or remote, programmatic or CLI.
|
|
74
|
+
</td>
|
|
75
|
+
</tr>
|
|
76
|
+
</table>
|
|
77
|
+
|
|
78
|
+
**[Servers](https://gofastmcp.com/servers/server)** wrap your Python functions into MCP-compliant tools, resources, and prompts. **[Clients](https://gofastmcp.com/clients/client)** connect to any server with full protocol support. And **[Apps](https://gofastmcp.com/apps/overview)** give your tools interactive UIs rendered directly in the conversation.
|
|
79
|
+
|
|
80
|
+
Ready to build? Start with the [installation guide](https://gofastmcp.com/getting-started/installation) or jump straight to the [quickstart](https://gofastmcp.com/getting-started/quickstart).
|
|
81
|
+
|
|
82
|
+
## Run FastMCP in production with Horizon
|
|
83
|
+
|
|
84
|
+
FastMCP is the standard way to build MCP servers. **[Prefect Horizon](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_body)** is the enterprise MCP gateway for running them safely.
|
|
85
|
+
|
|
86
|
+
Built by the FastMCP team, Horizon packages the best practices we've learned shipping the world's most popular MCP framework.
|
|
87
|
+
|
|
88
|
+
Deploy FastMCP servers from GitHub with branch previews and instant rollback. Create a private registry of every MCP your company uses. Secure access with SSO and tool-level RBAC. Get audit logs, observability, and governance across your MCP stack. Remix approved tools into purpose-built endpoints for teams and agents.
|
|
89
|
+
|
|
90
|
+
Start with FastMCP. [Scale with Horizon →](https://www.prefect.io/horizon?utm_source=github&utm_medium=readme&utm_campaign=readme_horizon&utm_content=readme_cta)
|
|
91
|
+
|
|
92
|
+
## Installation
|
|
93
|
+
|
|
94
|
+
We recommend installing FastMCP with [uv](https://docs.astral.sh/uv/):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
uv pip install fastmcp
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
For full installation instructions, including verification and upgrading, see the [**Installation Guide**](https://gofastmcp.com/getting-started/installation).
|
|
101
|
+
|
|
102
|
+
**Upgrading?** We have guides for:
|
|
103
|
+
- [Upgrading from FastMCP v2](https://gofastmcp.com/getting-started/upgrading/from-fastmcp-2)
|
|
104
|
+
- [Upgrading from the MCP Python SDK](https://gofastmcp.com/getting-started/upgrading/from-mcp-sdk)
|
|
105
|
+
- [Upgrading from the low-level SDK](https://gofastmcp.com/getting-started/upgrading/from-low-level-sdk)
|
|
106
|
+
|
|
107
|
+
## 📚 Documentation
|
|
108
|
+
|
|
109
|
+
FastMCP's complete documentation is available at **[gofastmcp.com](https://gofastmcp.com)**, including detailed guides, API references, and advanced patterns.
|
|
110
|
+
|
|
111
|
+
Documentation is also available in [llms.txt format](https://llmstxt.org/), which is a simple markdown standard that LLMs can consume easily:
|
|
112
|
+
|
|
113
|
+
- [`llms.txt`](https://gofastmcp.com/llms.txt) is essentially a sitemap, listing all the pages in the documentation.
|
|
114
|
+
- [`llms-full.txt`](https://gofastmcp.com/llms-full.txt) contains the entire documentation. Note this may exceed the context window of your LLM.
|
|
115
|
+
|
|
116
|
+
**Community:** Join our [Discord server](https://discord.gg/uu8dJCgttd) to connect with other FastMCP developers and share what you're building.
|
|
117
|
+
|
|
118
|
+
## Contributing
|
|
119
|
+
|
|
120
|
+
We welcome contributions! See the [Contributing Guide](https://gofastmcp.com/development/contributing) for setup instructions, testing requirements, and PR guidelines.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""FastMCP - An ergonomic MCP interface."""
|
|
2
|
+
|
|
3
|
+
import importlib
|
|
4
|
+
import warnings
|
|
5
|
+
from importlib.metadata import PackageNotFoundError, version as _version
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
7
|
+
|
|
8
|
+
from fastmcp.settings import Settings
|
|
9
|
+
from fastmcp.utilities.logging import configure_logging as _configure_logging
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from fastmcp.client import Client as Client
|
|
13
|
+
from fastmcp.apps.app import FastMCPApp as FastMCPApp
|
|
14
|
+
from fastmcp.exceptions import (
|
|
15
|
+
FastMCPDeprecationWarning as FastMCPDeprecationWarning,
|
|
16
|
+
)
|
|
17
|
+
from fastmcp.server.context import Context as Context
|
|
18
|
+
from fastmcp.server.server import FastMCP as FastMCP
|
|
19
|
+
|
|
20
|
+
settings = Settings()
|
|
21
|
+
if settings.log_enabled:
|
|
22
|
+
_configure_logging(
|
|
23
|
+
level=settings.log_level,
|
|
24
|
+
enable_rich_tracebacks=settings.enable_rich_tracebacks,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
try:
|
|
28
|
+
__version__ = _version("fastmcp-slim")
|
|
29
|
+
except PackageNotFoundError:
|
|
30
|
+
__version__ = _version("fastmcp")
|
|
31
|
+
|
|
32
|
+
if settings.deprecation_warnings:
|
|
33
|
+
try:
|
|
34
|
+
from fastmcp.exceptions import FastMCPDeprecationWarning
|
|
35
|
+
except ImportError:
|
|
36
|
+
pass
|
|
37
|
+
else:
|
|
38
|
+
warnings.simplefilter("default", FastMCPDeprecationWarning)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# --- Lazy imports for performance (see #3292) ---
|
|
42
|
+
# Client and the client submodule are deferred so that server-only users
|
|
43
|
+
# don't pay for the client import chain. Do not convert back to top-level.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def __getattr__(name: str) -> object:
|
|
47
|
+
if name == "Client":
|
|
48
|
+
try:
|
|
49
|
+
from fastmcp.client import Client
|
|
50
|
+
except ImportError as exc:
|
|
51
|
+
raise ImportError(
|
|
52
|
+
"FastMCP client support is not installed. Install "
|
|
53
|
+
"`fastmcp-slim[client]` or `fastmcp`."
|
|
54
|
+
) from exc
|
|
55
|
+
|
|
56
|
+
return Client
|
|
57
|
+
if name == "Context":
|
|
58
|
+
try:
|
|
59
|
+
from fastmcp.server.context import Context
|
|
60
|
+
except ImportError as exc:
|
|
61
|
+
raise ImportError(
|
|
62
|
+
"FastMCP server support is not installed. Install "
|
|
63
|
+
"`fastmcp-slim[server]` or `fastmcp`."
|
|
64
|
+
) from exc
|
|
65
|
+
|
|
66
|
+
return Context
|
|
67
|
+
if name == "FastMCP":
|
|
68
|
+
try:
|
|
69
|
+
from fastmcp.server.server import FastMCP
|
|
70
|
+
except ImportError as exc:
|
|
71
|
+
raise ImportError(
|
|
72
|
+
"FastMCP server support is not installed. Install "
|
|
73
|
+
"`fastmcp-slim[server]` or `fastmcp`."
|
|
74
|
+
) from exc
|
|
75
|
+
|
|
76
|
+
return FastMCP
|
|
77
|
+
if name == "FastMCPApp":
|
|
78
|
+
try:
|
|
79
|
+
from fastmcp.apps.app import FastMCPApp
|
|
80
|
+
except ImportError as exc:
|
|
81
|
+
raise ImportError(
|
|
82
|
+
"FastMCP app support is not installed. Install "
|
|
83
|
+
"`fastmcp-slim[server,apps]` or `fastmcp[apps]`."
|
|
84
|
+
) from exc
|
|
85
|
+
|
|
86
|
+
return FastMCPApp
|
|
87
|
+
if name == "FastMCPDeprecationWarning":
|
|
88
|
+
from fastmcp.exceptions import FastMCPDeprecationWarning
|
|
89
|
+
|
|
90
|
+
return FastMCPDeprecationWarning
|
|
91
|
+
if name == "client":
|
|
92
|
+
try:
|
|
93
|
+
return importlib.import_module("fastmcp.client")
|
|
94
|
+
except ImportError as exc:
|
|
95
|
+
raise ImportError(
|
|
96
|
+
"FastMCP client support is not installed. Install "
|
|
97
|
+
"`fastmcp-slim[client]` or `fastmcp`."
|
|
98
|
+
) from exc
|
|
99
|
+
if name == "server":
|
|
100
|
+
try:
|
|
101
|
+
return importlib.import_module("fastmcp.server")
|
|
102
|
+
except ImportError as exc:
|
|
103
|
+
raise ImportError(
|
|
104
|
+
"FastMCP server support is not installed. Install "
|
|
105
|
+
"`fastmcp-slim[server]` or `fastmcp`."
|
|
106
|
+
) from exc
|
|
107
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
__all__ = [
|
|
111
|
+
"Client",
|
|
112
|
+
"Context",
|
|
113
|
+
"FastMCP",
|
|
114
|
+
"FastMCPApp",
|
|
115
|
+
"FastMCPDeprecationWarning",
|
|
116
|
+
"settings",
|
|
117
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""FastMCP Apps — interactive UIs for MCP tools.
|
|
2
|
+
|
|
3
|
+
This package contains the app-related components:
|
|
4
|
+
|
|
5
|
+
- ``FastMCPApp`` — composable provider for interactive apps with backend tools
|
|
6
|
+
- ``AppConfig`` — configuration for MCP App tools and resources
|
|
7
|
+
- ``ResourceCSP`` / ``ResourcePermissions`` — security configuration
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from fastmcp.apps.app import FastMCPApp as FastMCPApp
|
|
11
|
+
from fastmcp.apps.config import AppConfig as AppConfig
|
|
12
|
+
from fastmcp.apps.config import PrefabAppConfig as PrefabAppConfig
|
|
13
|
+
from fastmcp.apps.config import ResourceCSP as ResourceCSP
|
|
14
|
+
from fastmcp.apps.config import ResourcePermissions as ResourcePermissions
|
|
15
|
+
from fastmcp.apps.config import UI_EXTENSION_ID as UI_EXTENSION_ID
|
|
16
|
+
from fastmcp.apps.config import app_config_to_meta_dict as app_config_to_meta_dict
|
|
17
|
+
from fastmcp.utilities.mime import UI_MIME_TYPE as UI_MIME_TYPE
|
|
18
|
+
from fastmcp.utilities.mime import resolve_ui_mime_type as resolve_ui_mime_type
|