MCPcopy Create free account

hub / github.com/PrefectHQ/fastmcp / functions

Functions10,312 in github.com/PrefectHQ/fastmcp

↓ 6 callersMethodget_client
Get client information by ID. This is generally the random ID provided to the DCR client during registration, not the upstream client ID.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:766
↓ 6 callersFunctionget_http_headers
Return HTTP headers from an ambient server request, when available. The standalone client package has no server request context. When the full
fastmcp_slim/fastmcp/client/dependencies.py:4
↓ 6 callersFunctionget_skill_manifest
Get the manifest for a specific skill. Args: client: Connected FastMCP client skill_name: Name of the skill Returns:
fastmcp_slim/fastmcp/utilities/skills.py:87
↓ 6 callersMethodget_token_expiry
(self)
fastmcp_slim/fastmcp/client/auth/oauth.py:147
↓ 6 callersFunctioninspect_fastmcp_v1
Extract information from a FastMCP v1.x instance using a Client. Args: mcp: The FastMCP v1.x instance to inspect Returns: Fa
fastmcp_slim/fastmcp/utilities/inspect.py:236
↓ 6 callersFunctioninstall_cursor
Install FastMCP server in Cursor. Args: file: Path to the server file server_object: Optional server object name (for :object suf
fastmcp_slim/fastmcp/cli/install/cursor.py:143
↓ 6 callersFunctionissubclass_safe
Check if cls is a subclass of base, even if cls is a type variable.
fastmcp_slim/fastmcp/utilities/types.py:123
↓ 6 callersMethodissue_refresh_token
Issue a minimal FastMCP refresh token. FastMCP refresh tokens are reference tokens containing only the minimal claims needed for vali
fastmcp_slim/fastmcp/server/auth/jwt_issuer.py:161
↓ 6 callersMethodlist_tools
Retrieve all tools available on the server. This method automatically fetches all pages if the server paginates results, returning th
fastmcp_slim/fastmcp/client/mixins/tools.py:69
↓ 6 callersMethodnew
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:1201
↓ 6 callersFunctionparse_hashed_backend_name
Parse ``<HASH_LENGTH hex>_<rest>`` → ``(hash, local_tool_name)`` or None.
fastmcp_slim/fastmcp/server/providers/addressing.py:43
↓ 6 callersMethodprepare
Prepare environment and source for execution. When output_dir is provided, creates a persistent uv project. When output_dir is None,
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:342
↓ 6 callersFunctionrequire_docket
Raise ImportError with install instructions if docket not available. Args: feature: Description of what requires docket (e.g., "`task=Tru
fastmcp_slim/fastmcp/server/dependencies.py:140
↓ 6 callersFunctionserialize_transport
Serialize a resolved transport to a Python expression string. Returns ``(expression, extra_imports)`` where *extra_imports* is a set of impor
fastmcp_slim/fastmcp/cli/generate.py:122
↓ 6 callersFunctionset_up_component_manager
Set up HTTP routes for enabling/disabling tools, resources, and prompts. Args: server: The FastMCP server instance. path: Base pa
fastmcp_slim/fastmcp/contrib/component_manager/component_manager.py:17
↓ 6 callersMethodstart
Start the mock OAuth server.
tests/server/auth/oauth_proxy/conftest.py:212
↓ 6 callersMethodto_audio_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:347
↓ 6 callersMethodto_mcp_result
( self, )
fastmcp_slim/fastmcp/tools/base.py:134
↓ 6 callersMethodto_resource_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:407
↓ 6 callersMethodupdate_default_scopes
Update the default scopes advertised to clients and used for DCR/CIMD fallback. Use this method when the available scope set is determined af
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:636
↓ 6 callersFunctionvalidate
(token: str = Depends(get_token))
tests/server/test_dependencies.py:701
↓ 6 callersFunctionvalidate_url
Validate URL for SSRF and resolve to IPs. Args: url: URL to validate require_path: If True, require non-root path (for CIMD)
fastmcp_slim/fastmcp/server/auth/ssrf.py:147
↓ 6 callersFunctionversion_sort_key
Get a sort key for a component based on its version. Use with sorted() or max() to order components by version. The key is a `(VersionKey, r
fastmcp_slim/fastmcp/utilities/versions.py:209
↓ 5 callersMethod__init__
Initialize the multi-auth provider. Args: server: Optional auth provider (e.g., OAuthProxy) that owns routes and
fastmcp_slim/fastmcp/server/auth/auth.py:533
↓ 5 callersMethod__init__
(self)
tests/server/middleware/test_initialization_middleware.py:110
↓ 5 callersFunction_audio_content_to_openai_part
Convert MCP AudioContent to OpenAI input_audio content part.
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:79
↓ 5 callersFunction_backfill_boolean_defaults
Fill in missing boolean fields with their model defaults. HTML checkboxes omit the field entirely when unchecked, so the submitted data dict
fastmcp_slim/fastmcp/apps/form.py:67
↓ 5 callersFunction_build_stdio_from_command
Shell-split a command string into a ``StdioTransport``.
fastmcp_slim/fastmcp/cli/client.py:115
↓ 5 callersFunction_claude_code_config
Build a minimal ~/.claude.json structure.
tests/cli/test_discovery.py:224
↓ 5 callersMethod_collect_list_results
Collect successful list results, logging any exceptions. Emits a warning when the same MCP identity is returned by more than one prov
fastmcp_slim/fastmcp/server/providers/aggregate.py:118
↓ 5 callersMethod_convert_tool_choice_to_anthropic
Convert MCP tool_choice to Anthropic format. Returns None for "none" mode, signaling that tools should be omitted from the request en
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:381
↓ 5 callersFunction_convert_tool_choice_to_google_genai
Convert MCP ToolChoice to Google GenAI ToolConfig.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:165
↓ 5 callersMethod_create_test_auth_provider
Helper to create a test RemoteAuthProvider with StaticTokenVerifier.
tests/server/auth/test_remote_auth_provider.py:197
↓ 5 callersMethod_disconnect
Disconnect from session using reference counting. This method implements proper cleanup for reentrant context managers: - De
fastmcp_slim/fastmcp/client/client.py:630
↓ 5 callersMethod_encode_list_cookie
Encode values to base64 and sign with HMAC. Returns: signed cookie value (payload.signature)
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:142
↓ 5 callersMethod_ensure_setup
Lazily register tools and resources on first access.
fastmcp_slim/fastmcp/apps/generative.py:99
↓ 5 callersMethod_extract_scopes
Extract scopes from JWT claims. Supports both 'scope' and 'scp' claims. Checks the `scope` claim first (standard OAuth2 clai
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:417
↓ 5 callersFunction_find_azure_provider
Extract an AzureProvider from an auth provider, unwrapping MultiAuth if needed.
fastmcp_slim/fastmcp/server/auth/providers/azure.py:803
↓ 5 callersMethod_get_tool
( self, name: str, version: VersionSpec | None = None )
fastmcp_slim/fastmcp/server/providers/proxy.py:655
↓ 5 callersMethod_get_tool
( self, name: str, version: VersionSpec | None = None )
tests/server/test_providers.py:55
↓ 5 callersFunction_make_get_prompt_cache_key
Make a cache key for a prompt get using a stable hash of name and arguments.
fastmcp_slim/fastmcp/server/middleware/caching.py:588
↓ 5 callersFunction_make_resolver
Create a CallTool resolver that prefixes tool names with a hash. Structurally identical to the old ``___`` resolver — ``app_name`` is the Fas
fastmcp_slim/fastmcp/apps/app.py:55
↓ 5 callersMethod_make_verify_factory
(self)
fastmcp_slim/fastmcp/client/transports/sse.py:91
↓ 5 callersFunction_mock_github_success
Configure *mock_client* to return a successful GitHub user + scopes response.
tests/server/auth/providers/test_github.py:159
↓ 5 callersFunction_parse_call_tool_result
Parse an mcp.types.CallToolResult into our CallToolResult dataclass. Args: name: Tool name (for schema lookup) result: Raw MCP pr
fastmcp_slim/fastmcp/client/mixins/tools.py:394
↓ 5 callersMethod_parse_call_tool_result
Parse an mcp.types.CallToolResult into our CallToolResult dataclass. Args: name: Tool name (for schema lookup) result
fastmcp_slim/fastmcp/client/mixins/tools.py:184
↓ 5 callersMethod_prepare_scopes_for_token_exchange
Prepare scopes for Azure authorization code exchange. Azure requires scopes during token exchange (AADSTS28003 error if missing). Azu
fastmcp_slim/fastmcp/server/auth/providers/azure.py:491
↓ 5 callersMethod_revoke_internal
Internal helper to remove tokens and their associations.
fastmcp_slim/fastmcp/server/auth/providers/in_memory.py:315
↓ 5 callersFunction_scan_cursor_workspace
Walk up from *start_dir* looking for ``.cursor/mcp.json``.
fastmcp_slim/fastmcp/cli/discovery.py:204
↓ 5 callersFunction_scan_gemini
Scan Gemini CLI settings for MCP servers. Checks both user-level ``~/.gemini/settings.json`` and project-level ``.gemini/settings.json``.
fastmcp_slim/fastmcp/cli/discovery.py:231
↓ 5 callersFunction_schema_type
(schema: Any)
fastmcp_slim/fastmcp/server/transforms/search/base.py:90
↓ 5 callersFunction_set_auth
Install an auth context for a given client_id/sub. Returns the reset token.
tests/server/tasks/test_task_security.py:72
↓ 5 callersMethod_set_list_cookie
( self: OAuthProxy, response: HTMLResponse | RedirectResponse, base_name: str,
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:151
↓ 5 callersMethodaclose
(self)
tests/client/auth/test_oauth_client.py:314
↓ 5 callersMethodasync_auth_flow
HTTPX auth flow with automatic retry on stale cached credentials. If the OAuth flow fails due to invalid/stale client credentials, cl
fastmcp_slim/fastmcp/client/auth/oauth.py:402
↓ 5 callersFunctioncheck_background_task
Check task mode and submit to background if requested. Args: component: The MCP component task_type: Type of task ("tool", "resou
fastmcp_slim/fastmcp/server/tasks/routing.py:26
↓ 5 callersFunctioncreate_function_without_params
Create a new function with the same code but without the specified parameters in annotations. This is used to exclude parameters from type a
fastmcp_slim/fastmcp/utilities/types.py:181
↓ 5 callersFunctioncreate_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_deepobject_style.py:11
↓ 5 callersFunctioncreate_page
Create a complete HTML page with FastMCP styling. Args: content: HTML content to place inside the page title: Page title
fastmcp_slim/fastmcp/utilities/ui.py:453
↓ 5 callersFunctioncreate_sse_app
Return an instance of the SSE server app. Args: server: The FastMCP server instance message_path: Path for SSE messages s
fastmcp_slim/fastmcp/server/http.py:142
↓ 5 callersFunctiondedupe_with_versions
Deduplicate components by key, keeping highest version. Groups components by key, selects the highest version from each group, and injects av
fastmcp_slim/fastmcp/utilities/versions.py:306
↓ 5 callersFunctiondefault_log_handler
Default handler that properly routes server log messages to appropriate log levels.
fastmcp_slim/fastmcp/client/logging.py:17
↓ 5 callersFunctionextract_output_schema_from_responses
Extract output schema from OpenAPI responses for use as MCP tool output schema. This function finds the first successful response (200, 201,
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:479
↓ 5 callersFunctionextract_trace_context
Extract trace context from an MCP request meta dict. If already in a valid trace (e.g., from HTTP propagation), the existing trace context is
fastmcp_slim/fastmcp/telemetry.py:82
↓ 5 callersMethodform
()
tests/server/providers/test_prefab_roundtrip.py:119
↓ 5 callersMethodformat
(self, record: logging.LogRecord)
tests/server/test_logging.py:12
↓ 5 callersFunctionformat_fastmcp_info
Format FastMCPInfo as FastMCP-specific JSON. This includes FastMCP-specific fields like tags, enabled, annotations, etc.
fastmcp_slim/fastmcp/utilities/inspect.py:403
↓ 5 callersMethodfrom_fastapi
Create a FastMCP server from a FastAPI application. Args: app: FastAPI application instance name: Name for t
fastmcp_slim/fastmcp/server/server.py:2330
↓ 5 callersMethodfrom_openapi
Create a FastMCP server from an OpenAPI specification. Args: openapi_spec: OpenAPI schema as a dictionary cl
fastmcp_slim/fastmcp/server/server.py:2279
↓ 5 callersFunctiongenerate_schema
Generate JSON schema for fastmcp.json files. This is used to create the schema file that IDEs can use for validation and auto-completion.
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:416
↓ 5 callersMethodget_meta
(self)
fastmcp_slim/fastmcp/server/providers/skills/skill_provider.py:41
↓ 5 callersFunctionget_property
(tool: Tool, name: str)
tests/tools/tool_transform/test_tool_transform.py:21
↓ 5 callersMethodget_resource
(uri: str, version=None)
tests/server/providers/test_transforming_provider.py:189
↓ 5 callersMethodget_task_result
Retrieve the raw result of a completed background task. Sends a 'tasks/result' MCP protocol request over the existing transport. Retu
fastmcp_slim/fastmcp/client/mixins/task_management.py:56
↓ 5 callersFunctionget_task_scope
Get the authorization scope for task isolation. Returns the raw scope identifier for the current access token, or ``None`` when no auth conte
fastmcp_slim/fastmcp/server/tasks/context.py:42
↓ 5 callersMethodgetsockname
(self)
tests/client/auth/test_oauth_client.py:268
↓ 5 callersFunctionhandle_phue_error
Creates a standardized error response for phue operations.
examples/smart_home/src/smart_home/lights/hue_utils.py:23
↓ 5 callersFunctionis_version_greater
Check if version a is greater than version b. Args: a: First version string (or None). b: Second version string (or None). R
fastmcp_slim/fastmcp/utilities/versions.py:259
↓ 5 callersMethodlist_prompts
Retrieve all prompts available on the server. This method automatically fetches all pages if the server paginates results, returning
fastmcp_slim/fastmcp/client/mixins/prompts.py:65
↓ 5 callersMethodlist_tools
Mark tools by visibility state.
fastmcp_slim/fastmcp/server/transforms/visibility.py:196
↓ 5 callersFunctionmock_cognito_oidc_discovery
Context manager to mock AWS Cognito OIDC discovery endpoint.
tests/server/auth/providers/test_aws.py:12
↓ 5 callersFunctionnew_mock_context
Create a new mock middleware context.
tests/server/middleware/test_logging.py:40
↓ 5 callersMethodon_request
Apply rate limiting to requests.
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:152
↓ 5 callersMethodparse
Parse the OpenAPI schema into HTTP routes.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:663
↓ 5 callersFunctionparse_frontmatter
Parse YAML frontmatter from markdown content. Args: content: Markdown content potentially starting with --- Returns: Tuple o
fastmcp_slim/fastmcp/server/providers/skills/_common.py:33
↓ 5 callersFunctionparse_header
(value: str)
fastmcp_remote/fastmcp_remote/cli.py:72
↓ 5 callersFunctionprepare
Prepare a FastMCP project by creating a persistent uv environment. This command creates a persistent uv project with all dependencies installed:
fastmcp_slim/fastmcp/cli/cli.py:1030
↓ 5 callersMethodprepare
Prepare the Python environment using uv. Args: output_dir: Directory where the persistent uv project will be created.
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/environments/uv.py:109
↓ 5 callersMethodregister_all
Registers all marked tools, resources, and prompts with the server. This method calls ``register_tools``, ``register_resources``, and
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:298
↓ 5 callersMethodregister_prompts
Registers all methods marked with @mcp_prompt with the FastMCP server. Args: mcp_server: The FastMCP server instance to register
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:268
↓ 5 callersMethodregister_resources
Registers all methods marked with @mcp_resource with the FastMCP server. Args: mcp_server: The FastMCP server instance to registe
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:233
↓ 5 callersMethodreset_visibility
Clear all session visibility rules. Use this to reset session visibility back to global defaults. Sends notifications to this sessio
fastmcp_slim/fastmcp/server/context.py:1402
↓ 5 callersFunctionrestrict_tag
Require scopes when the accessed component has a specific tag.
fastmcp_slim/fastmcp/utilities/authorization.py:62
↓ 5 callersFunctionrun
Run an MCP server or connect to a remote one. The server can be specified in several ways: 1. Module approach: "server.py" - runs the module
fastmcp_slim/fastmcp/cli/cli.py:407
↓ 5 callersFunctionrun_module_command
Run a Python module directly using ``python -m <module>``. When ``-m`` is used, the module manages its own server startup. No server-object d
fastmcp_slim/fastmcp/cli/run.py:272
↓ 5 callersMethodsave
(self, deps: Deps)
examples/memory.py:102
↓ 5 callersMethodset_tokens
(self, tokens: OAuthToken)
fastmcp_slim/fastmcp/client/auth/oauth.py:127
↓ 5 callersMethodstatistics
Get the statistics for the cache.
fastmcp_slim/fastmcp/server/middleware/caching.py:526
↓ 5 callersFunctionsync_skills
Download all available skills from a server. Args: client: Connected FastMCP client target_dir: Directory where skill folders wil
fastmcp_slim/fastmcp/utilities/skills.py:218
↓ 5 callersMethodto_image_content
Convert to MCP ImageContent.
fastmcp_slim/fastmcp/utilities/types.py:289
← previousnext →401–500 of 10,312, ranked by callers