MCPcopy Create free account

hub / github.com/PrefectHQ/fastmcp / functions

Functions17,519 in github.com/PrefectHQ/fastmcp

↓ 11 callersFunctionparse_hashed_backend_name
Parse ``__<HASH_LENGTH hex>_<rest>`` → ``(hash, local_tool_name)`` or None.
fastmcp_slim/fastmcp/server/providers/addressing.py:78
↓ 11 callersMethodping
()
tests/client/client/test_mode_negotiation.py:97
↓ 11 callersMethodread
Read the resource by calling the wrapped function.
fastmcp_slim/fastmcp/resources/function_resource.py:201
↓ 11 callersFunctionrequire_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 callersMethodset_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:1683
↓ 11 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:124
↓ 11 callersFunctiontelemetry_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
↓ 11 callersMethodto_resource_content
( self, mime_type: str | None = None, annotations: Annotations | None = None, )
fastmcp_slim/fastmcp/utilities/types.py:443
↓ 11 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:65
↓ 10 callersMethod_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 callersMethod_build_url
Build URL by substituting path parameters in the template. Args: path_template: OpenAPI path template (e.g., "/users/{id
fastmcp_slim/fastmcp/utilities/openapi/director.py:924
↓ 10 callersFunction_elicit
A single-field form elicitation request keyed by ``key``.
tests/server/test_mrtr_guards.py:44
↓ 10 callersFunction_fetch_latest_version
Fetch the latest version from PyPI. Args: include_prereleases: If True, include pre-release versions (alpha, beta, rc). Returns:
fastmcp_slim/fastmcp/utilities/version_check.py:67
↓ 10 callersFunction_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 callersFunction_strip_remote_refs
Return a deep copy of *obj* with non-local ``$ref`` values removed. Local refs (starting with ``#``) are kept intact. Remote refs (``http://
fastmcp_slim/fastmcp/utilities/json_schema.py:218
↓ 10 callersFunction_submit_and_capture
( spec: dict[str, Any], arguments: dict[str, Any] )
tests/server/providers/openapi/test_object_request_bodies.py:225
↓ 10 callersMethod_transform_error
Transform non-MCP errors to proper MCP errors.
fastmcp_slim/fastmcp/server/middleware/error_handling.py:91
↓ 10 callersMethodacquire
(self, client_id: str)
fastmcp_slim/fastmcp/server/middleware/rate_limiting.py:55
↓ 10 callersMethodadd
Add two numbers.
tests/tools/tool/test_tool.py:24
↓ 10 callersFunctionapp_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 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:545
↓ 10 callersMethodbind
(self, address: tuple[str, int])
tests/client/auth/test_oauth_client.py:386
↓ 10 callersFunctionbuild_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:193
↓ 10 callersFunctionbuild_transport
(config: RemoteConfig)
fastmcp_remote/fastmcp_remote/cli.py:256
↓ 10 callersFunctioncallback
()
tests/experimental/transforms/test_monty_callback_lifecycle.py:99
↓ 10 callersFunctionclient
(server: FastMCP)
tests/events/test_sources.py:47
↓ 10 callersFunctioncreate_callback_html
Create a styled HTML response for OAuth callbacks.
fastmcp_slim/fastmcp/client/oauth_callback.py:34
↓ 10 callersFunctioncurrent_principal
The authenticated principal for the current request as a compact JSON string. Returns the `(client_id, issuer, subject)` triple encoded as compac
fastmcp_slim/fastmcp/server/sessions.py:139
↓ 10 callersFunctiondecode_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 callersMethodexecute
Execute tool calls using Python code.
fastmcp_slim/fastmcp/experimental/transforms/code_mode.py:730
↓ 10 callersFunctionfactory
(**kwargs: Any)
tests/client/test_streamable_http.py:322
↓ 10 callersFunctionfn
()
tests/pbt/test_middleware.py:112
↓ 10 callersMethodfrom_file
Load configuration from JSON file.
fastmcp_slim/fastmcp/mcp_config.py:402
↓ 10 callersFunctionget_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 callersFunctionlist_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 callersFunctionload_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 callersMethodnew
Create a new client instance with the same configuration but fresh session state. This creates a new client with the same transport, handlers
fastmcp_slim/fastmcp/client/client.py:861
↓ 10 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
↓ 10 callersMethodread
Read the file content.
fastmcp_slim/fastmcp/resources/types.py:103
↓ 10 callersFunctionserialize_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 callersFunctionserver_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:329
↓ 10 callersMethodtool
()
tests/server/mount/test_mount.py:33
↓ 10 callersMethodunwrap
(self)
fastmcp_slim/fastmcp/server/middleware/caching.py:168
↓ 10 callersFunctionvalidate_proxy
Validate OIDC proxy.
tests/server/auth/test_oidc_proxy.py:429
↓ 10 callersMethodverify_token
(self, token: str)
tests/server/auth/test_multi_auth.py:22
↓ 10 callersMethodversion
(self)
fastmcp_slim/fastmcp/server/server.py:741
↓ 10 callersFunctionwithout_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 callersMethodwrap
Wrap a Tool to delegate execution to the server's middleware.
fastmcp_slim/fastmcp/server/providers/fastmcp_provider.py:60
↓ 9 callersFunction_ask
( request: ElicitRequest, key: str, request_state: str | None )
tests/server/test_mrtr_guards.py:57
↓ 9 callersFunction_bearer
(key_pair: RSAKeyPair, scopes: list[str])
tests/contrib/test_component_manager.py:728
↓ 9 callersFunction_component_auth_allows
Whether the component's own `auth` check admits the current request.
fastmcp_slim/fastmcp/server/server.py:319
↓ 9 callersFunction_convert_to_content
Convert a result to a sequence of content objects.
fastmcp_slim/fastmcp/tools/base.py:730
↓ 9 callersFunction_elicit_request
A single-field form elicitation for *field*.
tests/conformance/server.py:425
↓ 9 callersMethod_exchange
(self, proxy, code="test-code", **idp_token_overrides)
tests/server/auth/oauth_proxy/test_tokens.py:960
↓ 9 callersFunction_form
(request: httpx2.Request)
tests/server/auth/oauth_proxy/test_upstream_client.py:22
↓ 9 callersFunction_form_fields
(request: httpx2.Request)
tests/server/providers/openapi/test_object_request_bodies.py:245
↓ 9 callersFunction_key
( partition: str, *, method: str = "tools/list", params_key: str = "" )
tests/client/client/test_kv_response_cache.py:42
↓ 9 callersFunction_opted_in_request
Bind a request context carrying the tasks opt-in for a `tools/call`.
tests/tasks/task_helpers.py:85
↓ 9 callersFunction_prefix
(docket: Docket, task_scope: str | None, task_id: str)
fastmcp_tasks/fastmcp_tasks/input_store.py:77
↓ 9 callersMethod_prefix_scopes_for_azure
Prefix unprefixed custom API scopes with identifier_uri for Azure. This helper centralizes the scope prefixing logic used in both aut
fastmcp_slim/fastmcp/server/auth/providers/azure.py:453
↓ 9 callersFunction_response_to_result_with_tools
Convert Google GenAI response to CreateMessageResultWithTools.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:410
↓ 9 callersFunction_sampling_content_to_google_genai_part
Convert MCP content to Google GenAI Part.
fastmcp_slim/fastmcp/client/sampling/handlers/google_genai.py:233
↓ 9 callersFunction_serialize_to_jsonable
Serialize through the real JSON serialization contract. The value is serialized to JSON and parsed back, so the output is exactly what would
fastmcp_slim/fastmcp/tools/base.py:119
↓ 9 callersFunction_to_python_identifier
Sanitize a string into a valid Python identifier.
fastmcp_slim/fastmcp/cli/generate.py:224
↓ 9 callersFunctionas_principal
(token: SDKAccessToken | None)
tests/server/test_session_provider.py:61
↓ 9 callersFunctioncheck_for_newer_version
Check if a newer version of FastMCP is available. Returns: The latest version string if newer than current, None otherwise.
fastmcp_slim/fastmcp/utilities/version_check.py:144
↓ 9 callersFunctionchild
(*skills: Skill)
tests/skills/test_composition.py:26
↓ 9 callersFunctioncollect
(subscription, count: int)
tests/events/test_extension.py:338
↓ 9 callersMethodcollect
Collect a schema by name and recurse into its dependencies.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:617
↓ 9 callersFunctionevents_client
(server: FastMCP)
tests/events/test_push_lifecycle.py:60
↓ 9 callersFunctionextract_query_params
Extract query parameter names from RFC 6570 query expressions. Both the `{?param1,param2}` form and the `{&param}` continuation form contribu
fastmcp_slim/fastmcp/resources/template.py:47
↓ 9 callersFunctionfetch_json
Fetch a well-known document from a mounted authenticated server.
tests/server/auth/test_issuer_url_identity.py:100
↓ 9 callersFunctionform_body
Parse an x-www-form-urlencoded request body into a dict.
tests/client/auth/test_client_credentials.py:123
↓ 9 callersFunctionformat_tool_signature
Build ``name(param: type, ...) -> return_type`` from a tool's JSON schemas.
fastmcp_slim/fastmcp/cli/client.py:535
↓ 9 callersFunctiongenerate_goose_deeplink
Generate a Goose deeplink for installing an MCP extension. Args: name: Human-readable display name for the extension. command: Th
fastmcp_slim/fastmcp/cli/install/goose.py:29
↓ 9 callersFunctionget_fastmcp_metadata
Extract FastMCP metadata from a component's meta dict. Handles both the current `fastmcp` namespace and the legacy `_fastmcp` namespace for c
fastmcp_slim/fastmcp/utilities/components.py:22
↓ 9 callersMethodget_oidc_configuration
Gets the OIDC configuration for the specified configuration URL. Args: config_url: The OIDC configuration URL strict:
fastmcp_slim/fastmcp/server/auth/oidc_proxy.py:576
↓ 9 callersMethodget_resource_template
Get a resource template by URI, filtering disabled templates. Overrides Provider.get_resource_template() to add visibility filtering after
fastmcp_slim/fastmcp/server/server.py:1467
↓ 9 callersMethodget_routes
Get OAuth routes with custom handlers for better error UX. This method creates standard OAuth routes and replaces: - /authorize endpo
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:2770
↓ 9 callersMethodget_tool
( self, name: str, call_next: GetToolNext, *, version: VersionSpec | None = None )
tests/server/auth/test_authorization.py:1663
↓ 9 callersFunctionhandler
( ctx: ServerRequestContext[Any, Any], params: Any )
fastmcp_slim/fastmcp/server/extensions.py:329
↓ 9 callersMethodincrement
Atomically increment the current progress value.
fastmcp_slim/fastmcp/server/dependencies.py:1361
↓ 9 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:307
↓ 9 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:140
↓ 9 callersMethodload_refresh_token
( self, client: OAuthClientInformationFull, refresh_token: str )
tests/server/test_auth_integration.py:106
↓ 9 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
↓ 9 callersFunctionmake_auth_server
(*middleware: Middleware)
tests/server/middleware/test_tool_injection.py:305
↓ 9 callersFunctionmake_skill
(path: Path, content: str = "# Instructions")
tests/server/providers/test_skill_main_files.py:21
↓ 9 callersFunctionmake_token
(*, subject: str = "user-a")
tests/server/test_session_provider.py:50
↓ 9 callersFunctionmode
Set `fastmcp.settings.telemetry_mode` for the duration of a test.
tests/telemetry/test_interop.py:34
↓ 9 callersMethodmodel_validate_json
Deprecated 4.1 alias for `MCPSkill.model_validate_json`.
fastmcp_slim/fastmcp/skills/skill.py:204
↓ 9 callersMethodnew
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:2149
↓ 9 callersFunctionnormalize_timeout_to_seconds
Normalize a timeout value to seconds (float). Args: value: Timeout value as int/float (seconds), timedelta, or None. Zero val
fastmcp_slim/fastmcp/utilities/timeout.py:28
↓ 9 callersMethodon_list
List all stored files. Args: ctx: The current request context. Override this method for custom persistence. The default
fastmcp_slim/fastmcp/apps/file_upload.py:292
↓ 9 callersMethodon_read
Read a file's contents by name. Args: name: The filename to read. ctx: The current request context. Override
fastmcp_slim/fastmcp/apps/file_upload.py:310
↓ 9 callersFunctionoriginal
()
tests/client/group/test_client_group.py:407
↓ 9 callersFunctionpaginate_sequence
Paginate a sequence of items. Args: items: The full sequence to paginate. cursor: Optional cursor from a previous request. None f
fastmcp_slim/fastmcp/utilities/pagination.py:60
↓ 9 callersMethodputs
(self)
tests/test_floor_receiver.py:60
↓ 9 callersMethodregister_resources
Registers all methods marked with @mcp_resource with the FastMCP server. A method whose URI contains `{param}` placeholders is registered as
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:234
↓ 9 callersMethodregister_tools
Registers all methods marked with @mcp_tool with the FastMCP server. Args: mcp_server: The FastMCP server instance to register to
fastmcp_slim/fastmcp/contrib/mcp_mixin/mcp_mixin.py:204
← previousnext →401–500 of 17,519, ranked by callers