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
↓ 9 callers
Method
_build_url
Build URL by substituting path parameters in the template. Args: path_template: OpenAPI path template (e.g., "/users/{id
fastmcp_slim/fastmcp/utilities/openapi/director.py:751
↓ 9 callers
Function
_convert_to_content
Convert a result to a sequence of content objects.
fastmcp_slim/fastmcp/tools/base.py:713
↓ 9 callers
Function
_elicit_request
A single-field form elicitation for *field*.
tests/conformance/server.py:397
↓ 9 callers
Method
_exchange
(self, proxy, code="test-code", **idp_token_overrides)
tests/server/auth/oauth_proxy/test_tokens.py:960
↓ 9 callers
Function
_form
(request: httpx2.Request)
tests/server/auth/oauth_proxy/test_upstream_client.py:23
↓ 9 callers
Function
_form_fields
(request: httpx2.Request)
tests/server/providers/openapi/test_object_request_bodies.py:245
↓ 9 callers
Function
_key
( partition: str, *, method: str = "tools/list", params_key: str = "" )
tests/client/client/test_kv_response_cache.py:42
↓ 9 callers
Function
_opted_in_request
Bind a request context carrying the tasks opt-in for a `tools/call`.
tests/tasks/task_helpers.py:85
↓ 9 callers
Function
_prefix
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:77
↓ 9 callers
Method
_prefix_scopes_for_azure
Prefix unprefixed custom API scopes with identifier_uri for Azure. This helper centralizes the scope prefixing logic used in both aut
fastmcp_slim/fastmcp/server/auth/providers/azure.py:439
↓ 9 callers
Function
_response_to_result_with_tools
Convert Google GenAI response to CreateMessageResultWithTools.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:410
↓ 9 callers
Function
_sampling_content_to_google_genai_part
Convert MCP content to Google GenAI Part.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:233
↓ 9 callers
Function
_serialize_to_jsonable
Serialize through the real JSON serialization contract. The value is serialized to JSON and parsed back, so the output is exactly what would
fastmcp_slim/fastmcp/tools/base.py:119
↓ 9 callers
Function
_strip_remote_refs
Return a deep copy of *obj* with non-local ``$ref`` values removed. Local refs (starting with ``#``) are kept intact. Remote refs (``http://
fastmcp_slim/fastmcp/utilities/json_schema.py:218
↓ 9 callers
Function
_to_python_identifier
Sanitize a string into a valid Python identifier.
fastmcp_slim/fastmcp/cli/generate.py:201
↓ 9 callers
Function
apply_session_transforms
Apply session-specific visibility transforms to components. This helper applies session-level enable/disable rules by marking components with
fastmcp_slim/fastmcp/server/transforms/visibility.py:545
↓ 9 callers
Function
as_principal
(token: SDKAccessToken | None)
tests/server/test_session_provider.py:61
↓ 9 callers
Function
check_for_newer_version
Check if a newer version of FastMCP is available. Returns: The latest version string if newer than current, None otherwise.
fastmcp_slim/fastmcp/utilities/version_check.py:132
↓ 9 callers
Function
child
(*skills: Skill)
tests/skills/test_composition.py:26
↓ 9 callers
Function
extract_query_params
Extract query parameter names from RFC 6570 query expressions. Both the `{?param1,param2}` form and the `{¶m}` continuation form contribu
fastmcp_slim/fastmcp/resources/template.py:45
↓ 9 callers
Function
fetch_json
Fetch a well-known document from a mounted authenticated server.
tests/server/auth/test_issuer_url_identity.py:100
↓ 9 callers
Function
form_body
Parse an x-www-form-urlencoded request body into a dict.
tests/client/auth/test_client_credentials.py:121
↓ 9 callers
Function
format_tool_signature
Build ``name(param: type, ...) -> return_type`` from a tool's JSON schemas.
fastmcp_slim/fastmcp/cli/client.py:523
↓ 9 callers
Function
generate_goose_deeplink
Generate a Goose deeplink for installing an MCP extension. Args: name: Human-readable display name for the extension. command: Th
fastmcp_slim/fastmcp/cli/install/goose.py:29
↓ 9 callers
Method
get_oidc_configuration
Gets the OIDC configuration for the specified configuration URL. Args: config_url: The OIDC configuration URL strict:
fastmcp_slim/fastmcp/server/auth/oidc_proxy.py:570
↓ 9 callers
Method
get_routes
Get OAuth routes with custom handlers for better error UX. This method creates standard OAuth routes and replaces: - /authorize endpo
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:2564
↓ 9 callers
Method
increment
Atomically increment the current progress value.
fastmcp_slim/fastmcp/server/dependencies.py:1361
↓ 9 callers
Method
is_cimd_client_id
Check if a client_id looks like a CIMD URL. CIMD URLs must be HTTPS with a host and non-root path.
fastmcp_slim/fastmcp/server/auth/cimd.py:307
↓ 9 callers
Function
is_ip_allowed
Check if an IP address is allowed (must be globally routable unicast). Uses ip.is_global which catches: - Private (10.x, 172.16-31.x, 192.168
fastmcp_slim/fastmcp/server/auth/ssrf.py:140
↓ 9 callers
Method
load_server
Load and return the FastMCP server instance. Must be called after prepare() if the source requires preparation. All information neede
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/sources/base.py:22
↓ 9 callers
Function
make_auth_server
(*middleware: Middleware)
tests/server/middleware/test_tool_injection.py:305
↓ 9 callers
Function
make_skill
(path: Path, content: str = "# Instructions")
tests/server/providers/test_skill_main_files.py:19
↓ 9 callers
Function
make_token
(*, subject: str = "user-a")
tests/server/test_session_provider.py:50
↓ 9 callers
Function
mode
Set `fastmcp.settings.telemetry_mode` for the duration of a test.
tests/telemetry/test_interop.py:34
↓ 9 callers
Method
model_validate_json
Deprecated 4.1 alias for `MCPSkill.model_validate_json`.
fastmcp_slim/fastmcp/skills/skill.py:204
↓ 9 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
↓ 9 callers
Method
on_list
List all stored files. Args: ctx: The current request context. Override this method for custom persistence. The default
fastmcp_slim/fastmcp/apps/file_upload.py:292
↓ 9 callers
Method
on_read
Read a file's contents by name. Args: name: The filename to read. ctx: The current request context. Override
fastmcp_slim/fastmcp/apps/file_upload.py:310
↓ 9 callers
Function
original
()
tests/client/group/test_client_group.py:407
↓ 9 callers
Function
paginate_sequence
Paginate a sequence of items. Args: items: The full sequence to paginate. cursor: Optional cursor from a previous request. None f
fastmcp_slim/fastmcp/utilities/pagination.py:60
↓ 9 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:182
↓ 9 callers
Method
read
Read the resource content. Subclasses implement this to return resource data. Supported return types: - str: Text content
fastmcp_slim/fastmcp/resources/base.py:402
↓ 9 callers
Method
register_tools
Registers all methods marked with @mcp_tool with the FastMCP server. Args: mcp_server: The FastMCP server instance to register to
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:195
↓ 9 callers
Method
run
(self)
tests/client/minimal_stdio_server.py:171
↓ 9 callers
Method
set_total
Set the total/target value for progress tracking.
fastmcp_slim/fastmcp/server/dependencies.py:1356
↓ 9 callers
Function
set_up_component_manager
Set up HTTP routes for enabling/disabling tools, resources, and prompts. The routes require the same authentication as the MCP endpoint of the
fastmcp_slim/fastmcp/contrib/component_manager/component_manager.py:22
↓ 9 callers
Function
skills_client
(server: FastMCP)
tests/skills/test_provider.py:41
↓ 9 callers
Function
validate_config
Validate an OIDC configuration against the source dict.
tests/server/auth/test_oidc_proxy.py:247
↓ 9 callers
Function
version
Display version information and platform details.
fastmcp_slim/fastmcp/cli/cli.py:88
↓ 9 callers
Method
wrap_transform
Return a new provider with this transform applied (immutable). Unlike add_transform() which mutates this provider, wrap_transform() r
fastmcp_slim/fastmcp/server/providers/base.py:146
↓ 8 callers
Function
CurrentContext
Get the current FastMCP Context instance. This dependency provides access to the active FastMCP Context for the current MCP operation (tool/r
fastmcp_slim/fastmcp/server/dependencies.py:1050
↓ 8 callers
Function
CurrentDocket
Get the current Docket instance managed by FastMCP. This dependency provides access to the Docket instance that FastMCP automatically creates
fastmcp_tasks/fastmcp_tasks/dependencies.py:105
↓ 8 callers
Function
_combine_schemas
Combines parameter and request body schemas into a single schema. Handles parameter name collisions by adding location suffixes. This is
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:875
↓ 8 callers
Function
_component_auth_allows
Whether the component's own `auth` check admits the current request.
fastmcp_slim/fastmcp/server/server.py:268
↓ 8 callers
Method
_cookie_name
Return secure cookie name for HTTPS, fallback for HTTP development.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:130
↓ 8 callers
Function
_era_reporting_backend
A dual-era backend for the mirroring tests. Hosts the three-round guard tool (``book_flight``), a tool that reports the protocol version its
tests/server/test_mrtr_guards.py:521
↓ 8 callers
Function
_form_urlencoded_spec
Build a spec whose only operation takes a form-urlencoded body.
tests/server/providers/openapi/test_object_request_bodies.py:176
↓ 8 callers
Method
_get_additional_http_routes
Get all additional HTTP routes including from mounted servers. Collects custom HTTP routes registered via ``@server.custom_route()``
fastmcp_slim/fastmcp/server/mixins/transport.py:180
↓ 8 callers
Function
_make_protocol_era_server
(name: str, starts: list[str] | None = None)
tests/test_mcp_config.py:176
↓ 8 callers
Function
_merge_defaults
Merge defaults with provided data at all levels.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:1559
↓ 8 callers
Method
_on_list_tools
( self, ctx: ServerRequestContext, params: mcp_types.Paginated
tests/server/test_pagination.py:254
↓ 8 callers
Function
_param_to_cli_flag
Convert a JSON Schema property name to its CLI flag form. Replicates cyclopts' default_name_transform: camelCase → snake_case, lowercase, und
fastmcp_slim/fastmcp/cli/generate.py:648
↓ 8 callers
Method
_read
Server entry point for resource reads. The server calls this method instead of ``read()`` directly so that subclasses can customize d
fastmcp_slim/fastmcp/resources/base.py:435
↓ 8 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:1648
↓ 8 callers
Function
_slugify
Convert a display name to a URL-safe identifier. Lowercases, replaces non-alphanumeric runs with hyphens, and strips leading/trailing hyphens
fastmcp_slim/fastmcp/cli/install/goose.py:19
↓ 8 callers
Method
_with_reload
Acquire the reload lock, reload if needed, then run *coro_fn*. Holding the lock across both the reload and the read prevents concurre
fastmcp_slim/fastmcp/server/providers/filesystem.py:179
↓ 8 callers
Method
async_auth_flow
HTTPX auth flow with automatic retry on stale cached credentials. If the OAuth flow fails due to invalid/stale client credentials, cl
fastmcp_slim/fastmcp/client/auth/oauth.py:513
↓ 8 callers
Function
build
(auth_token: str | None = None)
tests/downstream/server.py:46
↓ 8 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:286
↓ 8 callers
Function
build_proxy
Build an OAuth proxy mounted at BASE_URL, optionally with a distinct issuer.
tests/server/auth/test_issuer_url_identity.py:61
↓ 8 callers
Function
build_server
()
tests/utilities/test_asgi_transport.py:19
↓ 8 callers
Function
build_server
(auth: StaticTokenVerifier | None = None)
tests/server/test_session_scope.py:28
↓ 8 callers
Function
call
Invoke a tool the way an agent does, so the result is a ToolMessage with its artifact.
tests/downstream/smoke_langchain_mcp_adapters.py:61
↓ 8 callers
Method
collect
Collect a schema by name and recurse into its dependencies.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:617
↓ 8 callers
Method
connect_session
( self, **session_kwargs: Any )
tests/client/client/test_session.py:32
↓ 8 callers
Function
create_sse_app
Return an instance of the SSE server app. Args: server: The FastMCP server instance message_path: Path for SSE messages s
fastmcp_slim/fastmcp/server/http.py:479
↓ 8 callers
Function
current_principal
The authenticated principal for the current request as a compact JSON string. Returns the `(client_id, issuer, subject)` triple encoded as compac
fastmcp_slim/fastmcp/server/sessions.py:139
↓ 8 callers
Function
derive_jwt_key
Derive JWT signing key from a high-entropy key material and server salt.
fastmcp_slim/fastmcp/server/auth/jwt_issuer.py:30
↓ 8 callers
Function
discover_files
Recursively discover all Python files under a directory. Excludes __init__.py files (they're for package structure, not components). Args:
fastmcp_slim/fastmcp/server/providers/filesystem_discovery.py:35
↓ 8 callers
Method
exchange_authorization_code
( self, client: OAuthClientInformationFull, authorization_code: AuthorizationCode )
tests/server/test_auth_integration.py:74
↓ 8 callers
Method
exchange_refresh_token
( self, client: OAuthClientInformationFull, refresh_token: RefreshToken, scope
tests/server/test_auth_integration.py:126
↓ 8 callers
Function
extract_trace_context
Extract trace context from an MCP request meta dict. If already in a valid trace (e.g., from HTTP propagation), the existing trace context is
fastmcp_slim/fastmcp/telemetry.py:280
↓ 8 callers
Method
filter
(self, record: logging.LogRecord)
fastmcp_slim/fastmcp/utilities/logging.py:215
↓ 8 callers
Method
get_app_tool
Look up an app-visible tool by original name, bypassing transforms. Searches for a tool named ``tool_name`` tagged with the given app
fastmcp_slim/fastmcp/server/providers/base.py:235
↓ 8 callers
Function
get_client
Get or create an authenticated ATProto client.
examples/atproto_mcp/src/atproto_mcp/_atproto/_client.py:10
↓ 8 callers
Function
get_fastmcp_metadata
Extract FastMCP metadata from a component's meta dict. Handles both the current `fastmcp` namespace and the legacy `_fastmcp` namespace for c
fastmcp_slim/fastmcp/utilities/components.py:22
↓ 8 callers
Method
get_obo_credential
Get a cached or new OnBehalfOfCredential for OBO token exchange. Credentials are cached by user assertion so the Azure SDK's internal
fastmcp_slim/fastmcp/server/auth/providers/azure.py:656
↓ 8 callers
Function
get_property
(tool: Tool, name: str)
tests/tools/tool_transform/test_args.py:21
↓ 8 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:1323
↓ 8 callers
Function
get_session
Resolve and validate a `Session` for an explicit `session_id`. Pair with a `session_id: SessionId` tool argument (the agent obtains an id fro
fastmcp_slim/fastmcp/server/dependencies.py:553
↓ 8 callers
Method
get_tokens
(self)
fastmcp_slim/fastmcp/client/auth/oauth.py:145
↓ 8 callers
Method
getsockname
(self)
tests/client/auth/test_oauth_client.py:389
↓ 8 callers
Function
handler
( ctx: ServerRequestContext[Any, Any], params: Any )
fastmcp_slim/fastmcp/server/extensions.py:329
↓ 8 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:251
↓ 8 callers
Function
list_command
List tools available on an MCP server. Examples: fastmcp list http://localhost:8000/mcp fastmcp list server.py fastmcp li
fastmcp_slim/fastmcp/cli/client.py:788
↓ 8 callers
Method
list_skill_resources
List the skills a server publishes as `skill://.../SKILL.md` resources. Use this for servers that serve skills as resources but not through t
fastmcp_slim/fastmcp/client/mixins/skills.py:211
↓ 8 callers
Method
list_tools
List tools with all transforms applied. Applies transforms sequentially: base → transforms (in order). Each transform receives the re
fastmcp_slim/fastmcp/server/providers/base.py:182
↓ 8 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:35
↓ 8 callers
Method
load_server
Load server from filesystem.
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py:64
↓ 8 callers
Function
login
Sign in to Prefect Horizon.
fastmcp_slim/fastmcp/cli/deploy/command.py:195
← previous
next →
401–500 of 15,976, ranked by callers