Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
16,725 in github.com/PrefectHQ/fastmcp
⨍
Functions
16,725
◇
Types & classes
2,302
↳
Endpoints
198
↓ 13 callers
Function
is_object_schema
Check if a JSON schema represents an object type.
fastmcp_slim/fastmcp/utilities/json_schema.py:993
↓ 13 callers
Method
make_key
Construct the lookup key for this component type. Args: identifier: The raw identifier (name for tools/prompts, uri for resources
fastmcp_slim/fastmcp/utilities/components.py:154
↓ 13 callers
Function
make_server_request_context
Build a minimal SDK ServerRequestContext for direct handler unit tests. The v2 SDK hands handlers a ``ServerRequestContext`` argument. Tests that
tests/conftest.py:42
↓ 13 callers
Function
parse_tool_arguments
Build a tool-call argument dict from CLI inputs. A single JSON object argument is treated as the full argument dict. ``--input-json`` provide
fastmcp_slim/fastmcp/cli/client.py:463
↓ 13 callers
Function
resolve_name
Resolve a server name (or ``source:name``) to a transport. Raises :class:`ValueError` when the name is not found or is ambiguous.
fastmcp_slim/fastmcp/cli/discovery.py:377
↓ 13 callers
Function
resolve_root_ref
Resolve $ref at root level to meet MCP spec requirements. MCP specification requires outputSchema to have "type": "object" at the root level.
fastmcp_slim/fastmcp/utilities/json_schema.py:515
↓ 13 callers
Function
scan_notes
( notes: str, prs: dict[int, dict[str, Any]] | None = None )
scripts/release_contributor_credit.py:284
↓ 13 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:169
↓ 13 callers
Function
skills_client
(server: FastMCP)
tests/skills/test_extension.py:130
↓ 13 callers
Function
task_redis_prefix
Return the Redis key prefix that owns a given scope. Authenticated tasks live under ``fastmcp:task:auth:{enc_scope}``; anonymous tasks live u
fastmcp_tasks/fastmcp_tasks/keys.py:197
↓ 13 callers
Method
validate
(token: str)
tests/server/auth/providers/test_debug.py:31
↓ 13 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:277
↓ 12 callers
Function
_build_client
Build a ``Client`` from a resolved server spec. Applies ``auth='oauth'`` automatically for HTTP-based targets unless the caller explicitly pa
fastmcp_slim/fastmcp/cli/client.py:263
↓ 12 callers
Function
_convert_messages_to_google_genai_content
Convert MCP messages to Google GenAI content.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:311
↓ 12 callers
Method
_convert_to_anthropic_messages
( messages: Sequence[SamplingMessage], )
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:207
↓ 12 callers
Method
_convert_to_openai_messages
( system_prompt: str | None, messages: Sequence[SamplingMessage] )
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:205
↓ 12 callers
Method
_get_jwks_key
Resolve a key, sharing refreshes and retaining fresh cached keys.
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:362
↓ 12 callers
Function
_github_user_response
()
tests/server/auth/providers/test_github_transient_failures.py:31
↓ 12 callers
Function
_hook
(server: FastMCP)
tests/server/test_mcp_param_schema_cache.py:32
↓ 12 callers
Function
_idp_jwks
Build a JWKS document from an RSA key pair's public key.
tests/server/auth/oauth_proxy/test_identity_assertion.py:48
↓ 12 callers
Function
_is_http_target
Return True if the resolved target will use an HTTP-based transport. MCPConfig dicts are excluded because ``MCPConfigTransport`` manages indi
fastmcp_slim/fastmcp/cli/client.py:188
↓ 12 callers
Method
_matches
Check if this transform applies to the component. All specified criteria must match (intersection semantics). An empty rule (no crite
fastmcp_slim/fastmcp/server/transforms/visibility.py:125
↓ 12 callers
Function
_parse_mcp_config
Parse an mcpServers-style JSON file into discovered servers.
fastmcp_slim/fastmcp/cli/discovery.py:129
↓ 12 callers
Method
_prepare_scopes_for_upstream_refresh
Prepare scopes for Azure token refresh. Azure requires fully-qualified scopes and only allows ONE resource per token request (AADSTS2
fastmcp_slim/fastmcp/server/auth/providers/azure.py:563
↓ 12 callers
Function
_scan_claude_code
Scan ``~/.claude.json`` for global and project-scoped MCP servers.
fastmcp_slim/fastmcp/cli/discovery.py:166
↓ 12 callers
Method
add_resource
Add a resource to the server. Args: resource: A Resource instance or @resource-decorated function to add Returns:
fastmcp_slim/fastmcp/server/server.py:2274
↓ 12 callers
Method
apply
Create a TransformedTool from a provided tool and this transformation configuration.
fastmcp_slim/fastmcp/tools/tool_transform.py:1236
↓ 12 callers
Method
assert_called
Assert that a hook was called a specific number of times.
tests/server/middleware/test_middleware_nested.py:76
↓ 12 callers
Function
auth_scope
Bind (or clear) the auth context so `get_task_scope` sees a caller.
tests/tasks/task_helpers.py:72
↓ 12 callers
Function
build_client_redirect
Build a client-facing authorization redirect that carries exactly one `iss`. Every redirect this server sends back to an OAuth client from the
fastmcp_slim/fastmcp/server/auth/redirect_validation.py:115
↓ 12 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.py:76
↓ 12 callers
Function
create_command
Generate a CIMD document for hosting. Create a Client ID Metadata Document that you can host at an HTTPS URL. The URL where you host this doc
fastmcp_slim/fastmcp/cli/cimd.py:32
↓ 12 callers
Function
entry
(number: int, author: str = "maintainer")
tests/scripts/test_release_contributor_credit.py:50
↓ 12 callers
Function
get_http_request
Get the current HTTP request. Tries MCP SDK's request_ctx first, then falls back to FastMCP's HTTP context.
fastmcp_slim/fastmcp/server/dependencies.py:588
↓ 12 callers
Function
get_log_lines
Get log lines from a caplog fixture.
tests/server/middleware/test_logging.py:27
↓ 12 callers
Method
info
()
tests/server/versioning/test_mounting.py:55
↓ 12 callers
Function
load_mcp_server_config
Load a FastMCP configuration from a fastmcp.json file. Args: config_path: Path to fastmcp.json file Returns: MCPServerConfig
fastmcp_slim/fastmcp/cli/run.py:124
↓ 12 callers
Function
make_server
()
tests/tasks/server/test_task_catalog_transforms.py:28
↓ 12 callers
Function
make_upstream
()
tests/server/providers/proxy/test_server_metadata.py:144
↓ 12 callers
Function
parse_task_key
Parse Docket task key to extract metadata. Args: task_key: Encoded task key from Docket Returns: Dict with keys: ``task_scop
fastmcp_tasks/fastmcp_tasks/keys.py:118
↓ 12 callers
Method
remove
(self, kind, owner, data, version)
tests/pbt/test_components_machine.py:311
↓ 12 callers
Function
scope
(name: str)
tests/apps/test_file_upload_retention.py:25
↓ 12 callers
Method
send_notification
Send a notification to the client immediately. Args: notification: An MCP notification instance (e.g., ToolListChangedNotificatio
fastmcp_slim/fastmcp/server/context.py:924
↓ 12 callers
Function
skills_client
(server: FastMCP)
tests/skills/test_composition.py:30
↓ 12 callers
Function
skills_client
(server: FastMCP)
tests/skills/test_read_skill.py:31
↓ 12 callers
Method
start_as_current_span
( self, name: str, context: Context | None = None, kind: SpanKind = SpanKind.I
fastmcp_slim/fastmcp/telemetry.py:66
↓ 12 callers
Method
transport
(self, name: str)
tests/downstream/_harness.py:166
↓ 12 callers
Function
use_horizon_api
( monkeypatch: pytest.MonkeyPatch, )
tests/cli/deploy/test_command.py:84
↓ 12 callers
Function
user_meta
Strip the SDK's `serverInfo` stamp from a result's `_meta`. Every 2026-era result carries `io.modelcontextprotocol/serverInfo` (spec #3002),
tests/conftest.py:27
↓ 12 callers
Method
verify_token
Verify a bearer token using OAuth 2.0 Token Introspection (RFC 7662). This method makes a POST request to the introspection endpoint
fastmcp_slim/fastmcp/server/auth/providers/introspection.py:191
↓ 11 callers
Function
$
(id)
status-site/app.js:1
↓ 11 callers
Function
_adder
()
tests/server/middleware/test_message_visibility.py:59
↓ 11 callers
Method
_app
(marker: str = "x", app_name: str = "contacts")
tests/server/providers/test_prefab_roundtrip.py:294
↓ 11 callers
Method
_get_resource_url
Get the actual resource URL being protected. Uses ``resource_base_url`` if set; otherwise falls back to ``base_url``. Args:
fastmcp_slim/fastmcp/server/auth/auth.py:493
↓ 11 callers
Method
_make_proxy
(self, jwt_verifier, **kwargs)
tests/server/auth/oauth_proxy/test_tokens.py:937
↓ 11 callers
Function
_next_event
(subscription, timeout: float = 2)
tests/server/test_subscriptions.py:55
↓ 11 callers
Function
_schema_section
(schema: dict[str, Any] | None, title: str)
fastmcp_slim/fastmcp/server/transforms/search/base.py:191
↓ 11 callers
Function
_schema_to_python_type
Convert a JSON Schema to a Python type annotation. Returns (type_annotation, needs_json_parsing).
fastmcp_slim/fastmcp/cli/generate.py:99
↓ 11 callers
Function
build_task_key
Build Docket task key with embedded metadata. When ``task_scope`` is ``None`` the task is anonymous and lives in the ``anon`` keyspace. Othe
fastmcp_tasks/fastmcp_tasks/keys.py:79
↓ 11 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:1279
↓ 11 callers
Method
fetch_token
Exchange an authorization grant for tokens at the token endpoint. Falsy parameters are dropped from the request body, matching authlib.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/upstream.py:111
↓ 11 callers
Function
gateway
( upstream: FastMCP, *, middleware: list[Middleware] | None = None )
tests/server/providers/proxy/test_skills.py:51
↓ 11 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:789
↓ 11 callers
Method
get_resource
Get a resource by URI, filtering disabled resources. Overrides Provider.get_resource() to add visibility filtering after all transfor
fastmcp_slim/fastmcp/server/server.py:1271
↓ 11 callers
Method
http_client
An `httpx2.AsyncClient` bound to the in-process app, for raw HTTP assertions. Relative URLs resolve against the server's origin, so `client.g
fastmcp_slim/fastmcp/utilities/tests.py:295
↓ 11 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:152
↓ 11 callers
Function
issue
(module, number=1)
tests/test_issue_ranking.py:22
↓ 11 callers
Function
list_events
Retrieve every event type the server offers. Args: max_pages: Maximum number of pages to fetch before raising. Raises: Runti
fastmcp_slim/fastmcp/experimental/events/subscription.py:504
↓ 11 callers
Function
make_proxy
(jwt_verifier)
tests/server/auth/oauth_proxy/test_single_use.py:21
↓ 11 callers
Function
make_skill
(name: str)
tests/skills/test_extension.py:40
↓ 11 callers
Function
mock_transport
( handler: Callable[[httpx2.Request], httpx2.Response], )
tests/cli/deploy/test_horizon_client.py:21
↓ 11 callers
Method
on_store
Store uploaded files and return summaries. Args: files: List of file dicts, each with ``name``, ``size``, ``type`
fastmcp_slim/fastmcp/apps/file_upload.py:228
↓ 11 callers
Function
parse_hashed_backend_name
Parse ``__<HASH_LENGTH hex>_<rest>`` → ``(hash, local_tool_name)`` or None.
fastmcp_slim/fastmcp/server/providers/addressing.py:78
↓ 11 callers
Method
ping
()
tests/client/client/test_mode_negotiation.py:97
↓ 11 callers
Method
read
Read the resource by calling the wrapped function.
fastmcp_slim/fastmcp/resources/function_resource.py:201
↓ 11 callers
Function
require_roles
Require all of the given roles, read from the token's claims. Roles and groups are not part of OIDC, so every identity provider puts them som
fastmcp_slim/fastmcp/utilities/authorization.py:148
↓ 11 callers
Method
set_logging_level
Send a logging/setLevel request. Handshake-era servers only. `logging/setLevel` asks the server to remember a level for the rest of t
fastmcp_slim/fastmcp/client/client.py:1617
↓ 11 callers
Method
store_event
Store an event and return its ID. Args: stream_id: ID of the stream the event belongs to message: The JSON-RPC messag
fastmcp_slim/fastmcp/server/event_store.py:124
↓ 11 callers
Method
to_mcp_skill
Build the Skills extension entry for this skill served at `skill://{path}/`.
fastmcp_slim/fastmcp/skills/skill.py:398
↓ 11 callers
Method
to_resource_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:439
↓ 11 callers
Function
with_argv
Temporarily replace sys.argv if args provided. This context manager is used at the CLI boundary to inject server arguments when needed, witho
fastmcp_slim/fastmcp/cli/cli.py:66
↓ 10 callers
Method
_bind
Bind this OAuth provider to a specific MCP server URL. Called automatically when mcp_url is provided to __init__, or by the transport
fastmcp_slim/fastmcp/client/auth/oauth.py:280
↓ 10 callers
Function
_elicit
A single-field form elicitation request keyed by ``key``.
tests/server/test_mrtr_guards.py:44
↓ 10 callers
Function
_mock_httpx_client
Build a mock httpx2.AsyncClient whose stream() yields a canned response. The returned client's ``.stream.call_args`` exposes the request that was
tests/server/auth/test_ssrf_protection.py:26
↓ 10 callers
Function
_submit_and_capture
( spec: dict[str, Any], arguments: dict[str, Any] )
tests/server/providers/openapi/test_object_request_bodies.py:225
↓ 10 callers
Method
_transform_error
Transform non-MCP errors to proper MCP errors.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:91
↓ 10 callers
Method
acquire
(self, client_id: str)
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:55
↓ 10 callers
Function
app_config_to_meta_dict
Convert an AppConfig or dict to the wire-format dict for ``meta["ui"]``.
fastmcp_slim/fastmcp/apps/config.py:190
↓ 10 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
↓ 10 callers
Method
bind
(self, address: tuple[str, int])
tests/client/auth/test_oauth_client.py:386
↓ 10 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:191
↓ 10 callers
Function
build_transport
(config: RemoteConfig)
fastmcp_remote/fastmcp_remote/cli.py:256
↓ 10 callers
Function
call_and_capture
( spec: dict[str, Any], args: dict[str, Any] )
tests/server/providers/openapi/test_header_path_serialization.py:29
↓ 10 callers
Function
create_callback_html
Create a styled HTML response for OAuth callbacks.
fastmcp_slim/fastmcp/client/oauth_callback.py:34
↓ 10 callers
Function
decode_jwt_header
Decode JWT header without signature verification. Useful for extracting the key ID (kid) for JWKS lookup. Args: token: JWT token str
fastmcp_slim/fastmcp/utilities/auth.py:36
↓ 10 callers
Function
discriminator_spec
A parent schema with a discriminator mapping onto two allOf subtypes.
tests/server/providers/openapi/test_openapi_discriminator.py:21
↓ 10 callers
Function
draw
()
status-site/pbt.js:200
↓ 10 callers
Method
execute
Execute tool calls using Python code.
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:713
↓ 10 callers
Function
factory
(**kwargs: Any)
tests/client/test_streamable_http.py:294
↓ 10 callers
Method
filter
(self, record: logging.LogRecord)
fastmcp_slim/fastmcp/utilities/logging.py:215
← previous
next →
301–400 of 16,725, ranked by callers