Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
12,192 in github.com/PrefectHQ/fastmcp
⨍
Functions
12,192
◇
Types & classes
1,854
↳
Endpoints
123
↓ 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:1188
↓ 7 callers
Method
get_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:785
↓ 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
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
Function
make_token
(*, subject: str = "user-a")
tests/server/test_session_provider.py:48
↓ 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:331
↓ 7 callers
Function
process_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 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
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
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:1403
↓ 7 callers
Method
set_message
Update the progress status message.
fastmcp_slim/fastmcp/server/dependencies.py:1273
↓ 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:740
↓ 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
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:59
↓ 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:639
↓ 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. Handles non-JSON-native types (datetime, date, bool keys) that can appear in schemas loaded
fastmcp_slim/fastmcp/utilities/json_schema_type.py:242
↓ 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:672
↓ 6 callers
Function
_make_protocol_era_server
(name: str)
tests/test_mcp_config.py:175
↓ 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
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
↓ 6 callers
Method
add_tools
(self, fastmcp: FastMCP, prefix: str = "")
tests/server/middleware/test_caching.py:160
↓ 6 callers
Method
apply_runtime_settings
Apply runtime settings like environment variables and working directory. Args: config_path: Path to config file for resolving rel
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:85
↓ 6 callers
Function
assert_task_matches_sync
Run a tool sync and as a task; assert the inlined results are identical.
tests/tasks/server/test_task_return_types.py:49
↓ 6 callers
Method
async_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:446
↓ 6 callers
Method
bind
(self, address: tuple[str, int])
tests/client/auth/test_oauth_client.py:361
↓ 6 callers
Function
build_injected_server
Server whose cart tools inject a per-user `session: UserSession`.
tests/server/test_session_provider.py:70
↓ 6 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:46
↓ 6 callers
Function
call_sync_fn_in_threadpool
Call a sync function in a threadpool to avoid blocking the event loop. Uses anyio.to_thread.run_sync which properly propagates contextvars, m
fastmcp_slim/fastmcp/utilities/async_utils.py:26
↓ 6 callers
Method
call_tools_bulk
Call multiple tools registered on this MCP server in a single request. Each call can be for a different tool and can include differe
fastmcp_slim/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py:72
↓ 6 callers
Function
client_supports_extension
Check whether the connected client supports a given MCP extension. Inspects the ``extensions`` capability on ``ClientCapabilities`` sent by the
fastmcp_slim/fastmcp/server/low_level.py:111
↓ 6 callers
Function
configure_logging
Configure logging for FastMCP. Args: logger: the logger to configure level: the log level to use rich_kwargs: the pa
fastmcp_slim/fastmcp/utilities/logging.py:42
↓ 6 callers
Function
create_oauth_callback_server
Create an OAuth callback server. Args: port: The port to run the server on callback_path: The path to listen for OAuth redir
fastmcp_slim/fastmcp/client/oauth_callback.py:114
↓ 6 callers
Function
current_principal
The authenticated principal for the current request as a compact JSON string. Returns the `(client_id, issuer, subject)` triple encoded as compac
fastmcp_slim/fastmcp/server/sessions.py:139
↓ 6 callers
Function
decode_jwt_payload
Decode JWT payload without signature verification. Use only for tokens received directly from trusted sources (e.g., IdP token endpoints). A
fastmcp_slim/fastmcp/utilities/auth.py:49
↓ 6 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
↓ 6 callers
Method
disconnect
(self)
fastmcp_slim/fastmcp/client/transports/stdio.py:169
↓ 6 callers
Method
find_config
Find a fastmcp.json file in the specified directory. Args: start_path: Directory to look in (defaults to current directory)
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:323
↓ 6 callers
Method
form
()
tests/server/providers/test_prefab_roundtrip.py:269
↓ 6 callers
Method
get_calls
Get all recorded calls for a specific method or hook. Args: method: The method to filter by (e.g. "tools/list")
tests/server/middleware/test_middleware.py:48
↓ 6 callers
Method
get_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:919
↓ 6 callers
Function
get_property
(tool: Tool, name: str)
tests/tools/tool_transform/test_args.py:21
↓ 6 callers
Method
get_resource
Get a resource by URI, filtering disabled resources. Overrides Provider.get_resource() to add visibility filtering after all transfor
fastmcp_slim/fastmcp/server/server.py:1056
↓ 6 callers
Function
get_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 callers
Method
get_span_attributes
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:472
↓ 6 callers
Function
get_task_context
Get the current task context if running inside a background task worker. This function extracts task information from the Docket execution contex
fastmcp_tasks/fastmcp_tasks/context.py:88
↓ 6 callers
Method
get_token_expiry
(self)
fastmcp_slim/fastmcp/client/auth/oauth.py:168
↓ 6 callers
Function
get_tracer
Get the FastMCP tracer for creating spans. Instrumentation is on by default. FastMCP uses only the OpenTelemetry API, so span creation is a n
fastmcp_slim/fastmcp/telemetry.py:128
↓ 6 callers
Function
install_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 callers
Function
issubclass_safe
Check if cls is a subclass of base, even if cls is a type variable.
fastmcp_slim/fastmcp/utilities/types.py:128
↓ 6 callers
Method
issue_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:175
↓ 6 callers
Function
load_secret
(store: CredentialStore)
tests/cli/deploy/test_credentials.py:33
↓ 6 callers
Function
make_restricted_tag_server
()
tests/server/auth/test_authorization.py:52
↓ 6 callers
Function
make_token
( *, subject: str = "user-a", client_id: str = "client-1" )
tests/server/test_sessions.py:27
↓ 6 callers
Function
native_spans_enabled
Whether FastMCP should create its own spans right now.
fastmcp_slim/fastmcp/telemetry.py:103
↓ 6 callers
Method
new
Create a new client instance with the same configuration but fresh session state. This creates a new client with the same transport, handlers
fastmcp_slim/fastmcp/client/client.py:751
↓ 6 callers
Method
new
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:1788
↓ 6 callers
Function
normalize_api_origin
Validate and normalize a Horizon API origin.
fastmcp_slim/fastmcp/cli/deploy/horizon_client.py:129
↓ 6 callers
Function
normalize_completion
Coerce a handler's return value into a wire ``Completion``. A returned ``str`` is rejected: it is almost always a mistake (the value would it
fastmcp_slim/fastmcp/server/completions.py:54
↓ 6 callers
Method
prepare
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 callers
Function
principal_string
(token: SDKAccessToken)
tests/server/test_sessions.py:39
↓ 6 callers
Function
require_docket
Raise ImportError with install instructions if docket not available. Args: feature: Description of what requires docket (e.g., "`task=Tru
fastmcp_tasks/fastmcp_tasks/dependencies.py:45
↓ 6 callers
Function
restrict_tag
Require scopes when the accessed component has a specific tag.
fastmcp_slim/fastmcp/utilities/authorization.py:197
↓ 6 callers
Method
run
(self)
tests/client/minimal_stdio_server.py:171
↓ 6 callers
Method
save
(name: str)
tests/server/providers/test_prefab_roundtrip.py:674
↓ 6 callers
Function
serialize_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 callers
Function
session_id_parameter_names
Names of a function's parameters annotated with `SessionId`. Scans resolved type hints for `Annotated[str, _SessionIdMarker()]` metadata. Ret
fastmcp_slim/fastmcp/server/sessions.py:343
↓ 6 callers
Function
session_storage_key
The single storage key holding a session's state dict. Keyed by `(principal, session_id)`: the principal is the isolation wall, the id organi
fastmcp_slim/fastmcp/server/sessions.py:164
↓ 6 callers
Function
to_mcp_error
Translate a FastMCP exception into a wire-format ``MCPError``. Central mapping from FastMCP's public exception types to the JSON-RPC error co
fastmcp_slim/fastmcp/exceptions.py:117
↓ 6 callers
Method
to_mcp_result
( self, )
fastmcp_slim/fastmcp/tools/base.py:171
↓ 6 callers
Method
to_transport
(self)
fastmcp_slim/fastmcp/mcp_config.py:213
↓ 6 callers
Method
to_transport
(self)
tests/test_mcp_config.py:101
↓ 6 callers
Method
unwrap
(self)
fastmcp_slim/fastmcp/server/middleware/caching.py:142
↓ 6 callers
Method
verify_token
Verify a bearer token and return access info if valid. This method implements the TokenVerifier protocol by delegating to ou
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:631
↓ 5 callers
Method
__init__
(self)
tests/server/middleware/test_initialization_middleware.py:120
↓ 5 callers
Method
_backend
()
tests/server/providers/test_prefab_roundtrip.py:186
← previous
next →
401–500 of 12,192, ranked by callers