MCPcopy Create free account

hub / github.com/PrefectHQ/fastmcp / functions

Functions10,312 in github.com/PrefectHQ/fastmcp

↓ 22 callersFunction_run_tool
( server: FastMCP, name: str, arguments: dict[str, Any] )
tests/experimental/transforms/test_code_mode_discovery.py:80
↓ 22 callersFunction_unwrap_string_result
Extract a string result from a ToolResult.
tests/experimental/transforms/test_code_mode_discovery.py:43
↓ 22 callersMethodadd_tool
Add a tool to this app programmatically. The tool is tagged with this app's name for routing.
fastmcp_slim/fastmcp/apps/app.py:362
↓ 22 callersFunctionparse_docstring
Parse a function's docstring into a summary and parameter descriptions. Tries Google, NumPy, and Sphinx parsers in order, using the first one tha
fastmcp_slim/fastmcp/utilities/docstring_parsing.py:35
↓ 22 callersMethodreset
Clear all recorded notifications.
tests/client/test_notifications.py:61
↓ 21 callersMethod_mark_component
Set visibility state in component metadata if rule matches. Returns a copy of the component with updated metadata to avoid mutating s
fastmcp_slim/fastmcp/server/transforms/visibility.py:173
↓ 21 callersFunction_run_tool
( server: FastMCP, name: str, arguments: dict[str, Any] )
tests/experimental/transforms/test_code_mode.py:91
↓ 21 callersFunction_watch_filter
Filter for files that should trigger reload.
fastmcp_slim/fastmcp/cli/run.py:339
↓ 21 callersMethodis_connected
Check if the client is currently connected.
fastmcp_slim/fastmcp/client/client.py:418
↓ 21 callersFunctionparse_openapi_to_http_routes
Parses an OpenAPI schema dictionary into a list of HTTPRoute objects using the openapi-pydantic library. Supports both OpenAPI 3.0.x and
fastmcp_slim/fastmcp/utilities/openapi/parser.py:55
↓ 21 callersFunctionresolve_server_spec
Turn CLI inputs into something ``Client()`` accepts. Exactly one of ``server_spec`` or ``command`` should be provided. Resolution order for
fastmcp_slim/fastmcp/cli/client.py:43
↓ 20 callersMethodauthorize
( self, client: OAuthClientInformationFull, params: AuthorizationParams )
tests/server/test_auth_integration.py:47
↓ 20 callersMethodclear
(ctx: Context)
tests/server/test_session_visibility.py:458
↓ 20 callersFunctionfind_available_port
Find an available port by letting the OS assign one.
fastmcp_slim/fastmcp/utilities/http.py:4
↓ 20 callersFunctionis_class_member_of_type
Check if cls is a member of base, even if cls is a type variable. Base can be a type, a UnionType, or an Annotated type. Generic types are n
fastmcp_slim/fastmcp/utilities/types.py:133
↓ 20 callersMethodregister_client
Register a client locally When a client registers, we create a ProxyDCRClient that is more forgiving about validating redirect URIs,
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:828
↓ 20 callersMethodto_mcp_tool
Convert the FastMCP tool to an MCP tool.
fastmcp_slim/fastmcp/tools/base.py:195
↓ 20 callersMethodverify_token
Verify a Clerk OAuth token via introspection and userinfo. Calls the introspection endpoint first to validate the token and retrieve
fastmcp_slim/fastmcp/server/auth/providers/clerk.py:94
↓ 19 callersMethod_list_tools_mcp
List all available tools, in the format expected by the low-level MCP server. Supports pagination when list_page_size is configured.
fastmcp_slim/fastmcp/server/mixins/mcp_operations.py:98
↓ 19 callersFunction_make_token
( *, token: str = "tok", client_id: str = "client-1", scopes: list[str] | None = None, exp
tests/utilities/test_token_cache.py:11
↓ 19 callersMethod_must_run_with_uv
Check if this environment config requires uv to set up. Returns: True if any environment settings require uv run
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/environments/uv.py:93
↓ 19 callersFunctionderive_jwt_key
Derive JWT signing key from a high-entropy key material and server salt.
fastmcp_slim/fastmcp/server/auth/jwt_issuer.py:30
↓ 19 callersFunctionforward
Forward to parent tool with argument transformation applied. This function can only be called from within a transformed tool's custom functio
fastmcp_slim/fastmcp/tools/tool_transform.py:46
↓ 19 callersMethodfrom_dict
Parse MCP configuration from dictionary format.
fastmcp_slim/fastmcp/mcp_config.py:324
↓ 19 callersFunctionis_coroutine_function
Check if a callable is a coroutine function, unwrapping functools.partial. ``inspect.iscoroutinefunction`` returns ``False`` for ``functools.
fastmcp_slim/fastmcp/utilities/async_utils.py:14
↓ 19 callersFunctionmatch_uri_template
Match URI against template and extract both path and query parameters. Supports RFC 6570 URI templates: - Path params: `{var}`, `{var*}`
fastmcp_slim/fastmcp/resources/template.py:80
↓ 19 callersMethodset_mcp_path
Set the MCP endpoint path and create JWTIssuer with correct audience. This method is called by get_routes() to configure the resource URL
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:662
↓ 18 callersFunction_replace_ref_with_defs
Replace openapi $ref with jsonschema $defs recursively. Examples: - {"type": "object", "properties": {"$ref": "#/components/schemas/..."
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:75
↓ 18 callersMethodenable_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:1326
↓ 18 callersMethodissue_access_token
Issue a minimal FastMCP access token. FastMCP tokens are reference tokens containing only the minimal claims needed for validation an
fastmcp_slim/fastmcp/server/auth/jwt_issuer.py:105
↓ 18 callersMethodraise_for_status
()
tests/server/providers/openapi/test_comprehensive.py:649
↓ 18 callersMethodrun
(self, arguments: dict[str, Any])
tests/server/providers/test_base_provider.py:20
↓ 18 callersFunctionset_token
Set the access token in the auth context var.
tests/server/auth/test_authorization.py:259
↓ 18 callersFunctiontask_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_slim/fastmcp/server/tasks/keys.py:156
↓ 17 callersMethod_hash_token
Return the SHA-256 hex digest of *token*.
fastmcp_slim/fastmcp/utilities/token_cache.py:146
↓ 17 callersFunctioncoerce_value
Coerce a string CLI value according to a JSON-Schema type hint.
fastmcp_slim/fastmcp/cli/client.py:264
↓ 17 callersFunctiondereference_refs
Resolve all $ref references in a JSON schema by inlining definitions. This function resolves $ref references that point to $defs, replacing them
fastmcp_slim/fastmcp/utilities/json_schema.py:104
↓ 17 callersFunctiongather
( *awaitables: Awaitable[T], return_exceptions: Literal[True], )
fastmcp_slim/fastmcp/utilities/async_utils.py:38
↓ 17 callersMethodincrement
Atomically increment the current progress value.
fastmcp_slim/fastmcp/server/dependencies.py:1263
↓ 17 callersMethodis_cimd_client_id
Check if a client_id looks like a CIMD URL. CIMD URLs must be HTTPS with a host and non-root path.
fastmcp_slim/fastmcp/server/auth/cimd.py:282
↓ 17 callersMethodreport_progress
Report progress for the current operation. Works in both foreground (MCP progress notifications) and background (Docket task executio
fastmcp_slim/fastmcp/server/context.py:389
↓ 17 callersMethodsupports_tasks
Check if this component supports task execution.
fastmcp_slim/fastmcp/utilities/tasks.py:53
↓ 17 callersMethodto_transport
(self)
fastmcp_slim/fastmcp/mcp_config.py:201
↓ 16 callersMethod_list_tools
(self)
fastmcp_slim/fastmcp/apps/app.py:393
↓ 16 callersMethodfrom_callable_tool
Create a SamplingTool from a FunctionTool or TransformedTool. Reuses existing server tools in sampling contexts. For TransformedTool,
fastmcp_slim/fastmcp/server/sampling/sampling_tool.py:126
↓ 16 callersFunctionget_context
Get the current FastMCP Context instance directly.
fastmcp_slim/fastmcp/server/dependencies.py:321
↓ 16 callersMethodget_tool
( self, name: str, call_next: GetToolNext, *, version: VersionSpec | None = None )
tests/server/transforms/test_catalog.py:46
↓ 16 callersFunctionhash_tool
Deterministic hex hash for a tool in an app. Same inputs on every replica produce the same output.
fastmcp_slim/fastmcp/server/providers/addressing.py:29
↓ 16 callersMethodmake_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:125
↓ 16 callersMethodstore_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:94
↓ 15 callersFunction_sanitize_untrusted_text
Escape rich markup and encode control chars for terminal-safe output.
fastmcp_slim/fastmcp/cli/client.py:409
↓ 15 callersFunction_tool_function_source
Generate the source for a single ``@call_tool_app.command`` function.
fastmcp_slim/fastmcp/cli/generate.py:166
↓ 15 callersMethodassert_not_called
Assert that a hook was not called.
tests/server/middleware/test_middleware.py:103
↓ 15 callersFunctionget_elicitation_schema
Get the schema for an elicitation response. Args: response_type: The type of the response
fastmcp_slim/fastmcp/server/elicitation.py:368
↓ 15 callersMethodget_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:620
↓ 15 callersMethodload_access_token
Validate a JWT bearer token and return an AccessToken when the token is valid. Parameters: token (str): The JWT bearer t
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:434
↓ 14 callersFunction_convert_to_content
Convert a result to a sequence of content objects.
fastmcp_slim/fastmcp/tools/base.py:571
↓ 14 callersMethod_lifespan_manager
(self: FastMCP)
fastmcp_slim/fastmcp/server/mixins/lifespan.py:188
↓ 14 callersFunction_start_flow
Register client and start auth; returns (txn_id, consent_url).
tests/server/auth/test_oauth_consent_flow.py:114
↓ 14 callersFunctionbuild_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_slim/fastmcp/server/tasks/keys.py:41
↓ 14 callersFunctioncreate_callback_html
Create a styled HTML response for OAuth callbacks.
fastmcp_slim/fastmcp/client/oauth_callback.py:34
↓ 14 callersMethodexecute
Execute tool calls using Python code.
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:593
↓ 14 callersMethodfrom_b2c
Create an AzureProvider pre-configured for Azure AD B2C. Derives authority host, tenant path, and identifier URI from `tenant_name` a
fastmcp_slim/fastmcp/server/auth/providers/azure.py:296
↓ 14 callersMethodget_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:626
↓ 14 callersFunctionis_ip_allowed
Check if an IP address is allowed (must be globally routable unicast). Uses ip.is_global which catches: - Private (10.x, 172.16-31.x, 192.168
fastmcp_slim/fastmcp/server/auth/ssrf.py:55
↓ 14 callersFunctionparse_task_key
Parse Docket task key to extract metadata. Args: task_key: Encoded task key from Docket Returns: Dict with keys: ``task_scop
fastmcp_slim/fastmcp/server/tasks/keys.py:80
↓ 14 callersMethodrun_async
Run the FastMCP server asynchronously. Args: transport: Transport protocol to use ("stdio", "http", "sse", or "streamable-http")
fastmcp_slim/fastmcp/server/mixins/transport.py:44
↓ 14 callersMethodto_json
Serialize to JSON for Redis storage.
fastmcp_slim/fastmcp/server/tasks/context.py:166
↓ 14 callersFunctionwith_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:73
↓ 13 callersFunctionCurrentDocket
Get the current Docket instance managed by FastMCP. This dependency provides access to the Docket instance that FastMCP automatically creates
fastmcp_slim/fastmcp/server/dependencies.py:903
↓ 13 callersFunction_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:65
↓ 13 callersFunction_get_auth_context
Get auth context for the current request. Returns a tuple of (skip_auth, token) where: - skip_auth=True means auth checks should be skipped (
fastmcp_slim/fastmcp/server/server.py:164
↓ 13 callersMethodadd_prompt
Add a prompt to the server. Args: prompt: A Prompt instance or @prompt-decorated function to add Returns: Th
fastmcp_slim/fastmcp/server/server.py:1930
↓ 13 callersMethodconvert_result
Convert a raw result to ToolResult. Handles ToolResult passthrough and converts raw values using the tool's attributes (serializer, o
fastmcp_slim/fastmcp/tools/base.py:285
↓ 13 callersFunctioncreate_openapi_server
Helper to create a FastMCP server with OpenAPIProvider.
tests/server/providers/openapi/test_comprehensive.py:15
↓ 13 callersFunctioncreate_secure_html_response
Create an HTMLResponse with security headers. Adds X-Frame-Options: DENY to prevent clickjacking attacks per MCP security best practices.
fastmcp_slim/fastmcp/utilities/ui.py:609
↓ 13 callersFunctiongenerate_skill_content
Generate a SKILL.md file for a generated CLI script.
fastmcp_slim/fastmcp/cli/generate.py:619
↓ 13 callersMethodsend_notification
Send a notification to the client immediately. Args: notification: An MCP notification instance (e.g., ToolListChangedNotificatio
fastmcp_slim/fastmcp/server/context.py:789
↓ 13 callersMethodverify_token
(self, token: str)
tests/server/auth/test_multi_auth.py:14
↓ 12 callersMethod_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
↓ 12 callersFunction_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:158
↓ 12 callersMethod_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:517
↓ 12 callersFunction_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:50
↓ 12 callersMethodadd_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:1787
↓ 12 callersFunctionapp_config_to_meta_dict
Convert an AppConfig or dict to the wire-format dict for ``meta["ui"]``.
fastmcp_slim/fastmcp/apps/config.py:180
↓ 12 callersMethodapply
Create a TransformedTool from a provided tool and this transformation configuration.
fastmcp_slim/fastmcp/tools/tool_transform.py:985
↓ 12 callersFunctionapply_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:497
↓ 12 callersMethodclose
(self)
fastmcp_slim/fastmcp/client/client.py:798
↓ 12 callersMethodconsume
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:38
↓ 12 callersFunctioncreate_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 callersFunctioncreate_streamable_http_app
Return an instance of the StreamableHTTP server app. Args: server: The FastMCP server instance streamable_http_path: Path for Str
fastmcp_slim/fastmcp/server/http.py:269
↓ 12 callersFunctionexpand_uri_template
Expand a URI template with parameters — inverse of `match_uri_template`. Supports the same RFC 6570 subset: - Path params: `{var}`, `{var*}`
fastmcp_slim/fastmcp/resources/template.py:119
↓ 12 callersFunctionextract_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:235
↓ 12 callersFunctiongenerate_cli_command
Generate a standalone CLI script from an MCP server. Connects to the server, reads its tools/resources/prompts, and writes a Python script th
fastmcp_slim/fastmcp/cli/generate.py:670
↓ 12 callersFunctionget_log_lines
Get log lines from a caplog fixture.
tests/server/middleware/test_logging.py:29
↓ 12 callersMethodget_notifications
Get all recorded notifications, optionally filtered by method.
tests/server/test_session_visibility.py:36
↓ 12 callersFunctionis_url
Check if a string is a URL.
fastmcp_slim/fastmcp/cli/run.py:84
↓ 12 callersMethodload_server
Load and return the FastMCP server instance. Must be called after prepare() if the source requires preparation. All information neede
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/sources/base.py:22
↓ 12 callersFunctionopen_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
↓ 12 callersFunctionparse_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:298
← previousnext →101–200 of 10,312, ranked by callers