Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
10,524 in github.com/PrefectHQ/fastmcp
⨍
Functions
10,524
◇
Types & classes
1,545
↳
Endpoints
103
↓ 7 callers
Method
exchange_authorization_code
( self, client: OAuthClientInformationFull, authorization_code: AuthorizationCode )
tests/server/test_auth_integration.py:74
↓ 7 callers
Function
forward
Forward to parent tool with argument transformation applied. This function can only be called from within a transformed tool's custom functio
fastmcp_slim/fastmcp/tools/tool_transform.py:51
↓ 7 callers
Method
from_file
Load configuration from JSON file.
fastmcp_slim/fastmcp/mcp_config.py:338
↓ 7 callers
Function
generate_cursor_deeplink
Generate a Cursor deeplink for installing the MCP server. Args: server_name: Name of the server server_config: Server configurati
fastmcp_slim/fastmcp/cli/install/cursor.py:22
↓ 7 callers
Method
get_client
Fetch CIMD document and create synthetic OAuth client. Args: client_id_url: HTTPS URL pointing to CIMD document Returns:
fastmcp_slim/fastmcp/server/auth/cimd.py:726
↓ 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_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:329
↓ 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:1002
↓ 7 callers
Function
get_server
Get the current FastMCP server instance directly. In a background-task worker, checks the task-server map first so that mounted-child tasks r
fastmcp_slim/fastmcp/server/dependencies.py:331
↓ 7 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_slim/fastmcp/server/tasks/context.py:82
↓ 7 callers
Function
get_tracer
Get the FastMCP tracer for creating spans. Args: version: Optional version string for the instrumentation Returns: A tracer
fastmcp_slim/fastmcp/telemetry.py:38
↓ 7 callers
Function
inject_trace_context
Inject current trace context into a meta dict for MCP request propagation. Args: meta: Optional existing meta dict to merge with trace co
fastmcp_slim/fastmcp/telemetry.py:50
↓ 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
Method
list_tools_mcp
Send a tools/list request and return the complete MCP protocol result. Args: cursor: Optional pagination cursor from a previous r
fastmcp_slim/fastmcp/client/mixins/tools.py:40
↓ 7 callers
Function
normalize_timeout_to_seconds
Normalize a timeout value to seconds (float). Args: value: Timeout value as int/float (seconds), timedelta, or None. Zero val
fastmcp_slim/fastmcp/utilities/timeout.py:28
↓ 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
reset_transport
Reset transport to previous value.
fastmcp_slim/fastmcp/server/context.py:98
↓ 7 callers
Function
server_span
Create a SERVER span with standard MCP attributes and auth context. Automatically records any exception on the span and sets error status.
fastmcp_slim/fastmcp/server/telemetry.py:57
↓ 7 callers
Method
set_mcp_path
Propagate MCP path to the server and all verifiers.
fastmcp_slim/fastmcp/server/auth/auth.py:612
↓ 7 callers
Method
set_message
Update the progress status message.
fastmcp_slim/fastmcp/server/dependencies.py:1268
↓ 7 callers
Function
set_transport
Set the current transport type. Returns token for reset.
fastmcp_slim/fastmcp/server/context.py:91
↓ 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:94
↓ 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:639
↓ 7 callers
Function
validate_url
Validate URL for SSRF and resolve to IPs. Args: url: URL to validate require_path: If True, require non-root path (for CIMD)
fastmcp_slim/fastmcp/server/auth/ssrf.py:193
↓ 7 callers
Method
verify_token
Verify a Hugging Face OAuth token using the userinfo endpoint.
fastmcp_slim/fastmcp/server/auth/providers/huggingface.py:73
↓ 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:29
↓ 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
Method
_check_client_connected
Validate that client context is still active. Raises: RuntimeError: If accessed outside client context (unless immediate)
fastmcp_slim/fastmcp/client/tasks.py:88
↓ 6 callers
Function
_derive_server_name
Derive a human-friendly name from a server spec.
fastmcp_slim/fastmcp/cli/generate.py:790
↓ 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:557
↓ 6 callers
Method
_get_visibility_rules
Load visibility rule dicts from session state.
fastmcp_slim/fastmcp/server/context.py:1318
↓ 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
Function
_hash_token
Hash a token for secure storage lookup. Uses SHA-256 to create a one-way hash. The original token cannot be recovered from the hash, providin
fastmcp_slim/fastmcp/server/auth/oauth_proxy/models.py:129
↓ 6 callers
Method
_log_error
Log error with appropriate detail level.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:58
↓ 6 callers
Function
_loop_thread_id
()
tests/tools/test_tool_run_in_thread.py:22
↓ 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
Function
_parse_model_preferences
Convert model preferences to ModelPreferences object.
fastmcp_slim/fastmcp/server/sampling/run.py:118
↓ 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:1333
↓ 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
Method
add_tools
(self, fastmcp: FastMCP, prefix: str = "")
tests/server/middleware/test_caching.py:153
↓ 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
bind
(self, address: tuple[str, int])
tests/client/auth/test_oauth_client.py:265
↓ 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:43
↓ 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
Method
connect
( self, **session_kwargs: Unpack[SessionKwargs] )
fastmcp_slim/fastmcp/client/transports/stdio.py:83
↓ 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:1364
↓ 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
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:47
↓ 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:769
↓ 6 callers
Function
get_http_headers
Return HTTP headers from an ambient server request, when available. The standalone client package has no server request context. When the full
fastmcp_slim/fastmcp/client/dependencies.py:4
↓ 6 callers
Function
get_property
(tool: Tool, name: str)
tests/tools/tool_transform/test_args.py:21
↓ 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:227
↓ 6 callers
Method
info
()
tests/server/versioning/test_mounting.py:55
↓ 6 callers
Function
inspect_fastmcp_v1
Extract information from a FastMCP v1.x instance using a Client. Args: mcp: The FastMCP v1.x instance to inspect Returns: Fa
fastmcp_slim/fastmcp/utilities/inspect.py:236
↓ 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:123
↓ 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:161
↓ 6 callers
Method
list_tools
Retrieve all tools available on the server. This method automatically fetches all pages if the server paginates results, returning th
fastmcp_slim/fastmcp/client/mixins/tools.py:69
↓ 6 callers
Method
on_message
Start ping task on first message from a session.
fastmcp_slim/fastmcp/server/middleware/ping.py:42
↓ 6 callers
Function
parse_hashed_backend_name
Parse ``<HASH_LENGTH hex>_<rest>`` → ``(hash, local_tool_name)`` or None.
fastmcp_slim/fastmcp/server/providers/addressing.py:43
↓ 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
require_docket
Raise ImportError with install instructions if docket not available. Args: feature: Description of what requires docket (e.g., "`task=Tru
fastmcp_slim/fastmcp/server/dependencies.py:140
↓ 6 callers
Function
restrict_tag
Require scopes when the accessed component has a specific tag.
fastmcp_slim/fastmcp/utilities/authorization.py:62
↓ 6 callers
Method
search
Search for available tools by query. Returns matching tools ranked by relevance.
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:276
↓ 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
Method
start
Start the mock OAuth server.
tests/server/auth/oauth_proxy/conftest.py:212
↓ 6 callers
Method
to_resource_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:407
↓ 6 callers
Method
unwrap
(self)
fastmcp_slim/fastmcp/server/middleware/caching.py:96
↓ 5 callers
Method
__init__
(self)
tests/server/middleware/test_initialization_middleware.py:110
↓ 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:115
↓ 5 callers
Function
_claude_code_config
Build a minimal ~/.claude.json structure.
tests/cli/test_discovery.py:224
↓ 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:118
↓ 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:381
↓ 5 callers
Method
_create_test_auth_provider
Helper to create a test RemoteAuthProvider with StaticTokenVerifier.
tests/server/auth/test_remote_auth_provider.py:197
↓ 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:630
↓ 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:417
↓ 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:803
↓ 5 callers
Function
_guard_status
( *, host: str, origin: str | None = None, server: tuple[str, int] | None = None, mode: Li
tests/server/http/test_http_auth_middleware.py:36
↓ 5 callers
Function
_is_loopback_host
(host: str)
fastmcp_slim/fastmcp/server/http.py:131
↓ 5 callers
Method
_list_tools
(self)
fastmcp_slim/fastmcp/server/providers/filesystem.py:192
↓ 5 callers
Function
_make_dev_app
Build the Starlette dev server application.
fastmcp_slim/fastmcp/cli/apps_dev.py:1386
↓ 5 callers
Function
_make_resolver
Create a CallTool resolver that prefixes tool names with a hash. Structurally identical to the old ``___`` resolver — ``app_name`` is the Fas
fastmcp_slim/fastmcp/apps/app.py:55
↓ 5 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:394
↓ 5 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:491
↓ 5 callers
Function
_recall_snapshot
Return the snapshot bound for ``task_id`` in the current context. Returns ``None`` if nothing is bound, or if the bound entry belongs to a di
fastmcp_slim/fastmcp/server/tasks/context.py:206
↓ 5 callers
Method
_resolve_ref
Resolves a reference to its target definition.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:153
↓ 5 callers
Function
_sanitize_untrusted_text
Escape rich markup and encode control chars for terminal-safe output.
fastmcp_slim/fastmcp/cli/client.py:409
↓ 5 callers
Function
_scan_cursor_workspace
Walk up from *start_dir* looking for ``.cursor/mcp.json``.
fastmcp_slim/fastmcp/cli/discovery.py:204
↓ 5 callers
Function
_scan_gemini
Scan Gemini CLI settings for MCP servers. Checks both user-level ``~/.gemini/settings.json`` and project-level ``.gemini/settings.json``.
fastmcp_slim/fastmcp/cli/discovery.py:231
↓ 5 callers
Function
_schema_to_type
Convert schema to appropriate Python type.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:447
← previous
next →
301–400 of 10,524, ranked by callers