Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
15,976 in github.com/PrefectHQ/fastmcp
⨍
Functions
15,976
◇
Types & classes
2,233
↳
Endpoints
189
↓ 3 callers
Method
run
( self, code: str, *, inputs: dict[str, Any] | None = None, external_f
tests/experimental/transforms/test_code_mode.py:72
↓ 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:214
↓ 3 callers
Function
safe_create_model
Create a Pydantic model whose field names come from untrusted input. Each property name only ever becomes a field. A reserved name is stored
fastmcp_slim/fastmcp/utilities/json_schema_type.py:1233
↓ 3 callers
Method
save
(self, configuration: HorizonConfiguration)
fastmcp_slim/fastmcp/cli/deploy/configuration.py:49
↓ 3 callers
Method
save_for_origin
Save a key only while its issuing Horizon origin is active.
fastmcp_slim/fastmcp/cli/deploy/credentials.py:84
↓ 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:343
↓ 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:186
↓ 3 callers
Function
server_for
(responses: dict[str, Any], *, validate_output: bool = True)
tests/server/providers/openapi/test_bodiless_success_responses.py:59
↓ 3 callers
Function
skills_client
(provider: SkillManifestProvider)
tests/skills/test_manifest_provider.py:37
↓ 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:416
↓ 3 callers
Function
stdio_transport
A FastMCP StdioTransport for the smoke server; imported lazily so consumers that reach FastMCP only over the wire never import it.
tests/downstream/_harness.py:85
↓ 3 callers
Method
stop
Stop the mock OAuth server.
tests/server/auth/oauth_proxy/conftest.py:251
↓ 3 callers
Function
summarize_credit
Count unique human contributors and identify first-time history checks. GitHub's first-time candidates and supplemental contributors need a histo
scripts/release_contributor_credit.py:253
↓ 3 callers
Method
system_one
(self, state: Any, questions: Any)
fastmcp_slim/fastmcp/experimental/transforms/jev_search.py:57
↓ 3 callers
Function
task_server
( url: str, provider: CredentialProvider | None, *, clone_extension: bool = False )
tests/integration_tests/test_task_credentials.py:92
↓ 3 callers
Method
to_mcp_prompt_result
Convert to MCP GetPromptResult.
fastmcp_slim/fastmcp/prompts/base.py:192
↓ 3 callers
Method
to_mcp_result
Convert to MCP ReadResourceResult. Args: uri: The URI of the resource (required by MCP types) Returns: MCP R
fastmcp_slim/fastmcp/resources/base.py:198
↓ 3 callers
Method
to_mcp_template
Convert the resource template to an SDKResourceTemplate.
fastmcp_slim/fastmcp/resources/template.py:586
↓ 3 callers
Function
tool
(fn: F)
fastmcp_slim/fastmcp/tools/function_tool.py:571
↓ 3 callers
Method
tool
()
tests/server/mount/test_mount.py:33
↓ 3 callers
Method
transport
A FastMCP client transport wired to the in-process app. Accepts the same keyword arguments as the underlying transport (`headers`, `a
fastmcp_slim/fastmcp/utilities/tests.py:324
↓ 3 callers
Function
validate
(token: str = Depends(get_token))
tests/server/test_dependencies.py:705
↓ 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
Function
verify_links
Return verified candidates plus counts of unsupported and unverified links.
examples/apps/media_picker/media_picker_server.py:133
↓ 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
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
visit
(directory: Path, prefix: str)
fastmcp_slim/fastmcp/skills/provider.py:405
↓ 3 callers
Function
wait_for_log_content
Poll a log file until it contains the expected text. The subprocess's stderr is redirected straight to the file at the OS level (no async pum
tests/client/test_stdio.py:44
↓ 3 callers
Method
write_to_file
Write configuration to JSON file.
fastmcp_slim/fastmcp/mcp_config.py:396
↓ 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:1454
↓ 2 callers
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
fastmcp_slim/fastmcp/client/group.py:173
↓ 2 callers
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc_value: BaseException | None,
fastmcp_slim/fastmcp/server/dependencies.py:1330
↓ 2 callers
Method
__aexit__
(self, exc_type, exc_val, exc_tb)
tests/server/test_dependencies.py:28
↓ 2 callers
Method
__del__
Ensure that we send a disconnection signal to the transport task if we are being garbage collected.
fastmcp_slim/fastmcp/client/transports/stdio.py:328
↓ 2 callers
Method
__init__
(self, code: int, message: str, data: Any = None)
fastmcp_slim/fastmcp/exceptions.py:24
↓ 2 callers
Method
__init__
( self, content: list[ContentBlock] | Any | None = None, structured_content: dict[str,
fastmcp_slim/fastmcp/tools/base.py:169
↓ 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:337
↓ 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:156
↓ 2 callers
Method
__init__
( self, client: httpx2.AsyncClient, route: HTTPRoute, director: RequestDirecto
fastmcp_slim/fastmcp/server/providers/openapi/components.py:207
↓ 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:165
↓ 2 callers
Method
__init__
Create Message with automatic serialization. Args: content: The message content. str passes through directly.
fastmcp_slim/fastmcp/prompts/base.py:65
↓ 2 callers
Method
__init__
(self, name: str, calls: list[str])
tests/server/providers/test_fastmcp_provider.py:17
↓ 2 callers
Method
__init__
(self)
tests/server/providers/proxy/test_skills.py:35
↓ 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:67
↓ 2 callers
Function
_all_lists
Return state updates for all three status lists.
examples/apps/approvals/approvals_server.py:147
↓ 2 callers
Function
_apply_set_cookies
(cookies: dict[str, str], response)
tests/server/auth/test_oauth_consent_page.py:128
↓ 2 callers
Function
_assert_backend_connection_meta
The backend request carries the backend connection's own envelope. On a handshake-era backend the reserved keys are absent. On a modern backe
tests/server/providers/proxy/test_proxy_request_meta.py:92
↓ 2 callers
Function
_auth_app
( transport: Literal["http", "sse"], auth: AuthProvider )
tests/server/http/test_http_auth_middleware.py:185
↓ 2 callers
Method
_authorize
(self, oauth_proxy: OAuthProxy, redirect_uri: str)
tests/server/auth/oauth_proxy/test_authorization.py:294
↓ 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
↓ 2 callers
Method
_bind
Bind this extension to its FastMCP instance (called by `add_extension`). A weak reference avoids a reference cycle between the server and its
fastmcp_slim/fastmcp/server/extensions.py:206
↓ 2 callers
Function
_block_containing
Execute the one code block on `page` that contains `needle`.
tests/docs/test_upgrade_guide_equivalence.py:32
↓ 2 callers
Function
_build
(transform)
tests/server/transforms/test_model_visibility_boundary.py:35
↓ 2 callers
Method
_build_response_cache
Build the SEP-2549 response cache from the `cache=` argument. Response caching is opt-in: `None` (the default) and `False` both leave it
fastmcp_slim/fastmcp/client/client.py:612
↓ 2 callers
Function
_build_test_server
()
tests/cli/test_generate_cli_remote.py:26
↓ 2 callers
Function
_cached_server
An SDK MCPServer whose tools/list carries a positive ttlMs hint at 2026.
tests/client/client/test_kv_response_cache.py:51
↓ 2 callers
Method
_calculate_delay
Calculate delay for the given attempt number.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:204
↓ 2 callers
Function
_call_result_to_dict
Serialize a ``CallToolResult`` to a JSON-safe dict.
fastmcp_slim/fastmcp/cli/client.py:610
↓ 2 callers
Method
_call_without_validating
Call through a client that does not enforce the schema itself.
tests/server/providers/proxy/test_proxy_server.py:1294
↓ 2 callers
Function
_cancelled_key
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:441
↓ 2 callers
Method
_candidate_sources
(self)
fastmcp_slim/fastmcp/skills/extension.py:96
↓ 2 callers
Method
_catalog
(self)
fastmcp_slim/fastmcp/skills/provider.py:262
↓ 2 callers
Function
_catalog_hash
SHA256 hash of sorted tool names and searchable text for staleness detection.
fastmcp_slim/fastmcp/server/transforms/search/bm25.py:83
↓ 2 callers
Method
_challenge_context
Build shared scope and resource metadata challenge parameters.
fastmcp_slim/fastmcp/server/auth/middleware.py:131
↓ 2 callers
Function
_check_nesting
Raise `ValueError` if dicts and lists in the schema nest too deeply. Normalizing and hashing a schema recurse once per level of nesting. This
fastmcp_slim/fastmcp/utilities/json_schema_type.py:112
↓ 2 callers
Function
_checked
(source: Source, source_id: str)
examples/apps/media_picker/media_picker_server.py:159
↓ 2 callers
Function
_choice_literal
Build a Literal type that accepts exactly the given choices.
fastmcp_slim/fastmcp/server/elicitation.py:268
↓ 2 callers
Method
_cleanup_expired
Remove all entries whose TTL has elapsed.
fastmcp_slim/fastmcp/utilities/token_cache.py:150
↓ 2 callers
Method
_cleanup_expired_jtis
(self)
fastmcp_slim/fastmcp/server/auth/identity_assertion.py:244
↓ 2 callers
Method
_cleanup_expired_jtis
Remove expired JTIs from cache.
fastmcp_slim/fastmcp/server/auth/cimd.py:520
↓ 2 callers
Method
_client
(self)
fastmcp_slim/fastmcp/skills/_proxy.py:89
↓ 2 callers
Function
_client_info_server
()
tests/client/client/test_initialize.py:12
↓ 2 callers
Function
_coerce_tool_transform_configs
(tools: dict[str, Any])
fastmcp_slim/fastmcp/mcp_config.py:76
↓ 2 callers
Function
_collect_stats
Collect a full snapshot of system stats.
examples/apps/system_monitor/system_monitor_server.py:48
↓ 2 callers
Method
_compiled_pattern
This template's path pattern, built once per `uri_template`. Reads match every template in turn, and pydantic's private-attribute acc
fastmcp_slim/fastmcp/resources/template.py:528
↓ 2 callers
Method
_completion_target
The visible prompt or template a completion reference names, if any. Resolves without middleware, so a completion stays one request to rate
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:555
↓ 2 callers
Function
_completions
(mcp: FastMCP, mode: str)
tests/server/test_completions.py:384
↓ 2 callers
Function
_compute_summary
(rows: list[dict])
examples/apps/explorer/explorer_server.py:300
↓ 2 callers
Function
_connection_failure
Present a dead session the same way wherever it is noticed. A failed session surfaces from two places: `_connect`, when the connection never
fastmcp_slim/fastmcp/client/client.py:243
↓ 2 callers
Function
_constant
(content: bytes)
tests/skills/test_read_skill.py:172
↓ 2 callers
Function
_contains_input_required
True when `InputRequiredResult` appears anywhere in *tp*. Recurses through `TypeAliasType`, `Annotated`, and unions so a guard arm is found e
fastmcp_slim/fastmcp/tools/function_parsing.py:109
↓ 2 callers
Function
_convert_normalized
(schema: dict[str, Any], name: str | None)
fastmcp_slim/fastmcp/utilities/json_schema_type.py:385
↓ 2 callers
Function
_convert_nullable_field
Convert OpenAPI nullable field to JSON Schema type array.
fastmcp_slim/fastmcp/utilities/openapi/json_schema_converter.py:203
↓ 2 callers
Function
_convert_tool_choice_to_google_genai
Convert MCP ToolChoice to Google GenAI ToolConfig.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:203
↓ 2 callers
Method
_convert_tools_to_anthropic
Convert MCP tools to Anthropic tool format.
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:378
↓ 2 callers
Function
_cookie_max_age
(response, name: str)
tests/server/auth/test_oauth_consent_page.py:148
↓ 2 callers
Method
_cookie_signing_key
Return the key used for HMAC-signing consent cookies. Uses the upstream client secret when available, falling back to the JWT signing
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:136
↓ 2 callers
Method
_create_basic_auth_header
Create HTTP Basic Auth header value from client credentials.
fastmcp_slim/fastmcp/server/auth/providers/introspection.py:162
↓ 2 callers
Function
_create_dataclass
Create dataclass from object schema.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:1422
↓ 2 callers
Method
_create_transport
Create the transport used by a multi-server proxy backend.
fastmcp_slim/fastmcp/client/transports/config.py:309
↓ 2 callers
Function
_current_user_session
Build the per-user session for the current principal, or `None` if unauth. Resolves the store through `get_server()` rather than `get_context()`:
fastmcp_slim/fastmcp/server/sessions.py:386
↓ 2 callers
Method
_cursor
(offset: object)
tests/server/test_pagination.py:129
↓ 2 callers
Function
_decode_jwt_part
Decode a JWT part (header or payload) without signature verification. Args: token: JWT token string (header.payload.signature) pa
fastmcp_slim/fastmcp/utilities/auth.py:14
↓ 2 callers
Method
_decode_list_cookie
Decode and verify a signed base64-encoded JSON list from cookie. Returns [] if missing/invalid.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:180
↓ 2 callers
Function
_delegate_extension_interceptors
(server: FastMCP)
fastmcp_slim/fastmcp/server/extensions.py:108
↓ 2 callers
Function
_dict_to_enum_schema
Convert dict enum to SEP-1330 compliant schema pattern. Args: enum_dict: {"low": {"title": "Low Priority"}, "medium": {"title": "Medium P
fastmcp_slim/fastmcp/server/elicitation.py:382
← previous
next →
1,301–1,400 of 15,976, ranked by callers