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
↓ 2 callers
Function
_make_app
()
tests/server/http/test_session_owner_enforcement.py:44
↓ 2 callers
Method
_make_call_tool
Create the call_tool proxy that executes discovered tools.
fastmcp_slim/fastmcp/server/transforms/search/base.py:360
↓ 2 callers
Method
_make_client_key
Create a stable key for consent tracking from client_id and redirect_uri.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:95
↓ 2 callers
Method
_make_get_prompt_tool
Create the get_prompt tool.
fastmcp_slim/fastmcp/server/transforms/prompts_as_tools.py:126
↓ 2 callers
Method
_make_list_prompts_tool
Create the list_prompts tool.
fastmcp_slim/fastmcp/server/transforms/prompts_as_tools.py:93
↓ 2 callers
Method
_make_list_resources_tool
Create the list_resources tool.
fastmcp_slim/fastmcp/server/transforms/resources_as_tools.py:96
↓ 2 callers
Method
_make_read_resource_tool
Create the read_resource tool.
fastmcp_slim/fastmcp/server/transforms/resources_as_tools.py:135
↓ 2 callers
Method
_make_reader_tool
(self)
tests/server/transforms/test_catalog.py:53
↓ 2 callers
Function
_make_restoring_handler
Wrap a proxy handler to restore request_ctx before delegating.
fastmcp_slim/fastmcp/server/providers/proxy.py:1659
↓ 2 callers
Method
_make_search_tool
Create the search tool. Subclasses define the parameter schema.
fastmcp_slim/fastmcp/server/transforms/search/base.py:356
↓ 2 callers
Function
_make_summary
(entry: dict[str, Any])
fastmcp_slim/fastmcp/apps/file_upload.py:92
↓ 2 callers
Method
_make_synthetic_tool
(self)
tests/server/transforms/test_catalog.py:81
↓ 2 callers
Method
_make_task_context
( self, mcp: FastMCP, session_id: str )
tests/tasks/server/test_context_background_task.py:186
↓ 2 callers
Method
_make_task_context
( self, mcp: FastMCP, extensions: dict[str, dict[str, Any]] | None )
tests/tasks/server/test_context_background_task.py:244
↓ 2 callers
Method
_make_tool
(self, row: aiosqlite.Row)
examples/providers/sqlite/server.py:94
↓ 2 callers
Method
_matches
(self, name: str)
fastmcp_remote/fastmcp_remote/cli.py:56
↓ 2 callers
Method
_matches_tool_cache_settings
Check if the tool matches the cache settings for tool calls.
fastmcp_slim/fastmcp/server/middleware/caching.py:602
↓ 2 callers
Method
_merge_schema_with_precedence
Merge two schemas, with the override schema taking precedence. Args: base_schema: Base schema to start with override_
fastmcp_slim/fastmcp/tools/tool_transform.py:844
↓ 2 callers
Method
_message_to_create_message_result
( message: Message, )
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:336
↓ 2 callers
Method
_message_to_result_with_tools
Convert Anthropic response to CreateMessageResultWithTools.
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:407
↓ 2 callers
Function
_modern_proxy
A proxy whose backend client negotiates the modern era, so the backend can emit an `InputRequiredResult` for the proxy to round-trip.
tests/server/test_mrtr_guards_components.py:57
↓ 2 callers
Function
_mrtr_server
An SDK MCPServer whose `greet` tool elicits a name via a resolver. At 2026-07-28 the elicitation is delivered as an `InputRequiredResult`.
tests/client/client/test_input_required_driver.py:69
↓ 2 callers
Function
_multi_round_server
()
tests/client/client/test_input_required_driver.py:59
↓ 2 callers
Method
_mutate
(self, result: ResultT)
tests/server/providers/proxy/test_server_metadata.py:404
↓ 2 callers
Method
_negotiate
Run the connect-time protocol negotiation dictated by ``self.mode``. - ``"legacy"``: today's initialize handshake (populates ``initialize_res
fastmcp_slim/fastmcp/client/client.py:839
↓ 2 callers
Function
_normalize_scopes
Normalize scopes to a space-separated string (or None).
fastmcp_slim/fastmcp/client/auth/client_credentials.py:57
↓ 2 callers
Function
_normalize_yaml_types
Convert YAML-parsed types back to JSON-native types. ``yaml.safe_load`` converts ISO date-time strings to ``datetime``/``date`` objects. The
fastmcp_slim/fastmcp/utilities/json_schema_type.py:118
↓ 2 callers
Function
_object_schema_to_type
Convert an object schema to the appropriate Python type. Single source of truth for the four object-schema cases, used by both the top-level
fastmcp_slim/fastmcp/utilities/json_schema_type.py:566
↓ 2 callers
Method
_on_call_tool
Handle MCP 'tools/call' requests. A guard tool (SEP-2322 multi-round-trip) requests client input by returning an ``InputRequiredResul
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:222
↓ 2 callers
Method
_paginate_list
Generic pagination helper for list operations. Invokes a FastMCP ``_on_*`` list handler (``(ctx, params) -> result``) page by page. T
fastmcp_slim/fastmcp/server/context.py:516
↓ 2 callers
Method
_parse_call_tool_result
Parse an mcp_types.CallToolResult into our CallToolResult dataclass. Args: name: Tool name (for schema lookup) result
fastmcp_slim/fastmcp/client/mixins/tools.py:254
↓ 2 callers
Method
_path
(self, key: Sequence[str])
scripts/rank_issues.py:381
↓ 2 callers
Function
_play_youtube_video
(fire_tv: FireTVClient, video_id: str)
examples/smart_home/src/smart_home/fire_tv/server.py:26
↓ 2 callers
Function
_post_status
( server: ASGIServer, message_url: str, headers: dict[str, str], )
tests/server/http/test_sse_host_origin_protection.py:76
↓ 2 callers
Function
_prefab_to_json
Serialize a PrefabApp, addressing its peer-tool references by identity. The resolver writes each reference as ``<hash>_<local_name>``, and the
fastmcp_slim/fastmcp/tools/base.py:538
↓ 2 callers
Function
_prepare_directory
(path: Path)
fastmcp_slim/fastmcp/cli/deploy/state.py:87
↓ 2 callers
Method
_prepare_scopes_for_upstream_refresh
Prepare scopes for upstream token refresh request. Override this method to transform scopes before sending to upstream provider. For
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1696
↓ 2 callers
Method
_prepare_transports
Create backend transports before connecting so capabilities are inspectable.
fastmcp_slim/fastmcp/client/transports/config.py:290
↓ 2 callers
Function
_propagation_only_span
Attach the incoming `_meta` trace context without creating a span. This is what separates `propagation_only` from `off`. Both create no FastM
fastmcp_slim/fastmcp/server/telemetry.py:100
↓ 2 callers
Function
_proxy
( backend: FastMCP, *, backend_mode: str, client_class: type[Client] )
tests/server/providers/proxy/test_proxy_request_meta.py:80
↓ 2 callers
Function
_query_scalar_to_str
Convert a scalar to its query-string representation. Booleans are lowercased to match JSON/OpenAPI conventions (true/false) rather than Pytho
fastmcp_slim/fastmcp/utilities/openapi/director.py:20
↓ 2 callers
Function
_quote_batch_text
Quote text for cmd.exe and the C runtime argument parser.
fastmcp_slim/fastmcp/cli/install/shared.py:58
↓ 2 callers
Function
_raise_for_status
Raise an OpenAPI-formatted error without relying on client exception types.
fastmcp_slim/fastmcp/server/providers/openapi/components.py:62
↓ 2 callers
Function
_read_stored_snapshot
Return the raw stored value of a task's snapshot key.
tests/tasks/server/test_snapshot_encryption.py:175
↓ 2 callers
Method
_read_upstream
( self, client: Client, context: Context | None )
fastmcp_slim/fastmcp/server/providers/proxy.py:1206
↓ 2 callers
Method
_record
(self, name: str, error: BaseException | None, seconds: float)
tests/downstream/_harness.py:214
↓ 2 callers
Function
_recording_backend
(seen: dict[str, _RecordedRequest])
tests/server/providers/proxy/test_proxy_request_meta.py:46
↓ 2 callers
Function
_recover_new_pid
Call `call` until it succeeds on a subprocess other than `old_pid`. `psutil.Process(pid).kill()` is asynchronous and crash recovery is transp
tests/client/test_stdio.py:83
↓ 2 callers
Function
_ref_is_mergeable_object
Whether *schema*'s ``$ref`` (if any) can be dropped by a property merge.
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:311
↓ 2 callers
Function
_relay_read_resource
Read a backend resource, surfacing a guard ask rather than driving it. Mirrors `ProxyTool.run`: on a modern backend the low-level session is used
fastmcp_slim/fastmcp/server/providers/proxy.py:215
↓ 2 callers
Function
_remove_task_session
(session_id: str, ref: weakref.ref[ServerSession])
fastmcp_tasks/fastmcp_tasks/context.py:409
↓ 2 callers
Function
_request_state_key
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:93
↓ 2 callers
Method
_request_token
(self, url: str, data: dict[str, Any])
fastmcp_slim/fastmcp/server/auth/oauth_proxy/upstream.py:84
↓ 2 callers
Function
_require_azure_identity
Raise ImportError with install instructions if azure-identity is not available.
fastmcp_slim/fastmcp/server/auth/providers/azure.py:810
↓ 2 callers
Function
_required_dt
(value: str)
scripts/rank_issues.py:254
↓ 2 callers
Method
_reset_session_state
Reset session state after disconnect or cancellation. Args: full: If True, also resets session_task and nesting_counter.
fastmcp_slim/fastmcp/client/client.py:638
↓ 2 callers
Function
_resolve_json_spec
Disambiguate a ``.json`` server spec.
fastmcp_slim/fastmcp/cli/client.py:130
↓ 2 callers
Function
_resolve_ref
Resolve JSON Schema reference to target schema.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:401
↓ 2 callers
Function
_resolve_token_storage
Wrap a token store in the FastMCP adapter, defaulting to in-memory. Unlike the interactive `OAuth` provider, M2M providers do not warn when using
fastmcp_slim/fastmcp/client/auth/client_credentials.py:77
↓ 2 callers
Function
_resource_texts
Text from ReadResourceResult.contents blocks (TextResourceContents).
tests/server/test_protocol_eras.py:83
↓ 2 callers
Function
_restore_request_context
Set the ``request_ctx``, ``_current_context`` and ``_current_server`` ContextVars from stashed values so a proxy forwarding handler relays to the
fastmcp_slim/fastmcp/server/providers/proxy.py:1608
↓ 2 callers
Function
_restore_token_expiry
Restore the persisted absolute token expiry after a token is reloaded. The inherited initializer reloads the stored token but not its expiry, so
fastmcp_slim/fastmcp/client/auth/client_credentials.py:108
↓ 2 callers
Function
_restrict_windows_access
(path: Path)
fastmcp_slim/fastmcp/cli/deploy/state.py:57
↓ 2 callers
Method
_reverse_name
Remove namespace prefix from a name, or None if no match.
fastmcp_slim/fastmcp/server/transforms/namespace.py:64
↓ 2 callers
Method
_reverse_uri
Remove namespace from a URI, or None if no match.
fastmcp_slim/fastmcp/server/transforms/namespace.py:82
↓ 2 callers
Method
_search
(self, tools: Sequence[Tool], query: str)
fastmcp_slim/fastmcp/experimental/transforms/jev_search.py:400
↓ 2 callers
Method
_select_model_from_preferences
( self, model_preferences: ModelPreferences | str | list[str] | None )
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:405
↓ 2 callers
Method
_select_model_from_preferences
( self, model_preferences: ModelPreferences | str | list[str] | None )
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:357
↓ 2 callers
Function
_send_request
Send a request while preserving transitional legacy-client errors.
fastmcp_slim/fastmcp/server/providers/openapi/components.py:77
↓ 2 callers
Function
_serialize_to_jsonable
Serialize through Pydantic, falling back for unsupported annotations.
fastmcp_slim/fastmcp/tools/base.py:76
↓ 2 callers
Method
_server
()
tests/test_exceptions.py:111
↓ 2 callers
Method
_set_auth
(self, auth: httpx2.Auth | Literal["oauth"] | str | None)
fastmcp_slim/fastmcp/client/transports/sse.py:78
↓ 2 callers
Method
_set_consent_binding_cookie
Add a consent binding entry for a transaction. This cookie binds the browser that approved consent to the IdP callback, ensuring a di
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:381
↓ 2 callers
Method
_set_list_cookie
( self: OAuthProxy, response: HTMLResponse | RedirectResponse, base_name: str,
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:198
↓ 2 callers
Method
_setup_session_with_claims
Set up a proxy JWT pointing at a valid upstream token, with optional upstream_claims.
tests/server/auth/oauth_proxy/test_tokens.py:1439
↓ 2 callers
Function
_split_declared_strictness
Pop `"additionalProperties": false` from every migrated schema, asserting it's there. FastMCP's generated tool schemas declare `"additionalProper
tests/docs/test_upgrade_guide_equivalence.py:81
↓ 2 callers
Function
_sse_session
Open an SSE stream and yield the session's message endpoint URL.
tests/server/http/test_sse_host_origin_protection.py:57
↓ 2 callers
Function
_task_key_ttl_seconds
Wall-clock TTL for a task's Redis metadata keys. Docket's ``execution_ttl`` plus a buffer (matching task creation), so a key written or refre
fastmcp_tasks/fastmcp_tasks/handlers.py:116
↓ 2 callers
Function
_task_server
()
tests/tasks/server/test_task_protocol.py:20
↓ 2 callers
Method
_template
(self)
tests/resources/test_resource_template_meta.py:39
↓ 2 callers
Function
_terminal_error_message
The best available error message for a failed task.
fastmcp_tasks/fastmcp_tasks/client.py:308
↓ 2 callers
Function
_text
One table-safe line: no pipes or line breaks from another publisher.
scripts/maintenance_status.py:387
↓ 2 callers
Function
_tokenize
Normalize and extract Unicode alphanumeric tokens.
fastmcp_slim/fastmcp/server/transforms/search/bm25.py:19
↓ 2 callers
Method
_transform_name
Apply namespace prefix to a name.
fastmcp_slim/fastmcp/server/transforms/namespace.py:60
↓ 2 callers
Method
_transport_answering
An in-memory transport whose ``server/discover`` returns ``body`` verbatim.
tests/client/client/test_mode_negotiation.py:184
↓ 2 callers
Method
_truncate_to_result
Truncate text to fit within max_size and wrap in ToolResult.
fastmcp_slim/fastmcp/server/middleware/response_limiting.py:75
↓ 2 callers
Method
_try_transparent_refresh
Refresh the upstream token transparently and update storage. Called during load_access_token when the upstream token has expired but
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:2067
↓ 2 callers
Method
_update
(self, result: ResultT)
tests/server/providers/proxy/test_server_metadata.py:105
↓ 2 callers
Function
_update_lock_key
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:458
↓ 2 callers
Method
_updates
( self, result: mcp_types.InitializeResult | mcp_types.DiscoverResult, upstream: _Upst
fastmcp_slim/fastmcp/server/providers/proxy.py:1223
↓ 2 callers
Method
_updates
(self, result: mcp_types.Result)
tests/server/providers/proxy/test_server_metadata.py:44
↓ 2 callers
Function
_wait_for_process_exit
Poll until a process has exited, raising if it's still alive after timeout.
tests/test_mcp_config.py:691
↓ 2 callers
Function
_walk_prefab_tools
Enumerate all prefab tools across the server's providers (sync walk of _components).
fastmcp_slim/fastmcp/server/providers/prefab_synthesis.py:154
↓ 2 callers
Function
_walk_tool_calls
Collect every ``toolCall`` action object in a payload tree.
fastmcp_slim/fastmcp/server/providers/prefab_payload.py:44
↓ 2 callers
Function
_worker_snapshot_headers
Read the HTTP headers snapshotted at task submission from inside a worker.
tests/server/http/test_http_dependencies.py:229
↓ 2 callers
Function
_write_cache
Write version info to cache.
fastmcp_slim/fastmcp/utilities/version_check.py:54
↓ 2 callers
Method
_write_consent_bindings
Write the consent binding map to a signed cookie.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:350
↓ 2 callers
Function
_write_map
(payload: dict[str, Any], names: dict[str, str])
fastmcp_slim/fastmcp/server/providers/prefab_payload.py:73
↓ 2 callers
Function
acquire_update_lock
Take the per-task update lock, or return False if one is already held. Serializes concurrent ``tasks/update`` calls for a task so two racing
fastmcp_tasks/fastmcp_tasks/input_store.py:462
↓ 2 callers
Function
acquire_update_lock_blocking
Wait for the per-task update lock, up to ``timeout`` seconds. ``tasks/cancel`` uses this to serialize with an in-flight ``tasks/update``: it
fastmcp_tasks/fastmcp_tasks/input_store.py:482
← previous
next →
1,201–1,300 of 13,374, ranked by callers