Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PrefectHQ/fastmcp
/ functions
Functions
10,312 in github.com/PrefectHQ/fastmcp
⨍
Functions
10,312
◇
Types & classes
1,519
↳
Endpoints
103
↓ 2 callers
Method
_make_list_prompts_tool
Create the list_prompts tool.
fastmcp_slim/fastmcp/server/transforms/prompts_as_tools.py:93
↓ 2 callers
Method
_make_list_resources_tool
Create the list_resources tool.
fastmcp_slim/fastmcp/server/transforms/resources_as_tools.py:96
↓ 2 callers
Method
_make_read_resource_tool
Create the read_resource tool.
fastmcp_slim/fastmcp/server/transforms/resources_as_tools.py:135
↓ 2 callers
Method
_make_reader_tool
(self)
tests/server/transforms/test_catalog.py:53
↓ 2 callers
Method
_make_search_tool
Create the search tool. Subclasses define the parameter schema.
fastmcp_slim/fastmcp/server/transforms/search/base.py:219
↓ 2 callers
Function
_make_summary
(entry: dict[str, Any])
fastmcp_slim/fastmcp/apps/file_upload.py:92
↓ 2 callers
Method
_make_synthetic_tool
(self)
tests/server/transforms/test_catalog.py:81
↓ 2 callers
Method
_make_tool
(self, row: aiosqlite.Row)
examples/providers/sqlite/server.py:94
↓ 2 callers
Method
_matches
(self, name: str)
fastmcp_remote/fastmcp_remote/cli.py:54
↓ 2 callers
Method
_matches_tool_cache_settings
Check if the tool matches the cache settings for tool calls.
fastmcp_slim/fastmcp/server/middleware/caching.py:513
↓ 2 callers
Method
_materialize_generator
Consume generators/async generators into lists. Without this, async generators pass through as objects (repr string), and sync genera
fastmcp_slim/fastmcp/tools/function_tool.py:347
↓ 2 callers
Function
_maybe_apply_prefab_ui
Mark a tool as a Prefab tool if its config or return type implies it. Per-tool renderer resources are synthesized lazily at list/read time; h
fastmcp_slim/fastmcp/server/providers/local_provider/decorators/tools.py:93
↓ 2 callers
Function
_merge_domains
Merge two domain lists, deduplicating.
fastmcp_slim/fastmcp/apps/config.py:169
↓ 2 callers
Method
_message_to_create_message_result
( message: Message, )
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:330
↓ 2 callers
Method
_message_to_result_with_tools
Convert Anthropic response to CreateMessageResultWithTools.
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:401
↓ 2 callers
Function
_normalize_anyof_order
Normalize the order of items in anyOf arrays for consistent comparison.
tests/server/providers/local_provider_tools/test_output_schema.py:19
↓ 2 callers
Function
_object_schema_to_type
Convert an object schema to the appropriate Python type. Single source of truth for the four object-schema cases, used by both the top-level
fastmcp_slim/fastmcp/utilities/json_schema_type.py:383
↓ 2 callers
Method
_paginate_list
Generic pagination helper for list operations. Args: request_factory: Function that creates a request from a cursor c
fastmcp_slim/fastmcp/server/context.py:451
↓ 2 callers
Method
_parse_cache_policy
Parse HTTP cache headers and derive cache behavior.
fastmcp_slim/fastmcp/server/auth/cimd.py:224
↓ 2 callers
Function
_parse_host_port
Parse host and port from netloc, handling wildcards. Args: netloc: The netloc component (e.g., "localhost:8080" or "localhost:*") Re
fastmcp_slim/fastmcp/server/auth/redirect_validation.py:13
↓ 2 callers
Method
_ping_loop
Send periodic pings until session ends.
fastmcp_slim/fastmcp/server/middleware/ping.py:63
↓ 2 callers
Function
_prefab_to_tool_result
Convert a PrefabApp to a FastMCP ToolResult.
fastmcp_slim/fastmcp/tools/base.py:563
↓ 2 callers
Method
_prepare_scopes_for_upstream_refresh
Prepare scopes for upstream token refresh request. Override this method to transform scopes before sending to upstream provider. For
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1317
↓ 2 callers
Function
_print_schema
Print a JSON schema with a label.
fastmcp_slim/fastmcp/cli/client.py:401
↓ 2 callers
Method
_render_results
(self, tools: Sequence[Tool])
fastmcp_slim/fastmcp/server/transforms/search/base.py:250
↓ 2 callers
Function
_require_azure_identity
Raise ImportError with install instructions if azure-identity is not available.
fastmcp_slim/fastmcp/server/auth/providers/azure.py:792
↓ 2 callers
Method
_reset_session_state
Reset session state after disconnect or cancellation. Args: full: If True, also resets session_task and nesting_counter.
fastmcp_slim/fastmcp/client/client.py:362
↓ 2 callers
Method
_resolve_factory
Resolve a server object or factory function to a server instance. Args: obj: The object that might be a server or factory functio
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/sources/filesystem.py:169
↓ 2 callers
Function
_resolve_ref
Resolve JSON Schema reference to target schema.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:258
↓ 2 callers
Method
_reverse_name
Remove namespace prefix from a name, or None if no match.
fastmcp_slim/fastmcp/server/transforms/namespace.py:64
↓ 2 callers
Method
_reverse_uri
Remove namespace from a URI, or None if no match.
fastmcp_slim/fastmcp/server/transforms/namespace.py:82
↓ 2 callers
Method
_select_model_from_preferences
( self, model_preferences: ModelPreferences | str | list[str] | None )
fastmcp_slim/fastmcp/client/sampling/handlers/openai.py:404
↓ 2 callers
Method
_select_model_from_preferences
( self, model_preferences: ModelPreferences | str | list[str] | None )
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:351
↓ 2 callers
Function
_serialize_with_fallback
( result: Any, serializer: ToolResultSerializerType | None = None )
fastmcp_slim/fastmcp/tools/base.py:479
↓ 2 callers
Function
_server_url_has_query
Check if a URL has query parameters.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:121
↓ 2 callers
Method
_set_auth
(self, auth: httpx.Auth | Literal["oauth"] | str | None)
fastmcp_slim/fastmcp/client/transports/sse.py:68
↓ 2 callers
Method
_set_consent_binding_cookie
Add a consent binding entry for a transaction. This cookie binds the browser that approved consent to the IdP callback, ensuring a di
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:225
↓ 2 callers
Method
_setup_session_with_claims
Set up a proxy JWT pointing at a valid upstream token, with optional upstream_claims.
tests/server/auth/oauth_proxy/test_tokens.py:1339
↓ 2 callers
Function
_stamp_prefab_marker
Mark a tool as needing a Prefab renderer resource. Sets ``meta["ui"]["resourceUri"]`` to a placeholder URI. The server recognizes the placeho
fastmcp_slim/fastmcp/server/providers/local_provider/decorators/tools.py:76
↓ 2 callers
Method
_template
(self)
tests/resources/test_resource_template_meta.py:39
↓ 2 callers
Function
_terminate_process
Terminate a subprocess and all its children. Sends SIGTERM to the process group first for graceful shutdown, then falls back to SIGKILL if th
fastmcp_slim/fastmcp/cli/run.py:344
↓ 2 callers
Method
_to_sdk_tool
Convert to an mcp.types.Tool for SDK compatibility. This is used internally when passing tools to the MCP SDK's create_message() meth
fastmcp_slim/fastmcp/server/sampling/sampling_tool.py:71
↓ 2 callers
Function
_tokenize
Lowercase, split on non-alphanumeric, filter short tokens.
fastmcp_slim/fastmcp/server/transforms/search/bm25.py:18
↓ 2 callers
Function
_tool_table
( tools: list[dict], *, ranked: bool = False, show_params: bool = False )
examples/code_mode/client.py:49
↓ 2 callers
Function
_tool_title
(tool: dict[str, Any])
fastmcp_slim/fastmcp/cli/apps_dev.py:1054
↓ 2 callers
Method
_transform_name
Apply namespace prefix to a name.
fastmcp_slim/fastmcp/server/transforms/namespace.py:60
↓ 2 callers
Method
_truncate_to_result
Truncate text to fit within max_size and wrap in ToolResult.
fastmcp_slim/fastmcp/server/middleware/response_limiting.py:71
↓ 2 callers
Method
_try_transparent_refresh
Refresh the upstream token transparently and update storage. Called during load_access_token when the upstream token has expired but
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:1680
↓ 2 callers
Function
_union_type
(branches: list[Any])
fastmcp_slim/fastmcp/server/transforms/search/base.py:80
↓ 2 callers
Function
_update_all_lists
Actions to update all three status lists from a tool result.
examples/apps/approvals/approvals_server.py:208
↓ 2 callers
Function
_walk_prefab_tools
Enumerate all prefab tools across the server's providers (sync walk of _components).
fastmcp_slim/fastmcp/server/providers/prefab_synthesis.py:153
↓ 2 callers
Function
_write_cache
Write version info to cache.
fastmcp_slim/fastmcp/utilities/version_check.py:46
↓ 2 callers
Method
_write_consent_bindings
Write the consent binding map to a signed cookie.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/consent.py:194
↓ 2 callers
Method
add
(self, a: int, b: int)
tests/server/middleware/test_caching.py:120
↓ 2 callers
Method
add
(a: int, b: int)
tests/server/tasks/test_task_mount.py:430
↓ 2 callers
Method
add_prompt
Add a prompt to this provider's storage. Accepts either a Prompt object or a decorated function with __fastmcp__ metadata.
fastmcp_slim/fastmcp/server/providers/local_provider/decorators/prompts.py:37
↓ 2 callers
Method
add_provider
Add a provider with optional namespace. If the provider is a FastMCP server, it's automatically wrapped in FastMCPProvider to ensure
fastmcp_slim/fastmcp/server/providers/aggregate.py:90
↓ 2 callers
Method
add_server
Add or update a server in the configuration.
fastmcp_slim/fastmcp/mcp_config.py:319
↓ 2 callers
Method
add_template
Add a resource template to this provider's storage.
fastmcp_slim/fastmcp/server/providers/local_provider/decorators/resources.py:101
↓ 2 callers
Method
add_to_docket
Schedule this component for background execution via docket. Subclasses override this to handle their specific calling conventions: -
fastmcp_slim/fastmcp/utilities/components.py:235
↓ 2 callers
Method
add_to_docket
Schedule this template for background execution via docket. The child's FunctionResourceTemplate.fn is registered (via get_tasks), an
fastmcp_slim/fastmcp/server/providers/fastmcp_provider.py:448
↓ 2 callers
Method
add_tool
Add a tool to this provider's storage. Accepts either a Tool object or a decorated function with __fastmcp__ metadata.
fastmcp_slim/fastmcp/server/providers/local_provider/decorators/tools.py:126
↓ 2 callers
Method
add_tool_transformation
Add a tool transformation. .. deprecated:: Use ``add_transform(ToolTransform({...}))`` instead.
fastmcp_slim/fastmcp/server/server.py:591
↓ 2 callers
Method
aiter_bytes
()
tests/server/auth/test_ssrf_protection.py:125
↓ 2 callers
Function
apps
Preview a FastMCPApp UI in the browser. Starts the MCP server from SERVER_SPEC on --mcp-port, launches a local dev UI on --dev-port with a to
fastmcp_slim/fastmcp/cli/cli.py:337
↓ 2 callers
Method
authorize
Start OAuth transaction and redirect to Azure AD. Override parent's authorize method to filter out the 'resource' parameter which is
fastmcp_slim/fastmcp/server/auth/providers/azure.py:374
↓ 2 callers
Function
block_server_imports
()
tests/client/test_slim_package_boundaries.py:13
↓ 2 callers
Method
call_tool
( self: Client, name: str, arguments: dict[str, Any] | None = None, *,
fastmcp_slim/fastmcp/client/mixins/tools.py:211
↓ 2 callers
Method
capture
Capture current context for background task execution.
fastmcp_slim/fastmcp/server/tasks/context.py:124
↓ 2 callers
Method
convert_result
Convert a raw result to ResourceResult. This is used in two contexts: 1. In _read() to convert user function return values to Resourc
fastmcp_slim/fastmcp/resources/template.py:235
↓ 2 callers
Method
convert_result
Convert a raw return value to PromptResult. Accepts: - PromptResult: passed through - str: wrapped as single Message
fastmcp_slim/fastmcp/prompts/base.py:285
↓ 2 callers
Function
convert_roots_list
(roots: RootsList)
fastmcp_slim/fastmcp/client/roots.py:19
↓ 2 callers
Function
create_base_app
Create a base Starlette app with common middleware and routes. Args: routes: List of routes to include in the app middleware: Lis
fastmcp_slim/fastmcp/server/http.py:114
↓ 2 callers
Function
create_consent_html
Create a styled HTML consent page for OAuth authorization requests. Args: csp_policy: Content Security Policy override. If No
fastmcp_slim/fastmcp/server/auth/oauth_proxy/ui.py:20
↓ 2 callers
Function
create_fastmcp_server_for_headers
Create a FastMCP server from FastAPI app with experimental parser.
tests/client/test_openapi.py:13
↓ 2 callers
Function
create_post
Create a unified post with optional features. Args: text: Post text (max 300 chars) images: URLs of images to attach (max 4)
examples/atproto_mcp/src/atproto_mcp/_atproto/_posts.py:19
↓ 2 callers
Function
create_resource
(fn: Callable[..., Any])
fastmcp_slim/fastmcp/resources/function_resource.py:278
↓ 2 callers
Function
create_roots_callback
( handler: RootsList | RootsHandler, )
fastmcp_slim/fastmcp/client/roots.py:33
↓ 2 callers
Function
create_status_message
Create a status message with icon. Args: message: Status message text is_success: True for success (✓), False for error (✕)
fastmcp_slim/fastmcp/utilities/ui.py:516
↓ 2 callers
Method
create_token
Generate a test JWT token for testing purposes. Args: subject: Subject claim (usually user ID) issuer: Issue
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:128
↓ 2 callers
Function
cursor_command
Install an MCP server in Cursor. Args: server_spec: Python file to install, optionally with :object suffix
fastmcp_slim/fastmcp/cli/install/cursor.py:228
↓ 2 callers
Function
decorator
(fn: F, tool_name: str | None)
fastmcp_slim/fastmcp/tools/function_tool.py:526
↓ 2 callers
Function
decorator
(fn: F, prompt_name: str | None)
fastmcp_slim/fastmcp/prompts/function_prompt.py:493
↓ 2 callers
Function
default_serializer
The default serializer for Payloads in the logging middleware.
fastmcp_slim/fastmcp/server/middleware/logging.py:15
↓ 2 callers
Method
delete_state
Delete a value from the state store. Removes from both request-scoped and session-scoped stores.
fastmcp_slim/fastmcp/server/context.py:1305
↓ 2 callers
Function
do_ai
( user_prompt: str, system_prompt: str, result_type: type | Annotated, deps=None, )
examples/memory.py:56
↓ 2 callers
Method
enum_schema
Generate inline enum schema. Always generates enum pattern: `{"enum": [value, ...]}` Titled enums are handled separately via dict-bas
fastmcp_slim/fastmcp/server/elicitation.py:94
↓ 2 callers
Method
exchange_refresh_token
( self, client: OAuthClientInformationFull, refresh_token: RefreshToken, scope
tests/server/test_auth_integration.py:126
↓ 2 callers
Function
execute_tools
Execute tool calls and return results. Args: tool_calls: List of tool use requests from the LLM. tool_map: Mapping from tool name
fastmcp_slim/fastmcp/server/sampling/run.py:253
↓ 2 callers
Function
fail
Always raises an error.
examples/apps/inspector_demo.py:114
↓ 2 callers
Function
fastmcp_server
()
tests/server/http/test_http_dependencies.py:14
↓ 2 callers
Function
find_claude_command
Find the Claude Code CLI command. Checks common installation locations since 'claude' is often a shell alias that doesn't work with subproces
fastmcp_slim/fastmcp/cli/install/claude_code.py:20
↓ 2 callers
Function
find_gemini_command
Find the Gemini CLI command.
fastmcp_slim/fastmcp/cli/install/gemini_cli.py:20
↓ 2 callers
Function
find_refs_in_value
Recursively find all $ref references.
fastmcp_slim/fastmcp/utilities/openapi/schemas.py:421
↓ 2 callers
Function
format_mcp_info
Format server info as standard MCP protocol JSON. Uses Client to get the standard MCP protocol format with camelCase fields. Includes version
fastmcp_slim/fastmcp/utilities/inspect.py:432
↓ 2 callers
Method
from_function
Create a FunctionResource from a function. Args: fn: The function to wrap uri: The URI for the resource (required if
fastmcp_slim/fastmcp/resources/function_resource.py:90
↓ 2 callers
Method
from_mcp_tool
Factory method to create a ProxyTool from a raw MCP tool schema.
fastmcp_slim/fastmcp/server/providers/proxy.py:149
↓ 2 callers
Function
gc_collect_harder
()
tests/test_mcp_config.py:58
↓ 2 callers
Function
gc_collect_harder
()
tests/client/test_stdio.py:18
↓ 2 callers
Method
generate_name
(cls, name: str | None = None)
fastmcp_slim/fastmcp/server/server.py:2422
← previous
next →
801–900 of 10,312, ranked by callers