Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
13,374 in github.com/PrefectHQ/fastmcp
⨍
Functions
13,374
◇
Types & classes
2,002
↳
Endpoints
150
↓ 8 callers
Function
transform_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:340
↓ 8 callers
Method
unwrap
(self)
fastmcp_slim/fastmcp/server/middleware/caching.py:155
↓ 8 callers
Function
update_task
Call the `tasks/update` handler within the given auth scope.
tests/tasks/task_helpers.py:151
↓ 8 callers
Function
validate_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 callers
Method
verify_token
Verify GitHub OAuth token by calling GitHub API.
fastmcp_slim/fastmcp/server/auth/providers/github.py:91
↓ 8 callers
Method
verify_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 callers
Function
$
(id)
status-site/app.js:1
↓ 7 callers
Method
__init__
(self, client_factory: ClientFactoryT, **kwargs: Any)
fastmcp_slim/fastmcp/server/providers/proxy.py:348
↓ 7 callers
Method
_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 callers
Function
_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 callers
Function
_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 callers
Method
_create_before_message
( self, context: MiddlewareContext[Any] )
fastmcp_slim/fastmcp/server/middleware/logging.py:56
↓ 7 callers
Method
_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:618
↓ 7 callers
Function
_elicited_field
The accepted value of *field* from the elicitation answered under *key*.
tests/conformance/server.py:428
↓ 7 callers
Method
_exchange
(self, proxy, code="test-code", **idp_token_overrides)
tests/server/auth/oauth_proxy/test_tokens.py:838
↓ 7 callers
Function
_form
(request: httpx2.Request)
tests/server/auth/oauth_proxy/test_upstream_client.py:23
↓ 7 callers
Function
_get_npx_command
Get the correct npx command for the current platform.
fastmcp_slim/fastmcp/cli/cli.py:49
↓ 7 callers
Method
_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:543
↓ 7 callers
Function
_make_file
( name: str = "test.txt", content: str = "hello world", mime_type: str = "text/plain", )
tests/apps/test_file_upload.py:37
↓ 7 callers
Method
_make_tool
( self, name: str = "my_tool", properties: dict[str, Any] | None = None, requi
tests/cli/test_client_commands.py:157
↓ 7 callers
Function
_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:514
↓ 7 callers
Function
_sampling_content_to_google_genai_part
Convert MCP content to Google GenAI Part.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:199
↓ 7 callers
Function
_scan_claude_code
Scan ``~/.claude.json`` for global and project-scoped MCP servers.
fastmcp_slim/fastmcp/cli/discovery.py:166
↓ 7 callers
Function
_schema_type_label
Return a human-readable type label for a property schema.
fastmcp_slim/fastmcp/cli/generate.py:548
↓ 7 callers
Method
_time_operation
Helper method to time any operation.
fastmcp_slim/fastmcp/server/middleware/timing.py:91
↓ 7 callers
Function
as_principal
(token: SDKAccessToken | None)
tests/server/test_session_provider.py:59
↓ 7 callers
Method
authorize
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:1116
↓ 7 callers
Method
bind
(self, address: tuple[str, int])
tests/client/auth/test_oauth_client.py:361
↓ 7 callers
Function
build_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 callers
Function
build_id_server
Server whose cart tools take an explicit `session_id: SessionId`.
tests/server/test_session_provider.py:88
↓ 7 callers
Function
build_regex
Build regex pattern for URI template, handling RFC 6570 syntax. Supports: - `{var}` - simple path parameter - `{var*}` - wildcard path pa
fastmcp_slim/fastmcp/resources/template.py:160
↓ 7 callers
Function
build_server
()
tests/utilities/test_asgi_transport.py:19
↓ 7 callers
Method
check
Run one check. A `known_gap` check is expected to fail and is reported without failing the run; if it starts passing, the run fails so the
tests/downstream/_harness.py:185
↓ 7 callers
Function
combine_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 callers
Function
combined
(app: AppT)
fastmcp_slim/fastmcp/utilities/lifespan.py:47
↓ 7 callers
Function
create_jwt
Create a test JWT token.
tests/utilities/test_auth.py:15
↓ 7 callers
Function
create_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_openapi_features.py:25
↓ 7 callers
Method
create_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/test_local_provider_resources.py:687
↓ 7 callers
Method
create_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/test_local_provider_resources.py:839
↓ 7 callers
Method
create_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/test_local_provider_prompts.py:423
↓ 7 callers
Method
create_server
(self, include_tags=None, exclude_tags=None)
tests/server/providers/local_provider_tools/test_tags.py:42
↓ 7 callers
Function
create_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:443
↓ 7 callers
Function
delegate_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 callers
Method
disable_components
Disable components matching criteria for this session only. Session rules override global transforms. Rules accumulate - each call ad
fastmcp_slim/fastmcp/server/context.py:1237
↓ 7 callers
Method
form
()
tests/server/providers/test_prefab_roundtrip.py:269
↓ 7 callers
Function
form_body
Parse an x-www-form-urlencoded request body into a dict.
tests/client/auth/test_client_credentials.py:120
↓ 7 callers
Function
forward
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:47
↓ 7 callers
Method
from_file
Load configuration from JSON file.
fastmcp_slim/fastmcp/mcp_config.py:351
↓ 7 callers
Function
generate_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 callers
Method
get_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:748
↓ 7 callers
Function
get_fastmcp_meta
Extract FastMCP metadata from a function, handling bound methods and wrappers.
fastmcp_slim/fastmcp/decorators.py:29
↓ 7 callers
Method
get_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 callers
Method
http_client
An `httpx2.AsyncClient` bound to the in-process app, for raw HTTP assertions. Relative URLs resolve against the server's base URL, and absolu
fastmcp_slim/fastmcp/utilities/tests.py:273
↓ 7 callers
Function
install_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 callers
Function
issue
(module, number=1)
tests/test_issue_ranking.py:22
↓ 7 callers
Function
list_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 callers
Method
list_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:184
↓ 7 callers
Function
make_token
(*, subject: str = "user-a")
tests/server/test_session_provider.py:48
↓ 7 callers
Function
nested_union_schema
Each level is a union of three references to the level below.
tests/utilities/test_json_schema_expansion.py:13
↓ 7 callers
Method
on_message
(self, context: MiddlewareContext, call_next: CallNext)
tests/server/middleware/test_message_visibility.py:32
↓ 7 callers
Function
original
()
tests/client/group/test_client_group.py:332
↓ 7 callers
Function
record
(operation: str, ctx: Context)
tests/server/providers/proxy/test_proxy_request_meta.py:49
↓ 7 callers
Method
replay_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:166
↓ 7 callers
Function
reset_transport
Reset transport to previous value.
fastmcp_slim/fastmcp/server/context.py:104
↓ 7 callers
Function
restrict_tag
Require scopes when the accessed component has a specific tag.
fastmcp_slim/fastmcp/utilities/authorization.py:197
↓ 7 callers
Function
result_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 callers
Method
search
Search for available tools by query. Returns matching tools ranked by relevance.
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:385
↓ 7 callers
Method
set_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:1433
↓ 7 callers
Method
set_message
Update the progress status message.
fastmcp_slim/fastmcp/server/dependencies.py:1332
↓ 7 callers
Method
set_tokens
(self, tokens: OAuthToken)
fastmcp_slim/fastmcp/client/auth/oauth.py:148
↓ 7 callers
Function
set_transport
Set the current transport type. Returns token for reset.
fastmcp_slim/fastmcp/server/context.py:97
↓ 7 callers
Function
suppress_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 callers
Method
to_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 callers
Method
update_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:747
↓ 7 callers
Method
verify_token
Verify a Hugging Face OAuth token using the userinfo endpoint.
fastmcp_slim/fastmcp/server/auth/providers/huggingface.py:74
↓ 6 callers
Function
CurrentContext
Get the current FastMCP Context instance. This dependency provides access to the active FastMCP Context for the current MCP operation (tool/r
fastmcp_slim/fastmcp/server/dependencies.py:1016
↓ 6 callers
Method
__init__
Initialize a Stdio transport. Args: command: The command to run (e.g., "python", "node", "uvx") args: The ar
fastmcp_slim/fastmcp/client/transports/stdio.py:33
↓ 6 callers
Method
__init__
( self, reload: bool = False, supporting_files: Literal["template", "resources"] = "te
fastmcp_slim/fastmcp/server/providers/skills/vendor_providers.py:54
↓ 6 callers
Function
_b64_decoded_size
Return the exact decoded byte-length of a base64 string without decoding it.
fastmcp_slim/fastmcp/apps/file_upload.py:74
↓ 6 callers
Function
_cached_server
An SDK MCPServer whose tools/list carries a positive ttlMs hint at 2026.
tests/client/client/test_response_cache.py:28
↓ 6 callers
Function
_decode
(value: Any)
fastmcp_tasks/fastmcp_tasks/input_store.py:127
↓ 6 callers
Function
_derive_server_name
Derive a human-friendly name from a server spec.
fastmcp_slim/fastmcp/cli/generate.py:790
↓ 6 callers
Method
_exists
Whether a session record exists for this `(principal, session_id)`. True only once `create_session` has written the creation marker. A raw
fastmcp_slim/fastmcp/server/sessions.py:237
↓ 6 callers
Function
_fetch_latest_version
Fetch the latest version from PyPI. Args: include_prereleases: If True, include pre-release versions (alpha, beta, rc). Returns:
fastmcp_slim/fastmcp/utilities/version_check.py:67
↓ 6 callers
Function
_get_auth_partition_key
Return a stable, hashed identifier for the current access token. Cache entries are partitioned by access token so that responses filtered by
fastmcp_slim/fastmcp/server/middleware/caching.py:652
↓ 6 callers
Method
_get_visibility_rules
Load visibility rule dicts from session state.
fastmcp_slim/fastmcp/server/context.py:1191
↓ 6 callers
Function
_hash_schema
Generate a deterministic hash for schema caching.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:379
↓ 6 callers
Method
_load_raw
Read the session's full stored dict, or `None` when the key is unset.
fastmcp_slim/fastmcp/server/sessions.py:215
↓ 6 callers
Method
_log_error
Log error with appropriate detail level.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:57
↓ 6 callers
Function
_loop_thread_id
()
tests/tools/test_tool_run_in_thread.py:22
↓ 6 callers
Function
_make_call_tool_cache_key
Make a cache key for a tool call using name, version, and arguments.
fastmcp_slim/fastmcp/server/middleware/caching.py:685
↓ 6 callers
Function
_make_upstream_token_set
Create an UpstreamTokenSet with optional id_token.
tests/server/auth/test_oidc_proxy_token.py:47
↓ 6 callers
Function
_normalize_server_entry
Normalize editor-specific server config fields to MCPConfig format. Handles two known differences: - Claude Code uses ``type`` where MCPConfi
fastmcp_slim/fastmcp/cli/discovery.py:68
↓ 6 callers
Function
_parse_env_var
Parse environment variable string in format KEY=VALUE.
fastmcp_slim/fastmcp/cli/cli.py:63
↓ 6 callers
Method
_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:492
↓ 6 callers
Function
_schema_to_type
Convert schema to appropriate Python type, within the conversion limits.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:628
↓ 6 callers
Method
_setup_expired_session
Set up a proxy JWT pointing at an expired upstream token. Returns the proxy JWT (access token) that can be passed to load_access_toke
tests/server/auth/oauth_proxy/test_tokens.py:1388
↓ 6 callers
Function
_start_flow
Register client and start auth; returns (txn_id, consent_url).
tests/server/auth/test_oauth_consent_page.py:67
↓ 6 callers
Function
_texts
Text from CallToolResult.content blocks (TextContent).
tests/server/test_protocol_eras.py:78
↓ 6 callers
Function
_tools_result
()
tests/client/client/test_kv_response_cache.py:34
← previous
next →
401–500 of 13,374, ranked by callers