Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
13,374 in github.com/PrefectHQ/fastmcp
⨍
Functions
13,374
◇
Types & classes
2,002
↳
Endpoints
150
↓ 5 callers
Function
_ttl_server
()
tests/tasks/server/test_task_ttl.py:25
↓ 5 callers
Function
_unwrap_type_alias
Resolve a PEP 695 ``type X = ...`` alias to its underlying value. ``get_origin()`` returns ``None`` for a ``TypeAliasType``, so an alias that
fastmcp_slim/fastmcp/tools/function_parsing.py:82
↓ 5 callers
Function
_write_json
(payload: object, *, stderr: bool = False)
fastmcp_slim/fastmcp/cli/deploy/output.py:38
↓ 5 callers
Function
_write_utf8_json
(path: Path, data: dict[str, Any])
tests/cli/test_config_encoding.py:46
↓ 5 callers
Method
app
(scope: Scope, receive: Receive, send: Send)
tests/utilities/test_asgi_transport.py:129
↓ 5 callers
Function
arguments_received_through_batch_file
Return the batch file and the argv its program receives. Models `cmd /s /c`, then a batch file line such as npm's `"%_prog%" "%dp0%\\cli.js"
tests/cli/test_install_cli_arguments.py:177
↓ 5 callers
Method
asend
(self, value)
tests/client/auth/test_oauth_client.py:401
↓ 5 callers
Function
cancel_task
Call the `tasks/cancel` handler within the given auth scope.
tests/tasks/task_helpers.py:163
↓ 5 callers
Method
clear
Clear all cached clients and force disconnect them.
fastmcp_slim/fastmcp/server/providers/proxy.py:1817
↓ 5 callers
Method
consume
Try to consume tokens from the bucket. Args: tokens: Number of tokens to consume Returns: True if tokens wer
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:41
↓ 5 callers
Function
create_launch
(client: TestClient, tool: str = "ping")
tests/cli/test_apps_dev_server.py:35
↓ 5 callers
Function
create_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_deepobject_style.py:11
↓ 5 callers
Function
create_page
Create a complete HTML page with FastMCP styling. Args: content: HTML content to place inside the page title: Page title
fastmcp_slim/fastmcp/utilities/ui.py:453
↓ 5 callers
Method
create_proxy
Create an OAuth proxy with specified storage.
tests/server/auth/test_oauth_proxy_storage.py:45
↓ 5 callers
Method
create_scoped_app
( required_scopes: list[str], scopes_supported: list[str], challenge_scopes: list[str]
tests/server/auth/test_enhanced_error_responses.py:635
↓ 5 callers
Function
create_server
()
tests/server/http/test_sse_host_origin_protection.py:28
↓ 5 callers
Function
default_log_handler
Default handler that properly routes server log messages to appropriate log levels.
fastmcp_slim/fastmcp/client/logging.py:17
↓ 5 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:731
↓ 5 callers
Method
fail
()
tests/utilities/test_async_utils.py:72
↓ 5 callers
Function
format_fastmcp_info
Format FastMCPInfo as FastMCP-specific JSON. This includes FastMCP-specific fields like tags, enabled, annotations, etc.
fastmcp_slim/fastmcp/utilities/inspect.py:438
↓ 5 callers
Method
from_dict
(cls, data: dict[str, str])
fastmcp_slim/fastmcp/client/oauth_callback.py:92
↓ 5 callers
Function
generate_schema
Generate JSON schema for fastmcp.json files. This is used to create the schema file that IDEs can use for validation and auto-completion.
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:416
↓ 5 callers
Method
get_meta
(self)
fastmcp_slim/fastmcp/server/providers/skills/skill_provider.py:43
↓ 5 callers
Method
get_prompt
Get prompt by transformed name with all transforms applied. Note: This method does NOT filter disabled components. The Server (FastMC
fastmcp_slim/fastmcp/server/providers/base.py:427
↓ 5 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
↓ 5 callers
Method
get_tool
Get tool by transformed name with all transforms applied. Note: This method does NOT filter disabled components. The Server (FastMCP)
fastmcp_slim/fastmcp/server/providers/base.py:200
↓ 5 callers
Method
get_tool_catalog
Fetch the real tool catalog, bypassing this transform. The result is deduplicated by name so that only the highest version of each to
fastmcp_slim/fastmcp/server/transforms/catalog.py:172
↓ 5 callers
Method
is_fresh
(self, ttl: float)
fastmcp_slim/fastmcp/server/providers/proxy.py:845
↓ 5 callers
Function
is_loopback_host
Check if a host is a loopback address. Per RFC 8252 §7.3, loopback covers the whole reserved loopback range, not just the two familiar litera
fastmcp_slim/fastmcp/server/auth/redirect_validation.py:174
↓ 5 callers
Function
json_schema_to_type_adapter
Return a cached `TypeAdapter` for `json_schema_to_type(schema)`. Adapters are cached by schema content in a bounded cache, so the classes the
fastmcp_slim/fastmcp/utilities/json_schema_type.py:361
↓ 5 callers
Method
load
(self)
fastmcp_slim/fastmcp/cli/deploy/configuration.py:40
↓ 5 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
↓ 5 callers
Function
mock_cognito_oidc_discovery
Context manager to mock AWS Cognito OIDC discovery endpoint.
tests/server/auth/providers/test_aws.py:12
↓ 5 callers
Function
new_mock_context
Create a new mock middleware context.
tests/server/middleware/test_logging.py:38
↓ 5 callers
Function
normalize_timeout_to_timedelta
Normalize a timeout value to a timedelta. Args: value: Timeout value as int/float (seconds), timedelta, or None Returns: tim
fastmcp_slim/fastmcp/utilities/timeout.py:8
↓ 5 callers
Method
on_message
Start ping task on first message from a connection.
fastmcp_slim/fastmcp/server/middleware/ping.py:44
↓ 5 callers
Method
on_request
Apply rate limiting to requests.
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:186
↓ 5 callers
Function
parse_header
(value: str)
fastmcp_remote/fastmcp_remote/cli.py:74
↓ 5 callers
Function
prepare
Prepare a FastMCP project by creating a persistent uv environment. This command creates a persistent uv project with all dependencies installed:
fastmcp_slim/fastmcp/cli/cli.py:1033
↓ 5 callers
Method
prepare
Prepare the Python environment using uv. Args: output_dir: Directory where the persistent uv project will be created.
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/environments/uv.py:109
↓ 5 callers
Method
query
(search: str)
tests/test_fastmcp_app.py:139
↓ 5 callers
Function
read_client_extension_settings
Read a client's per-request extension opt-in from the request `_meta`. SEP-2133 extensions negotiate per request: the client repeats its extensio
fastmcp_slim/fastmcp/server/extensions.py:302
↓ 5 callers
Method
refresh_token
Fetch a new access token using a refresh token. If the server does not rotate the refresh token, the previous one is injected into th
fastmcp_slim/fastmcp/server/auth/oauth_proxy/upstream.py:126
↓ 5 callers
Method
register_prompts
Registers all methods marked with @mcp_prompt with the FastMCP server. Args: mcp_server: The FastMCP server instance to register
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:256
↓ 5 callers
Method
register_resources
Registers all methods marked with @mcp_resource with the FastMCP server. Args: mcp_server: The FastMCP server instance to registe
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:221
↓ 5 callers
Function
resolve
(items: dict[str, Any], target: str)
examples/smart_home/src/smart_home/lights/server.py:25
↓ 5 callers
Function
resolve_credential
Resolve environment, stored, then interactive credentials.
fastmcp_slim/fastmcp/cli/deploy/credentials.py:130
↓ 5 callers
Function
run
(command: list[str], **kwargs: object)
tests/cli/deploy/test_credentials.py:242
↓ 5 callers
Function
run_asgi_lifespan
Run an ASGI application's lifespan, driving the protocol as a real server does. The application's lifespan runs inside a dedicated task for the w
fastmcp_slim/fastmcp/utilities/asgi_transport.py:224
↓ 5 callers
Function
run_module_command
Run a Python module directly using ``python -m <module>``. When ``-m`` is used, the module manages its own server startup. No server-object d
fastmcp_slim/fastmcp/cli/run.py:277
↓ 5 callers
Method
save
(self, deps: Deps)
examples/memory.py:102
↓ 5 callers
Function
scoped_admin_tool
()
tests/server/middleware/test_tool_injection.py:313
↓ 5 callers
Function
send
(message: Message)
fastmcp_slim/fastmcp/utilities/asgi_transport.py:249
↓ 5 callers
Method
send
(self, message: dict[str, Any])
tests/client/minimal_stdio_server.py:92
↓ 5 callers
Function
server_env
Keep the server's own logs, warnings, and stderr out of the consumer's output.
tests/downstream/_harness.py:71
↓ 5 callers
Method
set_api_origin
Set the origin and clear credentials before an origin change.
fastmcp_slim/fastmcp/cli/deploy/configuration.py:55
↓ 5 callers
Method
set_mcp_path
Bind the default verifier's audience to this server's resource URL.
fastmcp_slim/fastmcp/server/auth/providers/auth0.py:286
↓ 5 callers
Function
stdio_command
()
tests/downstream/_harness.py:81
↓ 5 callers
Function
sync_skills
Download all available skills from a server. Args: client: Connected FastMCP client target_dir: Directory where skill folders wil
fastmcp_slim/fastmcp/utilities/skills.py:218
↓ 5 callers
Method
to_audio_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:386
↓ 5 callers
Method
to_image_content
Convert to MCP ImageContent.
fastmcp_slim/fastmcp/utilities/types.py:325
↓ 5 callers
Function
use_platform
( monkeypatch: pytest.MonkeyPatch, installer: Installer, platform: str, executable: str, )
tests/cli/test_install_cli_arguments.py:310
↓ 5 callers
Function
validate_command
Validate a hosted CIMD document. Fetches the document from the given URL and validates: - URL is valid CIMD URL (HTTPS, non-root path) -
fastmcp_slim/fastmcp/cli/cimd.py:144
↓ 5 callers
Function
version
Display version information and platform details.
fastmcp_slim/fastmcp/cli/cli.py:99
↓ 5 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:58
↓ 5 callers
Function
windows_batch_command_line
Build a cmd.exe command line that runs a batch file with literal arguments. `command[0]` is the batch file path and the remaining items are its
fastmcp_slim/fastmcp/cli/install/shared.py:113
↓ 4 callers
Function
CurrentFastMCP
Get the current FastMCP server instance. This dependency provides access to the active FastMCP server. Returns: A dependency that re
fastmcp_slim/fastmcp/server/dependencies.py:1061
↓ 4 callers
Method
__init__
Initialize a FastMCPProvider. Args: server: The FastMCP server to wrap.
fastmcp_slim/fastmcp/server/providers/fastmcp_provider.py:408
↓ 4 callers
Method
__init__
Initialize the multi-auth provider. Args: server: Optional auth provider (e.g., OAuthProxy) that owns routes and
fastmcp_slim/fastmcp/server/auth/auth.py:671
↓ 4 callers
Function
_answer
Read the string value a client accepted for `key` (test helper).
tests/tasks/server/test_guard_reentrant.py:47
↓ 4 callers
Function
_apply_pagination
Apply pagination to items, raising MCPError for invalid cursors. If page_size is None, returns all items without pagination.
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:56
↓ 4 callers
Function
_assert_sent_as_configured
(request: httpx2.Request)
tests/server/providers/openapi/test_undeclared_arguments.py:86
↓ 4 callers
Function
_audio_content_to_openai_part
Convert MCP AudioContent to OpenAI input_audio content part.
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:80
↓ 4 callers
Function
_backend_list_roots
Issue a handshake-era `roots/list` from a backend server. `Context` has no `list_roots()`: server-initiated requests are not part of FastMCP'
tests/server/providers/proxy/test_proxy_client.py:62
↓ 4 callers
Method
_build_discovery_tools
(self)
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:642
↓ 4 callers
Method
_cached_fetch
Serve one of the cacheable list verbs through the response cache. Mirrors the SDK Client's `_cached_fetch`: cursorless `use` calls are served
fastmcp_slim/fastmcp/client/client.py:1228
↓ 4 callers
Method
_config
Two entries so the transport takes its multi-server composite path.
tests/server/test_mrtr_guards.py:634
↓ 4 callers
Function
_consent_state_cookie_names
Names of the per-token consent-state cookies currently held.
tests/server/auth/test_oauth_consent_flow.py:176
↓ 4 callers
Method
_context_prompt_server
()
tests/server/test_mrtr_guards_components.py:70
↓ 4 callers
Function
_convert_set_default_none
Convert a sequence to a set, defaulting to an empty set if None.
fastmcp_slim/fastmcp/utilities/components.py:39
↓ 4 callers
Function
_create_client_factory
Create a client factory from the given target. Internal helper that handles the session strategy based on the target type: - Connected Client
fastmcp_slim/fastmcp/server/providers/proxy.py:1316
↓ 4 callers
Method
_create_default_client
Create a default httpx client from the OpenAPI spec's server URL.
fastmcp_slim/fastmcp/server/providers/openapi/provider.py:189
↓ 4 callers
Function
_ctx_with_meta
(meta: dict[str, Any] | None)
tests/server/test_extensions.py:411
↓ 4 callers
Function
_current_leg_key
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:85
↓ 4 callers
Function
_echo_server
()
tests/server/http/test_routable_headers.py:20
↓ 4 callers
Function
_elicit_request
(message: str)
tests/tasks/server/test_guard_reentrant.py:35
↓ 4 callers
Method
_ensure_discovered
Ensure skills are discovered, rediscovering if reload is enabled.
fastmcp_slim/fastmcp/server/providers/skills/directory_provider.py:122
↓ 4 callers
Function
_extract_csrf
Extract CSRF token from HTML form.
tests/server/auth/test_oauth_consent_page.py:97
↓ 4 callers
Function
_extract_result
Extract the list of names from a call_tool ToolResult.
tests/server/transforms/test_catalog.py:253
↓ 4 callers
Method
_extract_schema_as_dict
Resolves a schema and returns it as a dictionary.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:215
↓ 4 callers
Function
_find_request
(request_id: str)
examples/apps/approvals/approvals_server.py:133
↓ 4 callers
Function
_get_cache_path
Get the path to the version cache file.
fastmcp_slim/fastmcp/utilities/version_check.py:21
↓ 4 callers
Method
_get_client
Gets a client instance by calling the sync or async factory.
fastmcp_slim/fastmcp/server/providers/proxy.py:910
↓ 4 callers
Method
_get_client_identifier
Get client identifier for rate limiting.
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:177
↓ 4 callers
Method
_get_highest_version_result
Get the highest version from successful non-None results. Used for versioned components where we want the highest version across all
fastmcp_slim/fastmcp/server/providers/aggregate.py:222
↓ 4 callers
Method
_get_jwks_key
Fetch key from JWKS with simple caching and SSRF protection.
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:345
↓ 4 callers
Function
_get_prefab_types
Import and return Prefab's public app and component types on demand.
fastmcp_slim/fastmcp/utilities/prefab.py:18
↓ 4 callers
Method
_get_refresh_lock
Get or create a per-token refresh lock, evicting LRU entries when at capacity.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:856
↓ 4 callers
Method
_get_scopes_supported
Return the advertised scopes, discovering them lazily if enabled. The result of a successful discovery is cached for the provider's l
fastmcp_slim/fastmcp/server/auth/providers/descope.py:272
↓ 4 callers
Method
_get_tool
( self, name: str, version: VersionSpec | None = None )
fastmcp_slim/fastmcp/server/providers/proxy.py:940
← previous
next →
601–700 of 13,374, ranked by callers