Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
17,519 in github.com/PrefectHQ/fastmcp
⨍
Functions
17,519
◇
Types & classes
2,390
↳
Endpoints
196
↓ 9 callers
Function
reset_transport
Reset transport to previous value.
fastmcp_slim/fastmcp/server/context.py:104
↓ 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_transport
Set the current transport type. Returns token for reset.
fastmcp_slim/fastmcp/server/context.py:97
↓ 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
Method
verify_token
Verify a bearer token and return access info if valid. This method implements the TokenVerifier protocol by delegating to ou
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:681
↓ 9 callers
Function
version
Display version information and platform details.
fastmcp_slim/fastmcp/cli/cli.py:88
↓ 9 callers
Function
wait_for_process_exit
Poll until the given pid is gone, failing clearly if it never exits. The subprocesses under test self-terminate within a fraction of a second,
tests/client/test_stdio.py:66
↓ 9 callers
Method
wrap
(cls, value: ToolResult)
fastmcp_slim/fastmcp/server/middleware/caching.py:159
↓ 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:938
↓ 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:179
↓ 8 callers
Function
_merge_defaults
Merge defaults with provided data at all levels.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:1667
↓ 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:705
↓ 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:456
↓ 8 callers
Function
_resolve_tool_param_flags
Resolve CLI flags for tool parameters, disambiguating colliding names. Returns a mapping of ``prop_name -> (cli_flag, explicit_name)`` where:
fastmcp_slim/fastmcp/cli/generate.py:235
↓ 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
Function
_span
(spans: tuple[ReadableSpan, ...], name: str)
tests/server/telemetry/test_span_links.py:64
↓ 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
app
(scope: Scope, receive: Receive, send: Send)
tests/utilities/test_asgi_transport.py:129
↓ 8 callers
Function
as_refresh_token
(token: str)
tests/server/auth/oauth_proxy/test_single_use.py:78
↓ 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:320
↓ 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
Function
call_sync_fn_in_threadpool
Call a sync function in a threadpool to avoid blocking the event loop. Uses anyio.to_thread.run_sync which properly propagates contextvars, m
fastmcp_slim/fastmcp/utilities/async_utils.py:26
↓ 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:482
↓ 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
Method
disconnect
(self)
fastmcp_slim/fastmcp/client/transports/stdio.py:235
↓ 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:65
↓ 8 callers
Function
el
(id)
status-site/pbt.js:4
↓ 8 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
↓ 8 callers
Function
generated_cli
(server: FastMCP)
tests/cli/test_generate_cli_arguments.py:19
↓ 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:244
↓ 8 callers
Function
get_client
Get or create an authenticated ATProto client.
examples/atproto_mcp/src/atproto_mcp/_atproto/_client.py:10
↓ 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:670
↓ 8 callers
Function
get_property
(tool: Tool, name: str)
tests/tools/tool_transform/test_args.py:21
↓ 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
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:800
↓ 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:191
↓ 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
↓ 8 callers
Function
make_server
(seen_headers: list[str | None])
tests/events/test_param_headers.py:44
↓ 8 callers
Method
observe
()
tests/test_status_pbt.cjs:68
↓ 8 callers
Function
parse_elicit_response_type
Parse response_type into schema and handling configuration. A response type is required; ``None`` raises ``TypeError``. Supports multiple syn
fastmcp_slim/fastmcp/server/elicitation.py:185
↓ 8 callers
Function
patch_client
(server: FastMCP)
tests/events/test_cli.py:60
↓ 8 callers
Function
ref_target_name
Return the definition name a local JSON Pointer ``$ref`` addresses. The name is the first pointer segment after one of *roots* (``$defs`` by
fastmcp_slim/fastmcp/utilities/json_schema.py:105
↓ 8 callers
Function
register_client
(proxy: OAuthProxy)
tests/server/auth/oauth_proxy/test_single_use.py:36
↓ 8 callers
Method
revoke_token
(self, token: AccessToken | RefreshToken)
tests/server/test_auth_integration.py:186
↓ 8 callers
Method
run
( self, code: str, *, inputs: dict[str, Any] | None = None, external_f
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:212
↓ 8 callers
Method
run_http_async
Run the server using HTTP transport. Args: transport: Transport protocol to use - "http" (default), "streamable-http", or "sse"
fastmcp_slim/fastmcp/server/mixins/transport.py:253
↓ 8 callers
Method
schemas
(self)
tests/server/providers/openapi/test_write_only_responses.py:183
↓ 8 callers
Function
serve
( provider: SkillCatalogProvider, middleware: list[Middleware] | None = None )
tests/skills/test_provider.py:33
↓ 8 callers
Function
server_env
Keep the server's own logs, warnings, and stderr out of the consumer's output.
tests/downstream/_harness.py:71
↓ 8 callers
Function
stdio_command
()
tests/downstream/_harness.py:81
↓ 8 callers
Function
still_open
True while `probe` reproduces `finding` in this tree. A mutant that undoes a fix names the finding in `PBT_ASSUME_FIXED`, so the probe does n
tests/pbt/known.py:9
↓ 8 callers
Function
suppress_fastmcp_telemetry
Suppress FastMCP's own spans without disabling trace propagation. Scoped equivalent of `telemetry_mode="propagation_only"`, for callers that
fastmcp_slim/fastmcp/telemetry.py:109
↓ 8 callers
Function
transform_context_annotations
Transform injected-by-type params into Dependency-defaulted params. Transforms ALL params typed as Context (into ``= CurrentContext()``) and as
fastmcp_slim/fastmcp/server/dependencies.py:342
↓ 8 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:849
↓ 8 callers
Function
update_task
Call the `tasks/update` handler within the given auth scope.
tests/tasks/task_helpers.py:151
↓ 8 callers
Function
validate_elicitation_json_schema
Validate that a JSON schema follows MCP elicitation requirements. This ensures the schema is compatible with MCP elicitation requirements: -
fastmcp_slim/fastmcp/server/elicitation.py:450
↓ 8 callers
Function
verify_webhook
Check a delivery's signature and age, then parse its body. Pass the raw body exactly as received, before any parsing. `secrets` is the subscr
fastmcp_events/fastmcp_events/webhooks.py:76
↓ 7 callers
Function
$
(id)
status-site/operations.js:1
↓ 7 callers
Function
$
(id)
status-site/downloads.js:5
↓ 7 callers
Method
__init__
( self, client_factory: ClientFactoryT, *, identity: ProxyIdentity = "proxy",
fastmcp_slim/fastmcp/server/providers/proxy.py:409
↓ 7 callers
Method
_add_component
Add a component to unified storage. Args: component: The component to add. Returns: The component that was a
fastmcp_slim/fastmcp/server/providers/local_provider/local_provider.py:178
↓ 7 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:78
↓ 7 callers
Function
_build_uvx_command
Build a uvx command for running a FastMCP server. Goose requires uvx (not uv run) as the command. The uvx format is: uvx [--with pkg] [--
fastmcp_slim/fastmcp/cli/install/goose.py:58
↓ 7 callers
Function
_cached_server
An SDK MCPServer whose tools/list carries a positive ttlMs hint at 2026.
tests/client/client/test_response_cache.py:28
↓ 7 callers
Method
_create_before_message
( self, context: MiddlewareContext[Any] )
fastmcp_slim/fastmcp/server/middleware/logging.py:56
↓ 7 callers
Function
_derive_server_name
Derive a human-friendly name from a server spec.
fastmcp_slim/fastmcp/cli/generate.py:1026
↓ 7 callers
Function
_digest
(*parts: Any)
fastmcp_events/fastmcp_events/webhook_delivery.py:130
↓ 7 callers
Method
_dispatch_component_middleware
Run the interior middleware chain for a component operation. This is the dispatch site for the component methods (``tools/call``, ``t
fastmcp_slim/fastmcp/server/server.py:801
↓ 7 callers
Function
_elicited_field
The accepted value of *field* from the elicitation answered under *key*.
tests/conformance/server.py:456
↓ 7 callers
Method
_get
(self, key: str)
fastmcp_events/fastmcp_events/webhook_delivery.py:245
↓ 7 callers
Function
_get_npx_command
Get the correct npx command for the current platform.
fastmcp_slim/fastmcp/cli/cli.py:50
↓ 7 callers
Method
_get_verification_token
Get the token to verify from the upstream token set. When verify_id_token is enabled, returns the id_token from the upstream token re
fastmcp_slim/fastmcp/server/auth/oidc_proxy.py:549
↓ 7 callers
Method
_load
(self, model: type[_ModelT], key: str)
fastmcp_events/fastmcp_events/webhook_delivery.py:255
↓ 7 callers
Method
_log_error
Log error with appropriate detail level.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:59
↓ 7 callers
Method
_make_tool
( self, name: str = "my_tool", properties: dict[str, Any] | None = None, requi
tests/cli/test_client_commands.py:310
↓ 7 callers
Function
_now
()
fastmcp_events/fastmcp_events/webhook_delivery.py:122
↓ 7 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
← previous
next →
501–600 of 17,519, ranked by callers