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
↓ 6 callers
Function
_hash_schema
Generate a deterministic hash for schema caching.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:519
↓ 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
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 protocol era, name, version, and arguments.
fastmcp_slim/fastmcp/server/middleware/caching.py:709
↓ 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
Method
_maybe_cull_expired_state
Reap expired entries from the default on-disk store, at most hourly. Called on the OAuth write paths, so a long-running server keeps its
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:764
↓ 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_call_tool_result
Parse an mcp_types.CallToolResult into our CallToolResult dataclass. Args: name: Tool name (for schema lookup) result: Raw MCP pr
fastmcp_slim/fastmcp/client/mixins/tools.py:396
↓ 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:519
↓ 6 callers
Function
_proxy_upstream_error
Report an unreachable backend the same way however the failure arrived. Depending on where the dead connection is noticed, the proxy sees either
fastmcp_slim/fastmcp/server/providers/proxy.py:155
↓ 6 callers
Method
_resolve_ref
Resolves a reference to its target definition.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:161
↓ 6 callers
Method
_respond
(self, schema: dict[str, Any], response: Any)
tests/client/test_elicitation.py:819
↓ 6 callers
Function
_sanitize_name
Convert string to valid Python identifier.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:1197
↓ 6 callers
Function
_sanitize_untrusted_text
Escape rich markup and encode control chars for terminal-safe output.
fastmcp_slim/fastmcp/cli/client.py:562
↓ 6 callers
Function
_scan_goose
Scan Goose config for MCP server extensions. Goose uses YAML (``~/.config/goose/config.yaml``) with a different schema — MCP servers are defi
fastmcp_slim/fastmcp/cli/discovery.py:290
↓ 6 callers
Function
_schema_to_type
Convert schema to appropriate Python type, within the conversion limits.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:1048
↓ 6 callers
Function
_server_with_protected_v2
()
tests/server/versioning/test_auth_version_fallback.py:39
↓ 6 callers
Function
_start_flow
Register client and start auth; returns (txn_id, consent_url).
tests/server/auth/test_oauth_consent_page.py:80
↓ 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
Function
_ttl_server
()
tests/tasks/server/test_task_ttl.py:26
↓ 6 callers
Method
aclose
(self)
fastmcp_slim/fastmcp/cli/deploy/horizon_client.py:188
↓ 6 callers
Method
add_tools
(self, fastmcp: FastMCP, prefix: str = "")
tests/server/middleware/test_caching.py:162
↓ 6 callers
Function
admin_contacts_app
(calls: list[str], tags: set[str])
tests/server/test_hashed_tool_dispatch.py:404
↓ 6 callers
Method
app
(scope: Scope, receive: Receive, send: Send)
tests/utilities/test_asgi_transport.py:129
↓ 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
Method
asend
(self, value)
tests/client/auth/test_oauth_client.py:426
↓ 6 callers
Method
assert_disconnected
(client: Client)
tests/client/client/test_client.py:1111
↓ 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
Function
assertion
( key: RSAKeyPair, *, subject: str = CLIENT_ID, issuer: str = CLIENT_ID, audience: str = T
tests/server/auth/test_private_key_jwt_auth.py:54
↓ 6 callers
Function
build_injected_server
Server whose cart tools inject a per-user `session: UserSession`.
tests/server/test_session_provider.py:72
↓ 6 callers
Function
call
(name: str, **kwargs: Any)
tests/downstream/smoke_agno.py:101
↓ 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:92
↓ 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
Method
connect
()
tests/client/test_stdio.py:555
↓ 6 callers
Method
consume
Try to consume tokens from the bucket. Args: tokens: Number of tokens to consume Returns: True if tokens wer
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:109
↓ 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:53
↓ 6 callers
Function
discover_and_import
Discover files, import modules, and extract components. This is the main entry point for filesystem-based discovery. Args: root: Roo
fastmcp_slim/fastmcp/server/providers/filesystem_discovery.py:410
↓ 6 callers
Function
el
(tag, text, className)
status-site/operations.js:10
↓ 6 callers
Method
end
Invalidate the session — delete its one key and all of its state. After this the id no longer resolves through `get_session`. This is
fastmcp_slim/fastmcp/server/sessions.py:294
↓ 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:353
↓ 6 callers
Method
form
()
tests/server/providers/test_prefab_roundtrip.py:302
↓ 6 callers
Method
from_files
Create a skill from relative paths mapped to text or bytes. `files` must include `SKILL.md` with valid frontmatter.
fastmcp_slim/fastmcp/skills/skill.py:263
↓ 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:978
↓ 6 callers
Method
get_prompt
Get prompt by transformed name with all transforms applied. Note: This method does NOT filter disabled components. The Server (FastMC
fastmcp_slim/fastmcp/server/providers/base.py:429
↓ 6 callers
Method
get_span_attributes
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:520
↓ 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_tool
Get tool by transformed name with all transforms applied. Note: This method does NOT filter disabled components. The Server (FastMCP)
fastmcp_slim/fastmcp/server/providers/base.py:198
↓ 6 callers
Method
get_tool
( self, name: str, call_next: GetToolNext, *, version: VersionSpec | None = None )
tests/server/auth/test_authorization.py:1663
↓ 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:132
↓ 6 callers
Function
item
( number, *, pr=False, created="2026-10-19T15:00:00Z", closed=None, reason=None, m
tests/test_backlog_status.py:23
↓ 6 callers
Method
list_prompts
List prompts with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:419
↓ 6 callers
Method
list_resources
List resources with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:336
↓ 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:69
↓ 6 callers
Function
make_schema
(value_type: str, model: bool)
tests/utilities/json_schema_type/test_caching.py:27
↓ 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
Function
node
(tag, text, className)
status-site/app.js:43
↓ 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
on_request
Apply rate limiting to requests.
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:265
↓ 6 callers
Method
ping
Send a ping request.
fastmcp_slim/fastmcp/client/client.py:1517
↓ 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:372
↓ 6 callers
Function
principal_string
(token: SDKAccessToken)
tests/server/test_sessions.py:39
↓ 6 callers
Function
quiet
Silence loggers that report an interruption a check causes on purpose.
tests/downstream/_harness.py:136
↓ 6 callers
Function
redact_backend_url
Mask the password in a backend URL so it can be printed or logged. Redis URLs carry the password in the userinfo component (`redis://user:sec
fastmcp_tasks/fastmcp_tasks/worker_cli.py:55
↓ 6 callers
Method
refresh_token
Fetch a new access token using a refresh token. If the server does not rotate the refresh token, the previous one is injected into th
fastmcp_slim/fastmcp/server/auth/oauth_proxy/upstream.py:126
↓ 6 callers
Method
register_all
Registers all marked tools, resources, and prompts with the server. This method calls ``register_tools``, ``register_resources``, and
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:302
↓ 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
Method
revoke_token
(self, token: AccessToken | RefreshToken)
tests/server/test_auth_integration.py:186
↓ 6 callers
Method
save
(name: str)
tests/server/providers/test_prefab_roundtrip.py:707
↓ 6 callers
Function
serve
Run server.py over `http`, `sse`, or `proxy` (HTTP) with bearer auth for the block.
tests/downstream/_harness.py:105
↓ 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
Method
to_audio_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:370
↓ 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_transport
(self)
fastmcp_slim/fastmcp/mcp_config.py:223
↓ 6 callers
Function
tool_identity
Read a tool's stored identity hash, if it carries one.
fastmcp_slim/fastmcp/server/providers/addressing.py:53
↓ 6 callers
Function
write_skill
(root: Path, name: str = "review")
tests/skills/test_skill.py:15
↓ 5 callers
Function
CurrentFastMCP
Get the current FastMCP server instance. This dependency provides access to the active FastMCP server. Returns: A dependency that re
fastmcp_slim/fastmcp/server/dependencies.py:1095
↓ 5 callers
Method
__init__
(self)
tests/server/middleware/test_initialization_middleware.py:120
↓ 5 callers
Function
_apply_pagination
Apply pagination to items, raising MCPError for invalid cursors. If page_size is None, returns all items without pagination.
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:63
↓ 5 callers
Method
_apply_task_transforms
Apply this provider's transforms to components bound for Docket. Registration needs the names components are called by, so renaming t
fastmcp_slim/fastmcp/server/providers/base.py:620
↓ 5 callers
Method
_backend
()
tests/server/providers/test_prefab_roundtrip.py:219
↓ 5 callers
Function
_backfill_boolean_defaults
Fill in missing boolean fields with their model defaults. HTML checkboxes omit the field entirely when unchecked, so the submitted data dict
fastmcp_slim/fastmcp/apps/form.py:67
↓ 5 callers
Function
_build_stdio_from_command
Shell-split a command string into a ``StdioTransport``.
fastmcp_slim/fastmcp/cli/client.py:145
↓ 5 callers
Method
_collect_list_results
Collect successful list results, logging any exceptions. Emits a warning when the same MCP identity is returned by more than one prov
fastmcp_slim/fastmcp/server/providers/aggregate.py:196
↓ 5 callers
Method
_construct_and_capture_timeout
Construct a provider with mocked discovery, returning the timeout used.
tests/server/auth/test_oidc_proxy.py:888
↓ 5 callers
Method
_convert_tool_choice_to_anthropic
Convert MCP tool_choice to Anthropic format. Returns None for "none" mode, signaling that tools should be omitted from the request en
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:397
↓ 5 callers
Method
_create
Write the initial record so the session exists (called by `create_session`).
fastmcp_slim/fastmcp/server/sessions.py:247
↓ 5 callers
Method
_create_test_auth_provider
Helper to create a test RemoteAuthProvider with StaticTokenVerifier.
tests/server/auth/test_remote_auth_provider.py:237
↓ 5 callers
Method
_disconnect
Disconnect from session using reference counting. This method implements proper cleanup for reentrant context managers: - De
fastmcp_slim/fastmcp/client/client.py:1152
↓ 5 callers
Function
_dump
(model: Any)
tests/tasks/server/test_wire_models.py:52
↓ 5 callers
Method
_ensure_setup
Lazily register tools and resources on first access.
fastmcp_slim/fastmcp/apps/generative.py:99
↓ 5 callers
Method
_extract_scopes
Extract scopes from JWT claims. Supports both 'scope' and 'scp' claims. Checks the `scope` claim first (standard OAuth2 clai
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:521
↓ 5 callers
Function
_find_azure_provider
Extract an AzureProvider from an auth provider, unwrapping MultiAuth if needed.
fastmcp_slim/fastmcp/server/auth/providers/azure.py:848
↓ 5 callers
Function
_forwardable_request_meta
Frontend request metadata that may cross onto the backend connection. This is the proxy's one sanctioned read of the inbound request's `_meta`:
fastmcp_slim/fastmcp/server/providers/proxy.py:182
← previous
next →
601–700 of 15,976, ranked by callers