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
↓ 14 callers
Method
set_tokens
(self, tokens: OAuthToken)
fastmcp_slim/fastmcp/client/auth/oauth.py:149
↓ 14 callers
Method
start
(self, rotates: bool)
tests/pbt/test_oauth_proxy_machine.py:174
↓ 14 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
↓ 14 callers
Method
validate_assertion
Validate JWT assertion from client. Args: assertion: The JWT assertion string client_id: Expected client_id (must mat
fastmcp_slim/fastmcp/server/auth/cimd.py:536
↓ 14 callers
Method
verify_token
Verify token using custom validation logic. Args: token: The token string to validate Returns: AccessToken i
fastmcp_slim/fastmcp/server/auth/providers/debug.py:77
↓ 13 callers
Function
_allof_members
Collect local composition members, reusing shared definition results.
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:266
↓ 13 callers
Function
_extract_mime_type_from_route
Extract the primary MIME type from an HTTPRoute's response definitions. Looks for the first successful response (2xx) and returns its content typ
fastmcp_slim/fastmcp/server/providers/openapi/components.py:162
↓ 13 callers
Function
_search
(mcp: FastMCP, query: str)
tests/experimental/transforms/test_jev_search.py:117
↓ 13 callers
Function
_unwrap_string_result
Extract a string result from a ToolResult. String results are wrapped in ``{"result": "..."}`` by the structured-output convention.
tests/experimental/transforms/test_code_mode.py:56
↓ 13 callers
Function
check
(value: Any)
fastmcp_slim/fastmcp/utilities/json_schema_type.py:759
↓ 13 callers
Method
check
Run one check. A `known_gap` check is expected to fail and is reported without failing the run; if it starts passing, the run fails so the
tests/downstream/_harness.py:185
↓ 13 callers
Method
convert_result
Convert a raw result to ToolResult. Handles ToolResult passthrough and converts raw values using the tool's attributes (output_schema
fastmcp_slim/fastmcp/tools/base.py:474
↓ 13 callers
Function
create_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_comprehensive.py:18
↓ 13 callers
Function
download_skill
Download a skill and all its files to a local directory. Creates a subdirectory named after the skill containing all files. Args: cl
fastmcp_slim/fastmcp/utilities/skills.py:161
↓ 13 callers
Method
enable_components
Enable components matching criteria for this session only. Session rules override global transforms. Rules accumulate - each call add
fastmcp_slim/fastmcp/server/context.py:1241
↓ 13 callers
Function
extract_components
Extract all MCP components from a module. Scans all module attributes for instances of Tool, Resource, ResourceTemplate, or Prompt objects cr
fastmcp_slim/fastmcp/server/providers/filesystem_discovery.py:328
↓ 13 callers
Function
extract_output_schema_from_responses
Extract output schema from OpenAPI responses for use as MCP tool output schema. This function finds the first successful response (200, 201,
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:955
↓ 13 callers
Method
fail
()
tests/utilities/test_async_utils.py:124
↓ 13 callers
Function
gateway
( upstream: FastMCP, *, middleware: list[Middleware] | None = None )
tests/server/providers/proxy/test_skills.py:52
↓ 13 callers
Method
generate
Generate an RSA key pair for testing. Returns: RSAKeyPair: Generated key pair
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:109
↓ 13 callers
Method
get_well_known_routes
Delegate well-known route creation to the server. This ensures that server-specific well-known route logic (e.g., OAuthProvider's RFC
fastmcp_slim/fastmcp/server/auth/auth.py:1044
↓ 13 callers
Method
initialize
Send an initialize request to the server. This method performs the MCP initialization handshake with the server, exchanging capabilit
fastmcp_slim/fastmcp/client/client.py:1006
↓ 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
(**extension_kwargs)
tests/events/test_emit.py:52
↓ 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
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
skills_client
(server: FastMCP)
tests/skills/test_read_skill.py:31
↓ 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
to_mcp_skill
Build the Skills extension entry for this skill served at `skill://{path}/`.
fastmcp_slim/fastmcp/skills/skill.py:398
↓ 13 callers
Function
tokens
()
tests/events/test_webhooks.py:86
↓ 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:2329
↓ 12 callers
Method
apply
Create a TransformedTool from a provided tool and this transformation configuration.
fastmcp_slim/fastmcp/tools/tool_transform.py:1240
↓ 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
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
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
↓ 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_skill
(**overrides: object)
tests/skills/test_models.py:19
↓ 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
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
↓ 12 callers
Method
read
Up to `count` events logged for `name` after `cursor`.
fastmcp_events/fastmcp_events/log.py:63
↓ 12 callers
Method
remove
(self, kind, owner, data, version)
tests/pbt/test_components_machine.py:322
↓ 12 callers
Function
restrict_tag
Require scopes when the accessed component has a specific tag.
fastmcp_slim/fastmcp/utilities/authorization.py:197
↓ 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
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
↓ 12 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:155
↓ 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
Function
call_and_capture
( spec: dict[str, Any], args: dict[str, Any] )
tests/server/providers/openapi/test_header_path_serialization.py:29
↓ 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
Function
discriminator_spec
A parent schema with a discriminator mapping onto two allOf subtypes.
tests/server/providers/openapi/test_openapi_discriminator.py:21
↓ 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:128
↓ 11 callers
Method
get
(self, stale: str | None = None)
scripts/floor_receiver/main.py:113
↓ 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:1274
↓ 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
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
make_spec
(parameters: list[dict[str, Any]], path: str = "/items")
tests/server/providers/openapi/test_header_path_serialization.py:13
↓ 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
← previous
next →
301–400 of 17,519, ranked by callers