Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
15,974 in github.com/PrefectHQ/fastmcp
⨍
Functions
15,974
◇
Types & classes
2,233
↳
Endpoints
189
↓ 1,184 callers
Method
call_tool
Call a tool by name. This is the public API for executing tools. By default, middleware is applied. Args: name: The tool
fastmcp_slim/fastmcp/server/server.py:1488
↓ 422 callers
Method
from_function
Create a Tool from a function.
fastmcp_slim/fastmcp/tools/base.py:415
↓ 306 callers
Method
get
Return the value for `key`, or `default` when it is not set.
fastmcp_slim/fastmcp/server/sessions.py:254
↓ 297 callers
Method
items
()
tests/client/test_result_hydration.py:228
↓ 282 callers
Method
get
(self, url: str)
tests/server/auth/providers/test_metadata_forwarding_cache.py:43
↓ 273 callers
Method
add_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:928
↓ 225 callers
Method
mount
Mount another FastMCP server on this server with an optional namespace. Mounting establishes a dynamic connection between servers. When a cli
fastmcp_slim/fastmcp/server/server.py:2461
↓ 218 callers
Method
list_tools
List all enabled tools from providers. Overrides Provider.list_tools() to add enabled filtering, auth filtering, and middleware execu
fastmcp_slim/fastmcp/server/server.py:953
↓ 216 callers
Method
get
(self, key: object, default: Any = None, /)
tests/experimental/transforms/test_code_mode_serialization.py:187
↓ 215 callers
Method
list_tools
(self, tools: Sequence[Tool])
tests/server/test_hashed_tool_dispatch.py:392
↓ 212 callers
Method
read_resource
(self, uri: str)
tests/utilities/test_skills.py:40
↓ 202 callers
Method
list_tools
(self, tools: Sequence[Tool])
tests/server/providers/test_catalog_tool_names.py:14
↓ 201 callers
Function
json_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:307
↓ 197 callers
Method
add_extension
Register a server extension (SEP-2133). Extensions contribute capabilities, additive request methods, tool-call interception, and opt
fastmcp_slim/fastmcp/server/mixins/extensions.py:53
↓ 197 callers
Method
add_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:792
↓ 197 callers
Method
json
(self)
tests/server/auth/providers/test_auth0_mcp.py:256
↓ 173 callers
Method
set
Store `value` under `key` in this session (read-modify-write). Preserves the creation marker: only the user-state sub-dict is touched.
fastmcp_slim/fastmcp/server/sessions.py:259
↓ 157 callers
Method
add_response
( self, status_code: int = 200, headers: Any = None, content: bytes | None = N
tests/utilities/httpx2_mock.py:98
↓ 156 callers
Function
call_next
( name: str, *, version: VersionSpec | None = None )
tests/cli/test_fastmcp_remote.py:261
↓ 154 callers
Function
running_task_server
Enter the server lifespan (Docket backend + worker) for the block.
tests/tasks/task_helpers.py:105
↓ 149 callers
Method
add_middleware
(self, middleware: Middleware)
fastmcp_slim/fastmcp/server/server.py:763
↓ 147 callers
Method
from_tool
( cls, tool: Tool | Callable[..., Any], *, name: str | None = None, ti
fastmcp_slim/fastmcp/tools/base.py:583
↓ 139 callers
Method
debug
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:858
↓ 132 callers
Method
sleep
(self, delay: float)
tests/cli/deploy/test_authentication.py:23
↓ 130 callers
Method
list_resources
(self, resources: Sequence[Resource])
tests/server/auth/test_authorization.py:1513
↓ 125 callers
Method
values
()
tests/tools/tool/test_nonfinite_serialization.py:70
↓ 123 callers
Method
disable
Disable components matching all specified criteria. Adds a visibility transform that marks matching components as disabled. Component
fastmcp_slim/fastmcp/server/providers/base.py:739
↓ 119 callers
Method
model_validate
Deprecated 4.1 alias for `MCPSkill.model_validate`.
fastmcp_slim/fastmcp/skills/skill.py:198
↓ 117 callers
Function
get_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:27
↓ 114 callers
Method
http_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:367
↓ 97 callers
Function
submit_task
Run an opted-in `tools/call` through the interceptor and return its task.
tests/tasks/task_helpers.py:110
↓ 92 callers
Function
create_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:2654
↓ 91 callers
Method
get
(self, key: CacheKey)
fastmcp_slim/fastmcp/client/caching.py:156
↓ 91 callers
Method
run
(self, arguments: dict[str, Any])
tests/tasks/server/test_custom_subclass_tasks.py:40
↓ 90 callers
Method
read_resource
Read a resource by URI. This is the public API for reading resources. By default, middleware is applied. Checks concrete resources fi
fastmcp_slim/fastmcp/server/server.py:1679
↓ 90 callers
Method
run
(self, arguments: dict[str, Any])
examples/providers/sqlite/server.py:41
↓ 85 callers
Method
decode
Return the serialized snapshot a stored value holds.
fastmcp_tasks/fastmcp_tasks/encryption.py:65
↓ 84 callers
Method
create_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:38
↓ 84 callers
Method
model_copy
Override to preserve _backend_name when name changes.
fastmcp_slim/fastmcp/server/providers/proxy.py:382
↓ 81 callers
Method
build
(self, documents: list[str])
fastmcp_slim/fastmcp/server/transforms/search/bm25.py:39
↓ 79 callers
Method
warning
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:890
↓ 78 callers
Method
get_prompt
( self, name: str, call_next: GetPromptNext, *, version: VersionSpec | None = None )
tests/server/auth/test_authorization.py:1544
↓ 77 callers
Method
resolve
(identity: str)
fastmcp_slim/fastmcp/server/server.py:872
↓ 76 callers
Method
update
( self, get_running_apps: bool = True, lazy: bool = True )
examples/smart_home/tests/test_fire_tv.py:22
↓ 76 callers
Method
wait
(self)
tests/server/auth/test_oauth_consent_flow.py:194
↓ 75 callers
Function
make_token
Create a test access token.
tests/server/auth/test_authorization.py:48
↓ 75 callers
Method
reset
Reset all state for next test.
tests/server/auth/oauth_proxy/conftest.py:260
↓ 73 callers
Method
get
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
↓ 71 callers
Method
get_tool
Get a tool by name, filtering disabled tools. Overrides Provider.get_tool() to filter disabled tools after all transforms (including
fastmcp_slim/fastmcp/server/server.py:1028
↓ 70 callers
Method
register_client
(self, client_info: OAuthClientInformationFull)
tests/server/test_auth_integration.py:44
↓ 70 callers
Function
wait_for_task
Poll `tasks/get` until the task reaches one of `target_states`.
tests/tasks/task_helpers.py:174
↓ 68 callers
Method
get_routes
(self, mcp_path: str | None = None)
tests/server/auth/test_remote_auth_provider.py:618
↓ 67 callers
Method
list_prompts
(self, prompts: Sequence[Prompt])
tests/server/auth/test_authorization.py:1541
↓ 67 callers
Method
list_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:1093
↓ 67 callers
Method
load_access_token
(self, token: str)
tests/server/test_auth_integration.py:172
↓ 65 callers
Method
encode
Return the stored form of a serialized snapshot.
fastmcp_tasks/fastmcp_tasks/encryption.py:61
↓ 65 callers
Method
from_openapi
Create a FastMCP server from an OpenAPI specification. Args: openapi_spec: OpenAPI schema as a dictionary cl
fastmcp_slim/fastmcp/server/server.py:2532
↓ 64 callers
Method
add_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:1932
↓ 61 callers
Method
list_resource_templates
( self, templates: Sequence[ResourceTemplate] )
tests/server/auth/test_authorization.py:1526
↓ 59 callers
Method
put
(self, value: Any, *key: str)
scripts/rank_issues.py:372
↓ 58 callers
Function
hashed_backend_name
Format the universal name for a backend tool: ``__<hash>_<local_name>``.
fastmcp_slim/fastmcp/server/providers/addressing.py:73
↓ 57 callers
Method
encode
Encode cursor state to an opaque string.
fastmcp_slim/fastmcp/utilities/pagination.py:25
↓ 57 callers
Method
matches
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
↓ 55 callers
Function
match_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:235
↓ 54 callers
Method
get
(self, *key: str, max_age: float | None = None)
scripts/rank_issues.py:364
↓ 54 callers
Function
snapshot
A 1x1 PNG.
tests/downstream/server.py:89
↓ 52 callers
Method
list_skills
List skills from every client that negotiated the Skills extension. Results are keyed by server name, since skill URIs are only unique
fastmcp_slim/fastmcp/client/group.py:275
↓ 50 callers
Function
set_token
Set the access token in the auth context var.
tests/server/auth/test_authorization.py:436
↓ 49 callers
Function
run_server_async
Start a FastMCP server on a real port as an asyncio task. This runs a real uvicorn server in the current process, bound to a real TCP port,
fastmcp_slim/fastmcp/utilities/tests.py:200
↓ 48 callers
Method
add
(name: str, value: Any)
fastmcp_slim/fastmcp/utilities/openapi/director.py:622
↓ 47 callers
Method
decode
Decode cursor from an opaque string. Raises: ValueError: If the cursor is invalid or malformed.
fastmcp_slim/fastmcp/utilities/pagination.py:31
↓ 46 callers
Method
list_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:1370
↓ 45 callers
Method
from_dict
Parse MCP configuration from dictionary format.
fastmcp_slim/fastmcp/mcp_config.py:388
↓ 44 callers
Function
_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:528
↓ 44 callers
Method
clear
(ctx: Context)
tests/server/test_session_visibility.py:468
↓ 44 callers
Method
get
(self)
examples/smart_home/src/smart_home/fire_tv/client.py:56
↓ 43 callers
Function
_make_proxy
(identity_assertion: IdentityAssertion | None)
tests/server/auth/oauth_proxy/test_identity_assertion.py:104
↓ 42 callers
Function
compress_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:950
↓ 42 callers
Function
require_scopes
Require all of the given OAuth scopes.
fastmcp_slim/fastmcp/utilities/authorization.py:143
↓ 41 callers
Function
dereference_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:343
↓ 40 callers
Function
convert_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:48
↓ 39 callers
Method
render_prompt
Render a prompt by name. This is the public API for rendering prompts. By default, middleware is applied. Use get_prompt() to retriev
fastmcp_slim/fastmcp/server/server.py:1843
↓ 39 callers
Function
temporary_settings
Temporarily override FastMCP setting values. Args: **kwargs: The settings to override, including nested settings. Example:
fastmcp_slim/fastmcp/utilities/tests.py:36
↓ 38 callers
Function
_post_token
POST a jwt-bearer grant to the proxy's /token endpoint via an ASGI app. When ``register`` is True the standard test client is registered first; p
tests/server/auth/oauth_proxy/test_identity_assertion.py:144
↓ 38 callers
Function
_run_tool
( server: FastMCP, name: str, arguments: dict[str, Any] )
tests/experimental/transforms/test_code_mode.py:97
↓ 38 callers
Function
run_task
Submit a task and wait for it to reach a terminal state.
tests/tasks/task_helpers.py:197
↓ 37 callers
Method
copy
Create a copy of the component.
fastmcp_slim/fastmcp/utilities/components.py:252
↓ 37 callers
Method
elicit
The accepted elicitation will contain the response data
fastmcp_slim/fastmcp/server/context.py:996
↓ 37 callers
Method
error
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:906
↓ 37 callers
Method
get_client
(self, client_id: str)
tests/server/test_auth_integration.py:41
↓ 37 callers
Method
read_skill
Read one whole skill from the named server; see `Client.read_skill`.
fastmcp_slim/fastmcp/client/group.py:305
↓ 36 callers
Method
get_requests
( self, *, url: str | re.Pattern[str] | httpx2.URL | None = None, method: str
tests/utilities/httpx2_mock.py:180
↓ 35 callers
Function
_mint_id_jag
Mint a fake ID-JAG JWT with full control over header and claims. `client_id` and `resource` default to values matching the standard test clie
tests/server/auth/oauth_proxy/test_identity_assertion.py:56
↓ 35 callers
Function
build_client
( *, host: str = "127.0.0.1", session: bool = False, log_panel: bool = False, message_log:
tests/cli/test_apps_dev_server.py:21
↓ 35 callers
Method
enable
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:690
↓ 35 callers
Function
get_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:674
↓ 35 callers
Method
monotonic
(self)
tests/cli/deploy/test_authentication.py:20
↓ 35 callers
Method
render
()
tests/tools/tool/test_output_schema.py:707
↓ 34 callers
Method
run
(self, arguments: dict[str, Any])
tests/server/test_providers.py:27
↓ 34 callers
Method
verify_token
(self, token: str)
tests/server/auth/providers/test_github_transient_failures.py:346
next →
1–100 of 15,974, ranked by callers