MCPcopy Create free account

hub / github.com/PrefectHQ/fastmcp / functions

Functions10,524 in github.com/PrefectHQ/fastmcp

↓ 877 callersMethodcall_tool
( self, name: str, arguments: dict[str, Any] | None = None, *, version
fastmcp_slim/fastmcp/server/server.py:1179
↓ 416 callersMethodlist_tools
List all enabled tools from providers. Overrides Provider.list_tools() to add visibility filtering, auth filtering, and middleware ex
fastmcp_slim/fastmcp/server/server.py:651
↓ 377 callersMethodget
Look up a cached verification result. Returns: ``(True, AccessToken)`` on a cache hit, ``(False, None)`` on a miss or
fastmcp_slim/fastmcp/utilities/token_cache.py:95
↓ 316 callersMethodfrom_function
Create a Tool from a function.
fastmcp_slim/fastmcp/tools/base.py:258
↓ 278 callersMethodget
(self, url: str)
tests/server/auth/providers/test_scalekit.py:198
↓ 170 callersMethodadd_transform
Add a server-level transform. Server-level transforms are applied after all providers are aggregated. They transform tools, resources
fastmcp_slim/fastmcp/server/server.py:599
↓ 161 callersMethodread_resource
(self, uri: str)
tests/utilities/test_skills.py:35
↓ 155 callersMethodmount
Mount another FastMCP server on this server with an optional namespace. Unlike importing (with import_server), mounting establishes a dynamic
fastmcp_slim/fastmcp/server/server.py:2124
↓ 142 callersMethodlist_resources
List all enabled resources from providers. Overrides Provider.list_resources() to add visibility filtering, auth filtering, and middl
fastmcp_slim/fastmcp/server/server.py:785
↓ 126 callersMethoddebug
Send a `DEBUG`-level message to the connected MCP Client. Messages sent to Clients are also logged to the `fastmcp.server.context.to_client`
fastmcp_slim/fastmcp/server/context.py:720
↓ 124 callersMethodresult
Wait for and return the task result. Must be implemented by subclasses to return the appropriate result type.
fastmcp_slim/fastmcp/client/tasks.py:203
↓ 107 callersMethodjson
(self)
tests/server/auth/providers/test_scalekit.py:183
↓ 106 callersMethodset
Store a *successful* verification result. Only successful verifications should be cached. Failures (inactive tokens, missing scopes,
fastmcp_slim/fastmcp/utilities/token_cache.py:118
↓ 105 callersMethoddisable
Disable components matching all specified criteria. Adds a visibility transform that marks matching components as disabled. Component
fastmcp_slim/fastmcp/server/providers/base.py:613
↓ 105 callersFunctionget_logger
Get a logger nested under FastMCP namespace. Args: name: the name of the logger, which will be prefixed with 'FastMCP.' Returns:
fastmcp_slim/fastmcp/utilities/logging.py:14
↓ 104 callersMethodfrom_tool
( cls, tool: Tool | Callable[..., Any], *, name: str | None = None, ti
fastmcp_slim/fastmcp/tools/base.py:453
↓ 99 callersMethodadd_middleware
(self, middleware: Middleware)
fastmcp_slim/fastmcp/server/server.py:527
↓ 99 callersFunctionjson_schema_to_type
Convert JSON schema to appropriate Python type with validation. Args: schema: A JSON Schema dictionary defining the type structure and va
fastmcp_slim/fastmcp/utilities/json_schema_type.py:164
↓ 98 callersMethodlist_prompts
List all enabled prompts from providers. Overrides Provider.list_prompts() to add visibility filtering, auth filtering, and middlewar
fastmcp_slim/fastmcp/server/server.py:1056
↓ 96 callersMethodadd_provider
Add a provider for dynamic tools, resources, and prompts. Providers are queried in registration order. The first provider to return a
fastmcp_slim/fastmcp/server/server.py:530
↓ 95 callersMethoddecode
Decode cursor from an opaque string. Raises: ValueError: If the cursor is invalid or malformed.
fastmcp_slim/fastmcp/utilities/pagination.py:31
↓ 92 callersFunctioncall_next
( name: str, *, version: VersionSpec | None = None )
tests/cli/test_fastmcp_remote.py:248
↓ 90 callersMethodget_prompt
Get a prompt by name, filtering disabled prompts. Overrides Provider.get_prompt() to add visibility filtering after all transforms (i
fastmcp_slim/fastmcp/server/server.py:1128
↓ 90 callersMethodrun
(self, arguments: dict[str, Any])
examples/providers/sqlite/server.py:40
↓ 83 callersMethodrun
(self, arguments: dict[str, Any])
tests/server/test_providers.py:26
↓ 79 callersMethodread_resource
( self, uri: str, *, version: VersionSpec | None = None, run_middlewar
fastmcp_slim/fastmcp/server/server.py:1361
↓ 74 callersMethodlist_resource_templates
List all enabled resource templates from providers. Overrides Provider.list_resource_templates() to add visibility filtering, auth fi
fastmcp_slim/fastmcp/server/server.py:920
↓ 72 callersMethodwait
Wait for task to reach a specific state or complete. Uses event-based waiting when notifications are available (fast), with fallback
fastmcp_slim/fastmcp/client/tasks.py:210
↓ 65 callersMethodcreate_token
Generate a test JWT token using symmetric key for testing purposes. Args: subject: Subject claim (usually user ID)
tests/server/auth/test_jwt_provider.py:28
↓ 64 callersMethodhttp_app
Create a Starlette app using the specified HTTP transport. Args: path: The path for the HTTP endpoint middleware: A l
fastmcp_slim/fastmcp/server/mixins/transport.py:370
↓ 64 callersMethodwarning
Send a `WARNING`-level message to the connected MCP Client. Messages sent to Clients are also logged to the `fastmcp.server.context.to_client
fastmcp_slim/fastmcp/server/context.py:752
↓ 56 callersMethodbuild
(self, documents: list[str])
fastmcp_slim/fastmcp/server/transforms/search/bm25.py:36
↓ 53 callersMethodencode
Encode cursor state to an opaque string.
fastmcp_slim/fastmcp/utilities/pagination.py:25
↓ 47 callersMethodload_access_token
(self, token: str)
tests/server/test_auth_integration.py:172
↓ 44 callersMethodget_tool
Get a tool by name, filtering disabled tools. Overrides Provider.get_tool() to add visibility filtering after all transforms (includi
fastmcp_slim/fastmcp/server/server.py:731
↓ 41 callersMethodelicit
( self, message: str, response_type: None, *, response_title: str | No
fastmcp_slim/fastmcp/server/context.py:1023
↓ 41 callersMethodverify_token
Mock token verification.
tests/server/auth/oauth_proxy/conftest.py:268
↓ 40 callersFunctionmake_token
Create a test access token.
tests/server/auth/test_authorization.py:30
↓ 40 callersMethodregister_client
(self, client_info: OAuthClientInformationFull)
tests/server/test_auth_integration.py:44
↓ 39 callersMethodreset
Reset all state for next test.
tests/server/auth/oauth_proxy/conftest.py:249
↓ 38 callersFunctioncompress_schema
Compress and optimize a JSON schema for MCP compatibility. Args: schema: The schema to compress prune_params: List of parame
fastmcp_slim/fastmcp/utilities/json_schema.py:688
↓ 38 callersMethodget_routes
Delegate route creation to the server.
fastmcp_slim/fastmcp/server/auth/auth.py:620
↓ 38 callersMethodmatches
Check if a version matches this spec. Args: version: The version to check, or None for unversioned. match_none: Wheth
fastmcp_slim/fastmcp/utilities/versions.py:55
↓ 37 callersFunction_combine_schemas_and_map_params
Combines parameter and request body schemas into a single schema. Handles parameter name collisions by adding location suffixes. Also ret
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:224
↓ 36 callersMethodadd
Add two numbers.
tests/tools/tool/test_tool.py:21
↓ 36 callersMethodread
Read the resource content. Subclasses implement this to return resource data. Supported return types: - str: Text content
fastmcp_slim/fastmcp/resources/base.py:299
↓ 36 callersMethodrender_prompt
( self, name: str, arguments: dict[str, Any] | None = None, *, version
fastmcp_slim/fastmcp/server/server.py:1541
↓ 35 callersFunctionrun_auth_checks
Run auth checks with AND logic.
fastmcp_slim/fastmcp/utilities/authorization.py:76
↓ 34 callersMethodadd_tool
Add a tool to the server. The tool function can optionally request a Context object by adding a parameter with the Context type annot
fastmcp_slim/fastmcp/server/server.py:1650
↓ 34 callersFunctionconvert_openapi_schema_to_json_schema
Convert an OpenAPI schema to JSON Schema format. This is a clean, systematic approach that: 1. Removes OpenAPI-specific fields 2. Co
fastmcp_slim/fastmcp/utilities/openapi/json_schema_converter.py:41
↓ 33 callersMethodcopy
Create a copy of the component.
fastmcp_slim/fastmcp/utilities/components.py:223
↓ 33 callersMethoderror
Send a `ERROR`-level message to the connected MCP Client. Messages sent to Clients are also logged to the `fastmcp.server.context.to_client`
fastmcp_slim/fastmcp/server/context.py:768
↓ 31 callersFunctionhashed_backend_name
Format the universal name for a backend tool: ``<hash>_<local_name>``.
fastmcp_slim/fastmcp/server/providers/addressing.py:38
↓ 31 callersMethodrender
Render the prompt with arguments. Subclasses must implement this method. Return one of: - str: Wrapped as single user Message
fastmcp_slim/fastmcp/prompts/base.py:272
↓ 31 callersFunctionrun_server_async
Start a FastMCP server as an asyncio task for in-process async testing. This is the recommended way to test FastMCP servers. It runs the ser
fastmcp_slim/fastmcp/utilities/tests.py:143
↓ 31 callersMethodsample
Overload: With result_type, returns SamplingResult[ResultT].
fastmcp_slim/fastmcp/server/context.py:917
↓ 30 callersFunction_make_server_with_tools
()
tests/server/transforms/test_search.py:36
↓ 30 callersFunctionget_access_token
Get the FastMCP access token from the current context. This function first tries to get the token from the current HTTP request's scope, whic
fastmcp_slim/fastmcp/server/dependencies.py:467
↓ 30 callersMethodlist_tools
(self)
examples/providers/sqlite/server.py:78
↓ 29 callersFunctioncreate_proxy
Create a FastMCP proxy server for the given target. This is the recommended way to create a proxy server. For lower-level control, use `FastM
fastmcp_slim/fastmcp/server/server.py:2487
↓ 29 callersMethodenable
Enable components matching all specified criteria. Adds a visibility transform that marks matching components as enabled. Later trans
fastmcp_slim/fastmcp/server/providers/base.py:564
↓ 29 callersFunctionget_cached_typeadapter
TypeAdapters are heavy objects, and in an application context we'd typically create them once in a global scope and reuse them as often as po
fastmcp_slim/fastmcp/utilities/types.py:45
↓ 29 callersFunctioninspect_fastmcp
Extract information from a FastMCP instance into a dataclass. This function automatically detects whether the instance is FastMCP v1.x or v2.x
fastmcp_slim/fastmcp/utilities/inspect.py:378
↓ 29 callersFunctionmatches_allowed_pattern
Securely check if a URI matches an allowed pattern with wildcard support. This function parses both the URI and pattern as URLs, comparing each
fastmcp_slim/fastmcp/server/auth/redirect_validation.py:165
↓ 29 callersFunctionparse_scopes
Parse scopes from environment variables or settings values. Accepts either a JSON array string, a comma- or space-separated string, a list of
fastmcp_slim/fastmcp/utilities/auth.py:66
↓ 28 callersMethodping
Send a ping request.
fastmcp_slim/fastmcp/client/client.py:804
↓ 28 callersFunctiontemporary_settings
Temporarily override FastMCP setting values. Args: **kwargs: The settings to override, including nested settings. Example:
fastmcp_slim/fastmcp/utilities/tests.py:24
↓ 27 callersFunction_write_config
(path: Path, data: dict[str, Any])
tests/cli/test_discovery.py:56
↓ 26 callersMethodcancel
Cancel this task, transitioning it to cancelled state. Sends a tasks/cancel protocol request. The server will attempt to halt executi
fastmcp_slim/fastmcp/client/tasks.py:288
↓ 26 callersMethodcreate_resource
Create a resource from the template with the given parameters. The base implementation does not support background tasks. Use Functio
fastmcp_slim/fastmcp/resources/template.py:307
↓ 26 callersMethodgenerate
Generate an RSA key pair for testing. Returns: RSAKeyPair: Generated key pair
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:93
↓ 26 callersMethodimport_server
Import the MCP objects from another FastMCP server into this one, optionally with a given prefix. .. deprecated::
fastmcp_slim/fastmcp/server/server.py:2230
↓ 26 callersMethodmodel_copy
Override to preserve _backend_name when name changes.
fastmcp_slim/fastmcp/server/providers/proxy.py:138
↓ 25 callersFunction_run_tool
( server: FastMCP, name: str, arguments: dict[str, Any] )
tests/experimental/transforms/test_code_mode.py:116
↓ 25 callersMethodget_client
(self, client_id: str)
tests/server/test_auth_integration.py:41
↓ 24 callersMethodas_proxy
Create a FastMCP proxy server for the given backend. .. deprecated:: Use :func:`fastmcp.server.create_proxy` instead.
fastmcp_slim/fastmcp/server/server.py:2436
↓ 24 callersFunctionimport_module_from_file
Import a Python file as a module. If the file is part of a package (directory has __init__.py), imports it as a proper package member (relati
fastmcp_slim/fastmcp/server/providers/filesystem_discovery.py:140
↓ 24 callersMethodinfo
Send a `INFO`-level message to the connected MCP Client. Messages sent to Clients are also logged to the `fastmcp.server.context.to_client` l
fastmcp_slim/fastmcp/server/context.py:736
↓ 24 callersFunctionis_enabled
Check if component is enabled. Returns True if: - No visibility mark exists (default is enabled) - Visibility mark is True Returns F
fastmcp_slim/fastmcp/server/transforms/visibility.py:271
↓ 23 callersMethodcount
()
tests/server/versioning/test_mounting.py:23
↓ 23 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:541
↓ 23 callersMethodlog
Send a log message to the client. Messages sent to Clients are also logged to the `fastmcp.server.context.to_client` logger with a level of `
fastmcp_slim/fastmcp/server/context.py:549
↓ 23 callersFunctionmake_tool
Create a mock tool for testing.
tests/server/auth/test_authorization.py:41
↓ 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 callersFunctionset_token
Set the access token in the auth context var.
tests/server/auth/test_authorization.py:266
↓ 22 callersMethodstatus
Get current task status. If server executed immediately, returns synthetic completed status. Otherwise queries the server for current
fastmcp_slim/fastmcp/client/tasks.py:172
↓ 21 callersMethod_await_with_session_monitoring
Await a coroutine while monitoring the session task for errors. When using HTTP transports, server errors (4xx/5xx) are raised in the
fastmcp_slim/fastmcp/client/client.py:711
↓ 21 callersMethodbuild_command
Build complete uv run command with environment args and command to execute. Args: command: Command to execute (e.g., ["fastmcp",
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/environments/uv.py:49
↓ 21 callersFunctionrequire_scopes
Require all of the given OAuth scopes.
fastmcp_slim/fastmcp/utilities/authorization.py:50
↓ 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 callersFunction_parse_tool_result
Extract tool list from a ToolResult's structured content.
tests/server/transforms/test_search.py:30
↓ 20 callersMethodauthorize
( self, client: OAuthClientInformationFull, params: AuthorizationParams )
tests/server/test_auth_integration.py:47
↓ 20 callersMethodget_meta
Get the meta information about the component. Returns a dict that always includes a `fastmcp` key containing: - `tags`: sorted list o
fastmcp_slim/fastmcp/utilities/components.py:161
↓ 20 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
↓ 20 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
↓ 20 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
↓ 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:832
↓ 20 callersMethodrun
Run the tool with arguments. This method is not implemented in the base Tool class and must be implemented by subclasses.
fastmcp_slim/fastmcp/tools/base.py:300
↓ 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
next →1–100 of 10,524, ranked by callers