Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
11,669 in github.com/PrefectHQ/fastmcp
⨍
Functions
11,669
◇
Types & classes
1,774
↳
Endpoints
123
↓ 3 callers
Method
_validate_client_redirect_uri
Validate a stored transaction redirect URI before sending a browser to it.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:66
↓ 3 callers
Method
_verify_cookie
Verify and extract payload from signed cookie. Returns: payload if signature valid, None otherwise
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:103
↓ 3 callers
Function
_version_from_ctx
Extract the FastMCP component version from the request's lifted _meta.
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:88
↓ 3 callers
Function
_version_request_meta
( version: VersionSpec | None, )
fastmcp_slim/fastmcp/server/server.py:121
↓ 3 callers
Function
_wait_until_listening
Poll until the callback server's socket is accepting connections. uvicorn sets `Server.started = True` right after it binds and starts listen
tests/client/test_oauth_callback_race.py:11
↓ 3 callers
Function
_watch_filter
Filter for files that should trigger reload.
fastmcp_slim/fastmcp/cli/run.py:347
↓ 3 callers
Method
add_resources
(self, fastmcp: FastMCP, prefix: str = "")
tests/server/middleware/test_caching.py:180
↓ 3 callers
Method
add_template
Add a resource template to the server. Args: template: A ResourceTemplate instance to add Returns: The templ
fastmcp_slim/fastmcp/server/server.py:1966
↓ 3 callers
Method
aiter_bytes
()
tests/server/auth/test_ssrf_protection.py:223
↓ 3 callers
Method
app
(scope: Scope, receive: Receive, send: Send)
tests/utilities/test_asgi_transport.py:129
↓ 3 callers
Method
body
()
tests/utilities/test_asgi_transport.py:42
↓ 3 callers
Method
build
Constructs a final httpx2.Request object, handling all OpenAPI serialization. Args: route: HTTPRoute containing OpenAPI
fastmcp_slim/fastmcp/utilities/openapi/director.py:36
↓ 3 callers
Function
build_server
(transform)
tests/server/transforms/test_model_visibility_boundary.py:31
↓ 3 callers
Method
cached_connection
A transport that believes it already holds a session built for `options`.
tests/client/client/test_session.py:202
↓ 3 callers
Method
capture
Capture current context for background task execution. ``owning_tool_name``/``owning_tool_version`` identify the exact tool the call
fastmcp_tasks/fastmcp_tasks/context.py:151
↓ 3 callers
Function
check_distributed_backend
Check if Docket is configured with a distributed backend. The CLI worker runs as a separate process, so it needs Redis/Valkey to coordinate w
fastmcp_tasks/fastmcp_tasks/worker_cli.py:54
↓ 3 callers
Method
close
(self)
tests/client/client/test_client.py:447
↓ 3 callers
Method
copy
(self, **kwargs: Any)
fastmcp_slim/fastmcp/server/middleware/middleware.py:109
↓ 3 callers
Function
create_elicitation_callback
( elicitation_handler: ElicitationHandler, )
fastmcp_slim/fastmcp/client/elicitation.py:38
↓ 3 callers
Method
create_initialization_options
( self, notification_options: NotificationOptions | None = None, experimental_capabili
fastmcp_slim/fastmcp/server/low_level.py:455
↓ 3 callers
Function
create_mcp_config_server
Create a FastMCP server from a MCPConfig.
fastmcp_slim/fastmcp/cli/run.py:115
↓ 3 callers
Function
create_mcp_server
( public_key: str, auth_kwargs: dict[str, Any] | None = None, )
tests/server/auth/test_jwt_provider_bearer.py:34
↓ 3 callers
Function
create_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_parameter_collisions.py:11
↓ 3 callers
Function
create_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_performance_comparison.py:13
↓ 3 callers
Function
create_sampling_callback
( sampling_handler: SamplingHandler, )
fastmcp_slim/fastmcp/client/sampling/__init__.py:44
↓ 3 callers
Function
create_test_server
Create a FastMCP server with tools, resources, and prompts.
tests/client/test_sse.py:17
↓ 3 callers
Function
create_test_server
Create a FastMCP server with tools, resources, and prompts.
tests/client/test_streamable_http.py:19
↓ 3 callers
Method
exchange_refresh_token
Exchange FastMCP refresh token for new FastMCP access token. Implements two-tier refresh: 1. Verify FastMCP refresh token 2.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1750
↓ 3 callers
Function
fastmcp_spans
Names of spans emitted by FastMCP's own instrumentation scope.
tests/telemetry/test_interop.py:43
↓ 3 callers
Method
fn
()
tests/prompts/test_prompt.py:13
↓ 3 callers
Function
forward_raw
Forward directly to parent tool without transformation. This function bypasses all argument transformation and validation, calling the parent
fastmcp_slim/fastmcp/tools/tool_transform.py:80
↓ 3 callers
Method
from_file
Load configuration from a JSON file. Args: file_path: Path to the configuration file Returns: MCPServerConfi
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:223
↓ 3 callers
Function
get_auth_span_attributes
Get auth attributes for the current request, if authenticated.
fastmcp_slim/fastmcp/server/telemetry.py:43
↓ 3 callers
Function
get_dataclass_field
(type: type, field_name: str)
tests/utilities/json_schema_type/test_advanced.py:16
↓ 3 callers
Function
get_http_headers
Extract headers from the current HTTP request if available. Never raises an exception, even if there is no active HTTP request (in which case
fastmcp_slim/fastmcp/server/dependencies.py:536
↓ 3 callers
Method
get_span_attributes
(self)
fastmcp_slim/fastmcp/server/providers/fastmcp_provider.py:114
↓ 3 callers
Method
get_tasks
Return components eligible for background task execution. Returns components that have task_config.mode != 'forbidden'. This includes
fastmcp_slim/fastmcp/server/providers/local_provider/local_provider.py:449
↓ 3 callers
Method
get_tool
Get tool by transformed name.
fastmcp_slim/fastmcp/server/transforms/tool_transform.py:75
↓ 3 callers
Function
get_visibility_rules
Load visibility rule dicts from session state.
fastmcp_slim/fastmcp/server/transforms/visibility.py:314
↓ 3 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
↓ 3 callers
Function
install_stdio
Generate the stdio command for running a FastMCP server. Args: file: Path to the server file server_object: Optional server objec
fastmcp_slim/fastmcp/cli/install/stdio.py:21
↓ 3 callers
Method
list_prompts_mcp
Send a prompts/list request and return the complete MCP protocol result. Args: cursor: Optional pagination cursor from a previous
fastmcp_slim/fastmcp/client/mixins/prompts.py:28
↓ 3 callers
Method
list_resource_templates_mcp
Send a resources/listResourceTemplates request and return the complete MCP protocol result. Args: cursor: Optional pagination cur
fastmcp_slim/fastmcp/client/mixins/resources.py:119
↓ 3 callers
Method
list_resources
Retrieve all resources available on the server. This method automatically fetches all pages if the server paginates results, returnin
fastmcp_slim/fastmcp/client/mixins/resources.py:72
↓ 3 callers
Method
list_resources_mcp
Send a resources/list request and return the complete MCP protocol result. Args: cursor: Optional pagination cursor from a previo
fastmcp_slim/fastmcp/client/mixins/resources.py:28
↓ 3 callers
Method
list_tools
Mark tools by visibility state.
fastmcp_slim/fastmcp/server/transforms/visibility.py:210
↓ 3 callers
Function
make_issue
(author_association: str = "NONE")
tests/scripts/test_auto_close_needs_mre.py:8
↓ 3 callers
Method
on_message
Handle errors for all messages.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:109
↓ 3 callers
Method
on_request
Apply sliding window rate limiting to requests.
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:231
↓ 3 callers
Function
opt_in_meta
The per-request `_meta` block that opts the tasks extension in.
tests/tasks/task_helpers.py:51
↓ 3 callers
Function
parse_verify
Interpret the --verify value as a boolean toggle or a CA bundle path.
fastmcp_remote/fastmcp_remote/cli.py:88
↓ 3 callers
Function
parse_version_key
Parse a version string into a sortable key. Args: version: The version string, or None for unversioned. Returns: A VersionKe
fastmcp_slim/fastmcp/utilities/versions.py:197
↓ 3 callers
Method
query
(search: str)
tests/test_fastmcp_app.py:139
↓ 3 callers
Function
read_outstanding_inputs
Return a leg's outstanding input requests, keyed by surfaced key. Empty when the leg is not waiting on input. Consumed by ``tasks/get`` to bu
fastmcp_tasks/fastmcp_tasks/input_store.py:266
↓ 3 callers
Method
read_resource
Read the contents of a resource or resolved template. Args: uri (AnyUrl | str): The URI of the resource to read. Can be a string
fastmcp_slim/fastmcp/client/mixins/resources.py:267
↓ 3 callers
Function
record_span_exception
Record an exception and error status on a span.
fastmcp_slim/fastmcp/server/telemetry.py:154
↓ 3 callers
Function
recover_client_pid
Reconnect `client` and return the pid of the freshly spawned subprocess.
tests/client/test_stdio.py:107
↓ 3 callers
Function
register_task_session
Register a session for in-process background task access. Called automatically when a task is submitted to Docket. The session is stored as a
fastmcp_tasks/fastmcp_tasks/context.py:344
↓ 3 callers
Function
release_update_lock
Release the per-task update lock.
fastmcp_tasks/fastmcp_tasks/input_store.py:508
↓ 3 callers
Method
reply
(self, request_id: Any, result: dict[str, Any])
tests/client/minimal_stdio_server.py:96
↓ 3 callers
Method
reset
Clear all recorded calls.
tests/server/middleware/test_middleware.py:110
↓ 3 callers
Function
resolve_docket_settings
The effective Docket settings for `server`'s registered tasks extension. Reads the *registered* `TasksExtension`'s resolved settings, not the
fastmcp_tasks/fastmcp_tasks/worker_cli.py:29
↓ 3 callers
Method
resolve_security
Resolve the effective security policy for this template. A per-component ``security`` overrides the server default. ``INHERIT_SECURIT
fastmcp_slim/fastmcp/resources/template.py:203
↓ 3 callers
Function
resolve_ui_mime_type
Return the appropriate MIME type for a resource URI. For ``ui://`` scheme resources, defaults to ``UI_MIME_TYPE`` when no explicit MIME type
fastmcp_slim/fastmcp/utilities/mime.py:10
↓ 3 callers
Function
run_auth_checks_with_shortfall
Run auth checks with AND logic, classifying the denial cause. Returns ``(authorized, missing_scopes)``. ``missing_scopes`` names every scope
fastmcp_slim/fastmcp/utilities/authorization.py:253
↓ 3 callers
Method
run_stdio_async
Run the server using stdio transport. Args: show_banner: Whether to display the server banner log_level: Log level fo
fastmcp_slim/fastmcp/server/mixins/transport.py:216
↓ 3 callers
Function
save_visibility_rules
Save visibility rule dicts to session state and send notifications. Args: context: The context to save rules for. rules: The visi
fastmcp_slim/fastmcp/server/transforms/visibility.py:319
↓ 3 callers
Function
scope_requirements
Scopes a check list requires but the token lacks, without running it. Returns ``None`` when the list contains any opaque (non-scope) check. Such
fastmcp_slim/fastmcp/utilities/authorization.py:202
↓ 3 callers
Function
seam_span
Open the per-request SERVER span at the FastMCP middleware seam. The span is named after the method and carries the base MCP attributes (`mcp
fastmcp_slim/fastmcp/server/telemetry.py:164
↓ 3 callers
Function
send
(message: Message)
fastmcp_slim/fastmcp/utilities/asgi_transport.py:249
↓ 3 callers
Function
ssrf_safe_fetch_response
Fetch URL with SSRF protection and return response metadata. This is equivalent to :func:`ssrf_safe_fetch` but returns response headers and s
fastmcp_slim/fastmcp/server/auth/ssrf.py:413
↓ 3 callers
Method
to_mcp_prompt
Convert the prompt to an MCP prompt.
fastmcp_slim/fastmcp/prompts/base.py:236
↓ 3 callers
Method
to_mcp_prompt_result
Convert to MCP GetPromptResult.
fastmcp_slim/fastmcp/prompts/base.py:182
↓ 3 callers
Method
to_mcp_template
Convert the resource template to an SDKResourceTemplate.
fastmcp_slim/fastmcp/resources/template.py:307
↓ 3 callers
Function
tool
(fn: F)
fastmcp_slim/fastmcp/tools/function_tool.py:511
↓ 3 callers
Method
tool
()
tests/server/mount/test_mount.py:26
↓ 3 callers
Method
validate
Check all parameter values against the configured policy. String values (and lists of strings, from wildcard `{path*}` parameters tha
fastmcp_slim/fastmcp/resources/security.py:127
↓ 3 callers
Method
validate
Validate an ID-JAG and return its claims. Args: assertion: The compact-serialized ID-JAG JWT. client_id: The authenti
fastmcp_slim/fastmcp/server/auth/identity_assertion.py:327
↓ 3 callers
Function
validate_get_oidc_configuration
Validate get_oidc_configuration call.
tests/server/auth/test_oidc_proxy.py:361
↓ 3 callers
Method
verify_token
Verify and decode a FastMCP token. Validates JWT signature, expiration, issuer, audience, and token type. Args: token: J
fastmcp_slim/fastmcp/server/auth/jwt_issuer.py:232
↓ 3 callers
Method
verify_token
Verify token using the configured token verifier.
fastmcp_slim/fastmcp/server/auth/auth.py:598
↓ 3 callers
Function
version_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
↓ 3 callers
Function
wait_for_process_exit
Poll until the given pid is gone, failing clearly if it never exits. The subprocesses under test self-terminate within a fraction of a second,
tests/client/test_stdio.py:57
↓ 3 callers
Method
write_to_file
Write configuration to JSON file.
fastmcp_slim/fastmcp/mcp_config.py:342
↓ 2 callers
Function
TokenClaim
Get a specific claim from the access token. This dependency extracts a single claim value from the current access token. It's useful for gett
fastmcp_slim/fastmcp/server/dependencies.py:1346
↓ 2 callers
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
fastmcp_slim/fastmcp/server/dependencies.py:1222
↓ 2 callers
Method
__anext__
(self)
tests/client/auth/test_oauth_client.py:393
↓ 2 callers
Method
__init__
(self, code: int, message: str, data: Any = None)
fastmcp_slim/fastmcp/exceptions.py:22
↓ 2 callers
Method
__init__
Initialize a private_key_jwt OAuth provider. Args: mcp_url: Full URL to the MCP endpoint (e.g. "https://host/mcp").
fastmcp_slim/fastmcp/client/auth/client_credentials.py:321
↓ 2 callers
Method
__init__
Create ResourceResult. Args: contents: String, bytes, or list of ResourceContent objects. meta: Optional metadata abo
fastmcp_slim/fastmcp/resources/base.py:155
↓ 2 callers
Method
__init__
( self, client: httpx2.AsyncClient, route: HTTPRoute, director: RequestDirecto
fastmcp_slim/fastmcp/server/providers/openapi/components.py:144
↓ 2 callers
Method
__init__
Initialize WorkOS OAuth provider. Args: client_id: WorkOS client ID client_secret: WorkOS client secret a
fastmcp_slim/fastmcp/server/auth/providers/workos.py:161
↓ 2 callers
Method
__init__
Create Message with automatic serialization. Args: content: The message content. str passes through directly.
fastmcp_slim/fastmcp/prompts/base.py:63
↓ 2 callers
Method
__init__
(self, name: str, calls: list[str])
tests/server/providers/test_fastmcp_provider.py:17
↓ 2 callers
Function
_accepted
The accepted form content for one answered elicitation. ``ctx.input_responses`` values are the raw SDK union (``ElicitResult | CreateMessageR
tests/server/test_mrtr_guards.py:68
↓ 2 callers
Function
_all_lists
Return state updates for all three status lists.
examples/apps/approvals/approvals_server.py:147
↓ 2 callers
Function
_allof_members
Expand local schema references while collecting ``allOf`` members.
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:224
↓ 2 callers
Function
_args_key
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:81
↓ 2 callers
Function
_await_durable_creation
Block until the enqueued execution is visible (durable-create MUST). The metadata write above already makes ``tasks/get`` resolvable; this extra
fastmcp_tasks/fastmcp_tasks/creation.py:221
↓ 2 callers
Function
_b64url_json
Base64url-encode a JSON value as a JWT segment (no padding).
tests/server/auth/oauth_proxy/test_identity_assertion.py:38
← previous
next →
801–900 of 11,669, ranked by callers