MCPcopy Create free account

hub / github.com/PrefectHQ/fastmcp / functions

Functions13,374 in github.com/PrefectHQ/fastmcp

↓ 6 callersMethodaclose
(self)
fastmcp_slim/fastmcp/cli/deploy/horizon_client.py:188
↓ 6 callersMethodadd_tools
(self, fastmcp: FastMCP, prefix: str = "")
tests/server/middleware/test_caching.py:162
↓ 6 callersFunctionadmin_contacts_app
(calls: list[str], tags: set[str])
tests/server/test_hashed_tool_dispatch.py:404
↓ 6 callersMethodapply_runtime_settings
Apply runtime settings like environment variables and working directory. Args: config_path: Path to config file for resolving rel
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:85
↓ 6 callersMethodassert_disconnected
(client: Client)
tests/client/client/test_client.py:997
↓ 6 callersFunctionassert_task_matches_sync
Run a tool sync and as a task; assert the inlined results are identical.
tests/tasks/server/test_task_return_types.py:49
↓ 6 callersMethodasync_auth_flow
HTTPX auth flow with automatic retry on stale cached credentials. If the OAuth flow fails due to invalid/stale client credentials, cl
fastmcp_slim/fastmcp/client/auth/oauth.py:446
↓ 6 callersMethodbuild
Constructs a final httpx2.Request object, handling all OpenAPI serialization. Args: route: HTTPRoute containing OpenAPI
fastmcp_slim/fastmcp/utilities/openapi/director.py:81
↓ 6 callersFunctionbuild_injected_server
Server whose cart tools inject a per-user `session: UserSession`.
tests/server/test_session_provider.py:70
↓ 6 callersFunctioncall_sync_fn_in_threadpool
Call a sync function in a threadpool to avoid blocking the event loop. Uses anyio.to_thread.run_sync which properly propagates contextvars, m
fastmcp_slim/fastmcp/utilities/async_utils.py:26
↓ 6 callersMethodcall_tools_bulk
Call multiple tools registered on this MCP server in a single request. Each call can be for a different tool and can include differe
fastmcp_slim/fastmcp/contrib/bulk_tool_caller/bulk_tool_caller.py:72
↓ 6 callersFunctionclient_supports_extension
Check whether the connected client supports a given MCP extension. Inspects the ``extensions`` capability on ``ClientCapabilities`` sent by the
fastmcp_slim/fastmcp/server/low_level.py:111
↓ 6 callersMethodclose
(self)
examples/smart_home/src/smart_home/fire_tv/client.py:75
↓ 6 callersMethodcollect
Collect a schema by name and recurse into its dependencies.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:578
↓ 6 callersFunctionconfigure_logging
Configure logging for FastMCP. Args: logger: the logger to configure level: the log level to use rich_kwargs: the pa
fastmcp_slim/fastmcp/utilities/logging.py:42
↓ 6 callersFunctioncreate_oauth_callback_server
Create an OAuth callback server. Args: port: The port to run the server on callback_path: The path to listen for OAuth redir
fastmcp_slim/fastmcp/client/oauth_callback.py:114
↓ 6 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
↓ 6 callersFunctiondecode_jwt_payload
Decode JWT payload without signature verification. Use only for tokens received directly from trusted sources (e.g., IdP token endpoints). A
fastmcp_slim/fastmcp/utilities/auth.py:53
↓ 6 callersMethoddisconnect
(self)
fastmcp_slim/fastmcp/client/transports/stdio.py:169
↓ 6 callersFunctionel
(tag, text, className)
status-site/app.js:10
↓ 6 callersMethodend
Invalidate the session — delete its one key and all of its state. After this the id no longer resolves through `get_session`. This is
fastmcp_slim/fastmcp/server/sessions.py:294
↓ 6 callersMethodfind_config
Find a fastmcp.json file in the specified directory. Args: start_path: Directory to look in (defaults to current directory)
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:323
↓ 6 callersMethodget_calls
Get all recorded calls for a specific method or hook. Args: method: The method to filter by (e.g. "tools/list")
tests/server/middleware/test_middleware.py:48
↓ 6 callersMethodget_client
Get client information by ID. This is generally the random ID provided to the DCR client during registration, not the upstream client ID.
fastmcp_slim/fastmcp/server/auth/oauth_proxy/proxy.py:926
↓ 6 callersFunctionget_property
(tool: Tool, name: str)
tests/tools/tool_transform/test_args.py:21
↓ 6 callersMethodget_resource
Get a resource by URI, filtering disabled resources. Overrides Provider.get_resource() to add visibility filtering after all transfor
fastmcp_slim/fastmcp/server/server.py:1049
↓ 6 callersFunctionget_skill_manifest
Get the manifest for a specific skill. Args: client: Connected FastMCP client skill_name: Name of the skill Returns:
fastmcp_slim/fastmcp/utilities/skills.py:87
↓ 6 callersMethodget_span_attributes
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:473
↓ 6 callersFunctionget_task_context
Get the current task context if running inside a background task worker. This function extracts task information from the Docket execution contex
fastmcp_tasks/fastmcp_tasks/context.py:88
↓ 6 callersMethodget_token_expiry
(self)
fastmcp_slim/fastmcp/client/auth/oauth.py:168
↓ 6 callersFunctionget_tracer
Get the FastMCP tracer for creating spans. Instrumentation is on by default. FastMCP uses only the OpenTelemetry API, so span creation is a n
fastmcp_slim/fastmcp/telemetry.py:128
↓ 6 callersMethodgetsockname
(self)
tests/client/auth/test_oauth_client.py:364
↓ 6 callersFunctioninstall_cursor
Install FastMCP server in Cursor. Args: file: Path to the server file server_object: Optional server object name (for :object suf
fastmcp_slim/fastmcp/cli/install/cursor.py:143
↓ 6 callersFunctionissubclass_safe
Check if cls is a subclass of base, even if cls is a type variable.
fastmcp_slim/fastmcp/utilities/types.py:153
↓ 6 callersMethodlist_prompts
List prompts with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:417
↓ 6 callersMethodlist_resource_templates
List resource templates with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:374
↓ 6 callersMethodlist_resources
List resources with all transforms applied. Components may be marked as disabled but are NOT filtered here.
fastmcp_slim/fastmcp/server/providers/base.py:334
↓ 6 callersFunctionload_secret
(store: CredentialStore)
tests/cli/deploy/test_credentials.py:33
↓ 6 callersFunctionmake_restricted_tag_server
()
tests/server/auth/test_authorization.py:52
↓ 6 callersFunctionmake_token
( *, subject: str = "user-a", client_id: str = "client-1" )
tests/server/test_sessions.py:27
↓ 6 callersFunctionnative_spans_enabled
Whether FastMCP should create its own spans right now.
fastmcp_slim/fastmcp/telemetry.py:103
↓ 6 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:753
↓ 6 callersMethodnew
(self)
fastmcp_slim/fastmcp/server/providers/proxy.py:1775
↓ 6 callersFunctionnormalize_api_origin
Validate and normalize a Horizon API origin.
fastmcp_slim/fastmcp/cli/deploy/horizon_client.py:129
↓ 6 callersFunctionnormalize_completion
Coerce a handler's return value into a wire ``Completion``. A returned ``str`` is rejected: it is almost always a mistake (the value would it
fastmcp_slim/fastmcp/server/completions.py:54
↓ 6 callersMethodprepare
Prepare environment and source for execution. When output_dir is provided, creates a persistent uv project. When output_dir is None,
fastmcp_slim/fastmcp/utilities/mcp_server_config/v1/mcp_server_config.py:342
↓ 6 callersFunctionprincipal_string
(token: SDKAccessToken)
tests/server/test_sessions.py:39
↓ 6 callersFunctionrequire_docket
Raise ImportError with install instructions if docket not available. Args: feature: Description of what requires docket (e.g., "`task=Tru
fastmcp_tasks/fastmcp_tasks/dependencies.py:45
↓ 6 callersMethodrevoke_token
(self, token: AccessToken | RefreshToken)
tests/server/test_auth_integration.py:186
↓ 6 callersMethodrun
(self)
tests/client/minimal_stdio_server.py:171
↓ 6 callersMethodsave
(name: str)
tests/server/providers/test_prefab_roundtrip.py:674
↓ 6 callersFunctionserialize_transport
Serialize a resolved transport to a Python expression string. Returns ``(expression, extra_imports)`` where *extra_imports* is a set of impor
fastmcp_slim/fastmcp/cli/generate.py:122
↓ 6 callersFunctionsession_id_parameter_names
Names of a function's parameters annotated with `SessionId`. Scans resolved type hints for `Annotated[str, _SessionIdMarker()]` metadata. Ret
fastmcp_slim/fastmcp/server/sessions.py:343
↓ 6 callersFunctionsession_storage_key
The single storage key holding a session's state dict. Keyed by `(principal, session_id)`: the principal is the isolation wall, the id organi
fastmcp_slim/fastmcp/server/sessions.py:164
↓ 6 callersFunctionto_mcp_error
Translate a FastMCP exception into a wire-format ``MCPError``. Central mapping from FastMCP's public exception types to the JSON-RPC error co
fastmcp_slim/fastmcp/exceptions.py:117
↓ 6 callersMethodto_mcp_result
( self, )
fastmcp_slim/fastmcp/tools/base.py:171
↓ 6 callersMethodto_transport
(self)
fastmcp_slim/fastmcp/mcp_config.py:213
↓ 6 callersMethodto_transport
(self)
tests/test_mcp_config.py:102
↓ 6 callersFunctiontool_identity
Read a tool's stored identity hash, if it carries one.
fastmcp_slim/fastmcp/server/providers/addressing.py:53
↓ 6 callersMethodtransport
(self, name: str)
tests/downstream/_harness.py:166
↓ 6 callersMethodverify_token
Verify a bearer token and return access info if valid. This method implements the TokenVerifier protocol by delegating to ou
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:631
↓ 6 callersMethodwrap
(cls, value: ToolResult)
fastmcp_slim/fastmcp/server/middleware/caching.py:147
↓ 5 callersMethod__init__
(self)
tests/server/middleware/test_initialization_middleware.py:120
↓ 5 callersMethod_apply_task_transforms
Apply this provider's transforms to components bound for Docket. Registration needs the names components are called by, so renaming t
fastmcp_slim/fastmcp/server/providers/base.py:618
↓ 5 callersMethod_backend
()
tests/server/providers/test_prefab_roundtrip.py:186
↓ 5 callersFunction_backfill_boolean_defaults
Fill in missing boolean fields with their model defaults. HTML checkboxes omit the field entirely when unchecked, so the submitted data dict
fastmcp_slim/fastmcp/apps/form.py:67
↓ 5 callersFunction_build_stdio_from_command
Shell-split a command string into a ``StdioTransport``.
fastmcp_slim/fastmcp/cli/client.py:115
↓ 5 callersFunction_claude_code_config
Build a minimal ~/.claude.json structure.
tests/cli/test_discovery.py:282
↓ 5 callersMethod_collect_list_results
Collect successful list results, logging any exceptions. Emits a warning when the same MCP identity is returned by more than one prov
fastmcp_slim/fastmcp/server/providers/aggregate.py:184
↓ 5 callersMethod_construct_and_capture_timeout
Construct a provider with mocked discovery, returning the timeout used.
tests/server/auth/test_oidc_proxy.py:888
↓ 5 callersMethod_convert_tool_choice_to_anthropic
Convert MCP tool_choice to Anthropic format. Returns None for "none" mode, signaling that tools should be omitted from the request en
fastmcp_slim/fastmcp/client/sampling/handlers/anthropic.py:387
↓ 5 callersMethod_create
Write the initial record so the session exists (called by `create_session`).
fastmcp_slim/fastmcp/server/sessions.py:247
↓ 5 callersMethod_create_test_auth_provider
Helper to create a test RemoteAuthProvider with StaticTokenVerifier.
tests/server/auth/test_remote_auth_provider.py:235
↓ 5 callersMethod_disconnect
Disconnect from session using reference counting. This method implements proper cleanup for reentrant context managers: - De
fastmcp_slim/fastmcp/client/client.py:1054
↓ 5 callersFunction_dump
(model: Any)
tests/tasks/server/test_wire_models.py:52
↓ 5 callersMethod_ensure_setup
Lazily register tools and resources on first access.
fastmcp_slim/fastmcp/apps/generative.py:99
↓ 5 callersMethod_extract_scopes
Extract scopes from JWT claims. Supports both 'scope' and 'scp' claims. Checks the `scope` claim first (standard OAuth2 clai
fastmcp_slim/fastmcp/server/auth/providers/jwt.py:480
↓ 5 callersFunction_find_azure_provider
Extract an AzureProvider from an auth provider, unwrapping MultiAuth if needed.
fastmcp_slim/fastmcp/server/auth/providers/azure.py:821
↓ 5 callersMethod_get_client
Gets a client instance by calling the sync or async factory.
fastmcp_slim/fastmcp/server/providers/proxy.py:352
↓ 5 callersFunction_guard_status
( *, host: str, origin: str | None = None, server: tuple[str, int] | None = None, mode: Li
tests/server/http/test_http_auth_middleware.py:36
↓ 5 callersFunction_input_required
( requests: dict[str, mcp_types.ElicitRequest], request_state: str | None = None, )
tests/tasks/server/test_guard_reentrant.py:55
↓ 5 callersFunction_is_loopback_host
(host: str)
fastmcp_slim/fastmcp/server/http.py:133
↓ 5 callersMethod_list_tools
(self)
fastmcp_slim/fastmcp/server/providers/filesystem.py:207
↓ 5 callersFunction_make_dev_app
Build the authenticated Starlette development host.
fastmcp_slim/fastmcp/cli/apps_dev.py:1405
↓ 5 callersFunction_make_get_prompt_cache_key
Make a cache key for a prompt get using name, version, and arguments.
fastmcp_slim/fastmcp/server/middleware/caching.py:706
↓ 5 callersFunction_make_resolver
Create a CallTool resolver that addresses peer tools by identity. ``app_name`` is the FastMCPApp's name, known at serialization time from the
fastmcp_slim/fastmcp/apps/app.py:56
↓ 5 callersFunction_parse_call_tool_result
Parse an mcp_types.CallToolResult into our CallToolResult dataclass. Args: name: Tool name (for schema lookup) result: Raw MCP pr
fastmcp_slim/fastmcp/client/mixins/tools.py:340
↓ 5 callersFunction_proxy_upstream_error
Report an unreachable backend the same way however the failure arrived. Depending on where the dead connection is noticed, the proxy sees either
fastmcp_slim/fastmcp/server/providers/proxy.py:147
↓ 5 callersFunction_read_cache
Read cached version info. Returns: Tuple of (cached_version, cache_timestamp) or (None, 0) if no cache.
fastmcp_slim/fastmcp/utilities/version_check.py:29
↓ 5 callersMethod_request
( self, method: str, path: str, *, authenticated: bool = False,
fastmcp_slim/fastmcp/cli/deploy/horizon_client.py:191
↓ 5 callersMethod_require_status
(response: httpx2.Response, expected: int)
fastmcp_slim/fastmcp/cli/deploy/horizon_client.py:235
↓ 5 callersMethod_resolve_ref
Resolves a reference to its target definition.
fastmcp_slim/fastmcp/utilities/openapi/parser.py:160
↓ 5 callersMethod_resource_server
()
tests/server/test_mrtr_guards_components.py:127
↓ 5 callersFunction_sanitize_name
Convert string to valid Python identifier.
fastmcp_slim/fastmcp/utilities/json_schema_type.py:741
↓ 5 callersFunction_sanitize_untrusted_text
Escape rich markup and encode control chars for terminal-safe output.
fastmcp_slim/fastmcp/cli/client.py:409
↓ 5 callersFunction_scan_cursor_workspace
Walk up from *start_dir* looking for ``.cursor/mcp.json``.
fastmcp_slim/fastmcp/cli/discovery.py:213
↓ 5 callersFunction_scan_gemini
Scan Gemini CLI settings for MCP servers. Checks both user-level ``~/.gemini/settings.json`` and project-level ``.gemini/settings.json``.
fastmcp_slim/fastmcp/cli/discovery.py:240
↓ 5 callersFunction_schema_type
(schema: Any)
fastmcp_slim/fastmcp/server/transforms/search/base.py:93
↓ 5 callersMethod_server
(self)
tests/tasks/server/test_task_config.py:150
↓ 5 callersFunction_stash_proxy_request_context
Stash the proxy's ``RequestContext`` on a ``ProxyClient`` before a backend call. Every proxy component (tool, resource, template, prompt) must ca
fastmcp_slim/fastmcp/server/providers/proxy.py:247
← previousnext →501–600 of 13,374, ranked by callers