MCPcopy Create free account

hub / github.com/PrefectHQ/fastmcp / functions

Functions11,669 in github.com/PrefectHQ/fastmcp

↓ 8 callersFunction_merge_defaults
Merge defaults with provided data at all levels.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:755
↓ 8 callersMethod_on_list_tools
List all available tools. Supports pagination via params.cursor.
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:132
↓ 8 callersFunction_param_to_cli_flag
Convert a JSON Schema property name to its CLI flag form. Replicates cyclopts' default_name_transform: camelCase → snake_case, lowercase, und
fastmcp_slim/fastmcp/cli/generate.py:534
↓ 8 callersMethod_read
Server entry point for resource reads. The server calls this method instead of ``read()`` directly so that subclasses can customize d
fastmcp_slim/fastmcp/resources/base.py:446
↓ 8 callersFunction_slugify
Convert a display name to a URL-safe identifier. Lowercases, replaces non-alphanumeric runs with hyphens, and strips leading/trailing hyphens
fastmcp_slim/fastmcp/cli/install/goose.py:19
↓ 8 callersFunction_to_python_identifier
Sanitize a string into a valid Python identifier.
fastmcp_slim/fastmcp/cli/generate.py:155
↓ 8 callersFunction_unwrap_result
Extract the logical return value from a ToolResult.
tests/experimental/transforms/test_code_mode.py:49
↓ 8 callersMethod_with_reload
Acquire the reload lock, reload if needed, then run *coro_fn*. Holding the lock across both the reload and the read prevents concurre
fastmcp_slim/fastmcp/server/providers/filesystem.py:162
↓ 8 callersFunctionapply_session_transforms
Apply session-specific visibility transforms to components. This helper applies session-level enable/disable rules by marking components with
fastmcp_slim/fastmcp/server/transforms/visibility.py:511
↓ 8 callersFunctionbuild_proxy
Build an OAuth proxy mounted at BASE_URL, optionally with a distinct issuer.
tests/server/auth/test_issuer_url_identity.py:61
↓ 8 callersFunctiondiscover_files
Recursively discover all Python files under a directory. Excludes __init__.py files (they're for package structure, not components). Args:
fastmcp_slim/fastmcp/server/providers/filesystem_discovery.py:35
↓ 8 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:263
↓ 8 callersFunctionfn
(n: int, ctx: Any)
tests/tasks/server/test_guard_reentrant.py:228
↓ 8 callersMethodget_app_tool
Look up an app-visible tool by original name, bypassing transforms. Searches for a tool named ``tool_name`` tagged with the given app
fastmcp_slim/fastmcp/server/providers/base.py:187
↓ 8 callersFunctionget_client
Get or create an authenticated ATProto client.
examples/atproto_mcp/src/atproto_mcp/_atproto/_client.py:10
↓ 8 callersFunctionget_fastmcp_metadata
Extract FastMCP metadata from a component's meta dict. Handles both the current `fastmcp` namespace and the legacy `_fastmcp` namespace for c
fastmcp_slim/fastmcp/utilities/components.py:22
↓ 8 callersMethodget_obo_credential
Get a cached or new OnBehalfOfCredential for OBO token exchange. Credentials are cached by user assertion so the Azure SDK's internal
fastmcp_slim/fastmcp/server/auth/providers/azure.py:628
↓ 8 callersMethodget_routes
Get OAuth routes with custom handlers for better error UX. This method creates standard OAuth routes and replaces: - /authorize endpo
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:2378
↓ 8 callersFunctionget_session
Resolve and validate a `Session` for an explicit `session_id`. Pair with a `session_id: SessionId` tool argument (the agent obtains an id fro
fastmcp_slim/fastmcp/server/dependencies.py:480
↓ 8 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:251
↓ 8 callersFunctionis_docket_available
Check if a compatible pydocket (>= 0.19.0) is installed and importable. Three things have to be true for fastmcp's task features to work: 1
fastmcp_slim/fastmcp/server/dependencies.py:244
↓ 8 callersMethodlist_prompts
List prompts with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:321
↓ 8 callersMethodlist_resource_templates
List resource templates with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:278
↓ 8 callersMethodlist_resources
List resources with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:238
↓ 8 callersMethodlist_tools
List tools with all transforms applied. Applies transforms sequentially: base → transforms (in order). Each transform receives the re
fastmcp_slim/fastmcp/server/providers/base.py:142
↓ 8 callersMethodlist_tools_mcp
Send a tools/list request and return the complete MCP protocol result. Args: cursor: Optional pagination cursor from a previous r
fastmcp_slim/fastmcp/client/mixins/tools.py:34
↓ 8 callersMethodload_server
Load server from filesystem.
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py:64
↓ 8 callersFunctionpaginate_sequence
Paginate a sequence of items. Args: items: The full sequence to paginate. cursor: Optional cursor from a previous request. None f
fastmcp_slim/fastmcp/utilities/pagination.py:50
↓ 8 callersFunctionparse_hashed_backend_name
Parse ``<HASH_LENGTH hex>_<rest>`` → ``(hash, local_tool_name)`` or None.
fastmcp_slim/fastmcp/server/providers/addressing.py:53
↓ 8 callersMethodread
Read the file content.
fastmcp_slim/fastmcp/resources/types.py:99
↓ 8 callersMethodregister_tools
Registers all methods marked with @mcp_tool with the FastMCP server. Args: mcp_server: The FastMCP server instance to register to
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:191
↓ 8 callersMethodreplay_events_after
Replay events that occurred after the specified event ID. Args: last_event_id: The ID of the last event the client received
fastmcp_slim/fastmcp/server/event_store.py:192
↓ 8 callersMethodrun_http_async
Run the server using HTTP transport. Args: transport: Transport protocol to use - "http" (default), "streamable-http", or "sse"
fastmcp_slim/fastmcp/server/mixins/transport.py:257
↓ 8 callersMethodsend_notification
Send a notification to the client immediately. Args: notification: An MCP notification instance (e.g., ToolListChangedNotificatio
fastmcp_slim/fastmcp/server/context.py:885
↓ 8 callersFunctionserialize_tools_for_output_markdown
Serialize tools to compact markdown, using ~65-70% fewer tokens than JSON.
fastmcp_slim/fastmcp/server/transforms/search/base.py:140
↓ 8 callersMethodto_resource_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:415
↓ 8 callersFunctiontransform_context_annotations
Transform injected-by-type params into Dependency-defaulted params. Transforms ALL params typed as Context (into ``= CurrentContext()``) and as
fastmcp_slim/fastmcp/server/dependencies.py:276
↓ 8 callersFunctionupdate_task
Call the `tasks/update` handler within the given auth scope.
tests/tasks/task_helpers.py:151
↓ 8 callersFunctionvalidate_elicitation_json_schema
Validate that a JSON schema follows MCP elicitation requirements. This ensures the schema is compatible with MCP elicitation requirements: -
fastmcp_slim/fastmcp/server/elicitation.py:395
↓ 8 callersMethodverify_token
Verify GitHub OAuth token by calling GitHub API.
fastmcp_slim/fastmcp/server/auth/providers/github.py:82
↓ 8 callersMethodverify_token
Verify a bearer token using OAuth 2.0 Token Introspection (RFC 7662). This method makes a POST request to the introspection endpoint
fastmcp_slim/fastmcp/server/auth/providers/introspection.py:179
↓ 7 callersMethod__init__
(self, client_factory: ClientFactoryT, **kwargs: Any)
fastmcp_slim/fastmcp/server/providers/proxy.py:257
↓ 7 callersMethod_add_component
Add a component to unified storage. Args: component: The component to add. Returns: The component that was a
fastmcp_slim/fastmcp/server/providers/local_provider/local_provider.py:178
↓ 7 callersFunction_build_client
Build a ``Client`` from a resolved server spec. Applies ``auth='oauth'`` automatically for HTTP-based targets unless the caller explicitly pa
fastmcp_slim/fastmcp/cli/client.py:228
↓ 7 callersFunction_build_uvx_command
Build a uvx command for running a FastMCP server. Goose requires uvx (not uv run) as the command. The uvx format is: uvx [--with pkg] [--
fastmcp_slim/fastmcp/cli/install/goose.py:58
↓ 7 callersMethod_create_before_message
( self, context: MiddlewareContext[Any] )
fastmcp_slim/fastmcp/server/middleware/logging.py:56
↓ 7 callersMethod_dispatch_component_middleware
Run the interior middleware chain for a component operation. This is the dispatch site for the component methods (``tools/call``, ``t
fastmcp_slim/fastmcp/server/server.py:572
↓ 7 callersFunction_elicited_field
The accepted value of *field* from the elicitation answered under *key*.
tests/conformance/server.py:428
↓ 7 callersFunction_era_reporting_backend
A dual-era backend for the mirroring tests. Hosts the three-round guard tool (``book_flight``), a tool that reports the protocol version its
tests/server/test_mrtr_guards.py:522
↓ 7 callersMethod_exchange
(self, proxy, code="test-code", **idp_token_overrides)
tests/server/auth/oauth_proxy/test_tokens.py:838
↓ 7 callersFunction_form
(request: httpx2.Request)
tests/server/auth/oauth_proxy/test_upstream_client.py:23
↓ 7 callersFunction_get_npx_command
Get the correct npx command for the current platform.
fastmcp_slim/fastmcp/cli/cli.py:48
↓ 7 callersMethod_get_verification_token
Get the token to verify from the upstream token set. When verify_id_token is enabled, returns the id_token from the upstream token re
fastmcp_slim/fastmcp/server/auth/oidc_proxy.py:479
↓ 7 callersFunction_make_file
( name: str = "test.txt", content: str = "hello world", mime_type: str = "text/plain", )
tests/apps/test_file_upload.py:37
↓ 7 callersMethod_make_tool
( self, name: str = "my_tool", properties: dict[str, Any] | None = None, requi
tests/cli/test_client_commands.py:157
↓ 7 callersFunction_prune_param
Return a new schema with *param* removed from `properties`, `required`, and (if no longer referenced) `$defs`.
fastmcp_slim/fastmcp/utilities/json_schema.py:380
↓ 7 callersFunction_sampling_content_to_google_genai_part
Convert MCP content to Google GenAI Part.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:199
↓ 7 callersFunction_scan_claude_code
Scan ``~/.claude.json`` for global and project-scoped MCP servers.
fastmcp_slim/fastmcp/cli/discovery.py:157
↓ 7 callersFunction_schema_type_label
Return a human-readable type label for a property schema.
fastmcp_slim/fastmcp/cli/generate.py:548
↓ 7 callersMethod_time_operation
Helper method to time any operation.
fastmcp_slim/fastmcp/server/middleware/timing.py:91
↓ 7 callersFunctionas_principal
(token: SDKAccessToken | None)
tests/server/test_session_provider.py:59
↓ 7 callersMethodauthorize
Start OAuth transaction and route through consent interstitial. Flow: 1. Validate client's resource matches server's resource URL (se
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1101
↓ 7 callersFunctionbuild_cache_hints
Build the per-method `CacheHint` map for the SDK low-level server. `cache_ttl` is in seconds and is converted to the wire's milliseconds. When
fastmcp_slim/fastmcp/server/caching.py:29
↓ 7 callersFunctionbuild_id_server
Server whose cart tools take an explicit `session_id: SessionId`.
tests/server/test_session_provider.py:88
↓ 7 callersFunctionbuild_server
()
tests/utilities/test_asgi_transport.py:19
↓ 7 callersFunctioncombine_lifespans
Combine multiple lifespans into a single lifespan. Useful when mounting FastMCP into FastAPI and you need to run both your app's lifespan and
fastmcp_slim/fastmcp/utilities/lifespan.py:12
↓ 7 callersFunctioncombined
(app: AppT)
fastmcp_slim/fastmcp/utilities/lifespan.py:47
↓ 7 callersFunctioncreate_jwt
Create a test JWT token.
tests/utilities/test_auth.py:15
↓ 7 callersFunctioncreate_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_openapi_features.py:25
↓ 7 callersMethodcreate_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/test_local_provider_resources.py:687
↓ 7 callersMethodcreate_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/test_local_provider_resources.py:839
↓ 7 callersMethodcreate_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/test_local_provider_prompts.py:423
↓ 7 callersMethodcreate_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/local_provider_tools/test_tags.py:42
↓ 7 callersFunctiondelegate_span
Create an INTERNAL span for provider delegation. Used by FastMCPProvider when delegating to mounted servers. Automatically records any except
fastmcp_slim/fastmcp/server/telemetry.py:305
↓ 7 callersFunctionderive_jwt_key
Derive JWT signing key from a high-entropy key material and server salt.
fastmcp_slim/fastmcp/server/auth/jwt_issuer.py:30
↓ 7 callersMethodexchange_authorization_code
( self, client: OAuthClientInformationFull, authorization_code: AuthorizationCode )
tests/server/test_auth_integration.py:74
↓ 7 callersFunctionform_body
Parse an x-www-form-urlencoded request body into a dict.
tests/client/auth/test_client_credentials.py:120
↓ 7 callersFunctionforward
Forward to parent tool with argument transformation applied. This function can only be called from within a transformed tool's custom functio
fastmcp_slim/fastmcp/tools/tool_transform.py:50
↓ 7 callersMethodfrom_file
Load configuration from JSON file.
fastmcp_slim/fastmcp/mcp_config.py:348
↓ 7 callersFunctiongenerate_cursor_deeplink
Generate a Cursor deeplink for installing the MCP server. Args: server_name: Name of the server server_config: Server configurati
fastmcp_slim/fastmcp/cli/install/cursor.py:22
↓ 7 callersMethodget_client
Fetch CIMD document and create synthetic OAuth client. Args: client_id_url: HTTPS URL pointing to CIMD document Returns:
fastmcp_slim/fastmcp/server/auth/cimd.py:726
↓ 7 callersFunctionget_fastmcp_meta
Extract FastMCP metadata from a function, handling bound methods and wrappers.
fastmcp_slim/fastmcp/decorators.py:29
↓ 7 callersMethodget_resource_template
Get a resource template by URI, filtering disabled templates. Overrides Provider.get_resource_template() to add visibility filtering after
fastmcp_slim/fastmcp/server/server.py:1181
↓ 7 callersMethodget_tasks
Get task-eligible components with all transforms applied. Overrides AggregateProvider.get_tasks() to apply server-level transforms af
fastmcp_slim/fastmcp/server/server.py:778
↓ 7 callersFunctioninstall_goose
Install FastMCP server in Goose via deeplink. Args: file: Path to the server file. server_object: Optional server object name (fo
fastmcp_slim/fastmcp/cli/install/goose.py:85
↓ 7 callersFunctionlist_skills
List all available skills from an MCP server. Discovers skills by finding resources with URIs matching the `skill://{name}/SKILL.md` pattern.
fastmcp_slim/fastmcp/utilities/skills.py:43
↓ 7 callersFunctionmake_token
(*, subject: str = "user-a")
tests/server/test_session_provider.py:48
↓ 7 callersMethodon_message
(self, context: MiddlewareContext, call_next: CallNext)
tests/server/middleware/test_message_visibility.py:32
↓ 7 callersFunctionprocess_common_args
Process common arguments shared by all install commands. Handles both fastmcp.json config files and traditional file.py:object syntax.
fastmcp_slim/fastmcp/cli/install/shared.py:58
↓ 7 callersFunctionreset_transport
Reset transport to previous value.
fastmcp_slim/fastmcp/server/context.py:105
↓ 7 callersFunctionresult_value
The `"result"` field of a direct `Tool.run()` call's structured content. `structured_content` is `dict | None` on `ToolResult` (a bare function t
tests/server/test_session_provider.py:37
↓ 7 callersMethodset_logging_level
Send a logging/setLevel request. Handshake-era servers only. `logging/setLevel` asks the server to remember a level for the rest of t
fastmcp_slim/fastmcp/client/client.py:1382
↓ 7 callersMethodset_message
Update the progress status message.
fastmcp_slim/fastmcp/server/dependencies.py:1258
↓ 7 callersMethodset_tokens
(self, tokens: OAuthToken)
fastmcp_slim/fastmcp/client/auth/oauth.py:148
↓ 7 callersFunctionset_transport
Set the current transport type. Returns token for reset.
fastmcp_slim/fastmcp/server/context.py:98
↓ 7 callersMethodstart
Start the mock OAuth server.
tests/server/auth/oauth_proxy/conftest.py:214
↓ 7 callersFunctionsuppress_fastmcp_telemetry
Suppress FastMCP's own spans without disabling trace propagation. Scoped equivalent of `telemetry_mode="propagation_only"`, for callers that
fastmcp_slim/fastmcp/telemetry.py:109
↓ 7 callersMethodto_mcp_resource_contents
Convert to MCP resource contents type. Args: uri: The URI of the resource (required by MCP types) Returns: T
fastmcp_slim/fastmcp/resources/base.py:89
↓ 7 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:724
↓ 7 callersMethodverify_token
Verify a Hugging Face OAuth token using the userinfo endpoint.
fastmcp_slim/fastmcp/server/auth/providers/huggingface.py:74
← previousnext →301–400 of 11,669, ranked by callers