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
↓ 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
_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
Function
_make_token
( *, token: str = "tok", client_id: str = "client-1", scopes: list[str] | None = None, exp
tests/utilities/test_token_cache.py:11
↓ 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:549
↓ 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:2101
↓ 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
dedupe_with_versions
Deduplicate components by key, keeping highest version. Groups components by key, selects the highest version from each group, and injects av
fastmcp_slim/fastmcp/utilities/versions.py:306
↓ 12 callers
Function
entry
(number: int, author: str = "maintainer")
tests/scripts/test_release_contributor_credit.py:50
↓ 12 callers
Method
fail
()
tests/utilities/test_async_utils.py:124
↓ 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
get_session_id
Get the session ID for this transport, if available.
fastmcp_slim/fastmcp/client/transports/base.py:212
↓ 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
Function
scope
(name: str)
tests/apps/test_file_upload_retention.py:25
↓ 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
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
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
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
Function
_idp_jwks
Build a JWKS document from an RSA key pair's public key.
tests/server/auth/oauth_proxy/test_identity_assertion.py:47
↓ 11 callers
Method
_make_proxy
(self, jwt_verifier, **kwargs)
tests/server/auth/oauth_proxy/test_tokens.py:937
↓ 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:76
↓ 11 callers
Function
asgi_client
Serve a FastMCP server over HTTP in-process and yield a connected `Client`. This is the shortest path to testing a server over a real HTTP s
fastmcp_slim/fastmcp/utilities/tests.py:431
↓ 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:1277
↓ 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_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:1179
↓ 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
issue
(module, number=1)
tests/test_issue_ranking.py:22
↓ 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:1551
↓ 11 callers
Method
start_as_current_span
( self, name: str, context: Context | None = None, kind: SpanKind = SpanKind.I
fastmcp_slim/fastmcp/telemetry.py:66
↓ 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:65
↓ 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
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
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
Function
fn
(n: int, ctx: Any)
tests/tasks/server/test_guard_reentrant.py:228
↓ 10 callers
Method
from_file
Load configuration from JSON file.
fastmcp_slim/fastmcp/mcp_config.py:402
↓ 10 callers
Function
get_task_scope
Get the authorization scope for task isolation. Returns the raw scope identifier for the current access token, or ``None`` when no auth conte
fastmcp_tasks/fastmcp_tasks/context.py:48
↓ 10 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
↓ 10 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:60
↓ 10 callers
Function
load_and_merge_config
Load config from server_spec and apply CLI overrides. This consolidates the config parsing logic that was duplicated across run, inspect, and
fastmcp_slim/fastmcp/utilities/cli.py:33
↓ 10 callers
Function
make_skill
(**overrides: object)
tests/skills/test_models.py:19
↓ 10 callers
Function
make_spec
(parameters: list[dict[str, Any]], path: str = "/items")
tests/server/providers/openapi/test_header_path_serialization.py:13
↓ 10 callers
Function
open_deeplink
Attempt to open a Cursor deeplink URL using the system's default handler. Args: deeplink: The deeplink URL to open Returns:
fastmcp_slim/fastmcp/cli/install/cursor.py:47
↓ 10 callers
Method
read
Read the file content.
fastmcp_slim/fastmcp/resources/types.py:103
↓ 10 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:922
↓ 10 callers
Function
serialize_tools_for_output_markdown
Serialize tools to compact markdown, using ~65-70% fewer tokens than JSON.
fastmcp_slim/fastmcp/server/transforms/search/base.py:275
↓ 10 callers
Function
server_span
Emit or enrich a SERVER span with standard MCP attributes and auth context. When the current active span is the request's seam span (opened by
fastmcp_slim/fastmcp/server/telemetry.py:255
↓ 10 callers
Function
telemetry_mode
Resolve the effective telemetry mode for the current context. This is `fastmcp.settings.telemetry_mode`, except that an active `suppress_fast
fastmcp_slim/fastmcp/telemetry.py:86
↓ 10 callers
Function
tool_schema
Build the server and return the generated input schema for create_pet.
tests/server/providers/openapi/test_openapi_discriminator.py:162
↓ 10 callers
Function
validate_proxy
Validate OIDC proxy.
tests/server/auth/test_oidc_proxy.py:429
↓ 10 callers
Method
verify_token
(self, token: str)
tests/server/auth/test_multi_auth.py:22
↓ 10 callers
Method
version
(self)
fastmcp_slim/fastmcp/server/server.py:684
↓ 10 callers
Function
without_injected_parameters
Create a wrapper function without injected parameters. Returns a wrapper that excludes Context, UserSession, and Docket dependency parameters
fastmcp_slim/fastmcp/server/dependencies.py:733
↓ 10 callers
Method
wrap
Wrap a Tool to delegate execution to the server's middleware.
fastmcp_slim/fastmcp/server/providers/fastmcp_provider.py:60
↓ 9 callers
Function
_ask
( request: ElicitRequest, key: str, request_state: str | None )
tests/server/test_mrtr_guards.py:57
↓ 9 callers
Function
_bearer
(key_pair: RSAKeyPair, scopes: list[str])
tests/contrib/test_component_manager.py:728
← previous
next →
301–400 of 15,976, ranked by callers