brk-code

fastmcp の API リファレンス

fastmcp (PrefectHQ/fastmcp) の公開 API 400 件 —— クラス 152、関数 97、メソッド 151。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: PrefectHQ/fastmcp

種別件数
クラス152
関数97
メソッド151

API 一覧

classfastmcp_slim.fastmcp._warnings.FastMCPDeprecationWarning
Deprecation warning for FastMCP APIs.
classfastmcp_slim.fastmcp.apps.app.FastMCPApp
A Provider that represents an MCP application.
methodfastmcp_slim.fastmcp.apps.app.FastMCPApp.add_tool(tool:Tool | Callable[..., Any]) -> Tool
Add a tool to this app programmatically.
funcfastmcp_slim.fastmcp.apps.choice.Choice.choose(prompt:str, options:list[str], title:str | None=None) -> PrefabApp
Present the user with a set of options to choose from.
classfastmcp_slim.fastmcp.apps.config.AppConfig
Configuration for MCP App tools and resources.
classfastmcp_slim.fastmcp.apps.config.ResourceCSP
Content Security Policy for MCP App resources.
classfastmcp_slim.fastmcp.apps.config.ResourcePermissions
Iframe sandbox permissions for MCP App resources.
funcfastmcp_slim.fastmcp.apps.file_upload.FileUpload.file_manager(ctx:Context) -> PrefabApp
Upload and manage files.
funcfastmcp_slim.fastmcp.apps.file_upload.FileUpload.list_files(ctx:Context) -> list[dict]
List all uploaded files with metadata.
methodfastmcp_slim.fastmcp.apps.file_upload.FileUpload.on_list(ctx:Context) -> list[dict[str, Any]]
List all stored files.
methodfastmcp_slim.fastmcp.apps.file_upload.FileUpload.on_read(name:str, ctx:Context) -> dict[str, Any]
Read a file's contents by name.
methodfastmcp_slim.fastmcp.apps.file_upload.FileUpload.on_store(files:list[dict[str, Any]], ctx:Context) -> list[dict[str, Any]]
Store uploaded files and return summaries.
funcfastmcp_slim.fastmcp.apps.file_upload.FileUpload.read_file(name:str, ctx:Context) -> dict
Read an uploaded file's contents by name.
funcfastmcp_slim.fastmcp.apps.file_upload.FileUpload.store_files(files:list[dict], ctx:Context) -> list[dict]
Store uploaded files.
funcfastmcp_slim.fastmcp.apps.form.FormInput.collect_input(prompt:str, title:str | None=None, submit_text:str | None=None, default:dict[str, Any] | None=None) -> PrefabApp
Collect structured input from the user.
funcfastmcp_slim.fastmcp.apps.form.FormInput.submit_form(data:dict[str, Any] | None=None) -> str
Validate and process form submission.
funcfastmcp_slim.fastmcp.cli.apps_dev.api_logs(request:Request) -> Response
Return message log entries since a given id.
funcfastmcp_slim.fastmcp.cli.apps_dev.api_logs_clear(request:Request) -> Response
Clear the message log.
funcfastmcp_slim.fastmcp.cli.apps_dev.launch(request:Request) -> HTMLResponse
Host page: GET /launch?tool=name&args={...}
funcfastmcp_slim.fastmcp.cli.apps_dev.picker_app(request:Request) -> HTMLResponse
Prefab picker UI — tool list with one tab per UI tool.
funcfastmcp_slim.fastmcp.cli.apps_dev.serve_app_bridge_js(request:Request) -> Response
Serve the locally patched app-bridge.js.
funcfastmcp_slim.fastmcp.cli.apps_dev.ui_resource(request:Request) -> Response
Fetch an MCP resource server-side and return it as HTML.
funcfastmcp_slim.fastmcp.cli.cli.with_argv(args:list[str] | None)
Temporarily replace sys.argv if args provided.
funcfastmcp_slim.fastmcp.cli.client.coerce_value(raw:str, schema:dict[str, Any]) -> Any
Coerce a string CLI value according to a JSON-Schema type hint.
methodfastmcp_slim.fastmcp.cli.discovery.DiscoveredServer.qualified_name() -> str
Fully qualified ``source:name`` identifier.
funcfastmcp_slim.fastmcp.cli.discovery.discover_servers(start_dir:Path | None=None) -> list[DiscoveredServer]
Run all scanners and return the combined results.
funcfastmcp_slim.fastmcp.cli.generate.generate_cli_script(server_name:str, server_spec:str, transport_code:str, extra_imports:set[str], tools:list[mcp_types.Tool]) -> str
Generate the full CLI script source code.
funcfastmcp_slim.fastmcp.cli.install.claude_code.check_claude_code_available() -> bool
Check if Claude Code CLI is available.
funcfastmcp_slim.fastmcp.cli.install.claude_code.find_claude_command() -> str | None
Find the Claude Code CLI command.
funcfastmcp_slim.fastmcp.cli.install.claude_desktop.get_claude_config_path(config_path:Path | None=None) -> Path | None
Get the Claude config directory based on platform.
funcfastmcp_slim.fastmcp.cli.install.gemini_cli.check_gemini_cli_available() -> bool
Check if Gemini CLI is available.
funcfastmcp_slim.fastmcp.cli.install.gemini_cli.find_gemini_command() -> str | None
Find the Gemini CLI command.
funcfastmcp_slim.fastmcp.cli.install.shared.parse_env_var(env_var:str) -> tuple[str, str]
Parse environment variable string in format KEY=VALUE.
funcfastmcp_slim.fastmcp.cli.run.create_client_server(url:str) -> Any
Create a FastMCP server from a client URL.
funcfastmcp_slim.fastmcp.cli.run.create_mcp_config_server(mcp_config_path:Path) -> FastMCP[None]
Create a FastMCP server from a MCPConfig.
funcfastmcp_slim.fastmcp.cli.run.is_url(path:str) -> bool
Check if a string is a URL.
funcfastmcp_slim.fastmcp.cli.run.load_mcp_server_config(config_path:Path) -> MCPServerConfig
Load a FastMCP configuration from a fastmcp.json file.
funcfastmcp_slim.fastmcp.cli.run.run_v1_server_async(server:SDKServer, host:str | None=None, port:int | None=None, transport:TransportType | None=None) -> None
Run a FastMCP 1.x server using async methods.
funcfastmcp_slim.fastmcp.cli.run.run_with_reload(cmd:list[str], reload_dirs:list[Path] | None=None, is_stdio:bool=False) -> None
Run a command with file watching and auto-reload.
classfastmcp_slim.fastmcp.client.client.CallToolResult
Parsed result from a tool call.
methodfastmcp_slim.fastmcp.client.client.Client.cancel(request_id:str | int, reason:str | None=None) -> None
Send a cancellation notification for an in-progress request.
methodfastmcp_slim.fastmcp.client.client.Client.initialize(timeout:datetime.timedelta | float | int | None=None) -> mcp_types.InitializeResult
Send an initialize request to the server.
methodfastmcp_slim.fastmcp.client.client.Client.is_connected() -> bool
Check if the client is currently connected.
methodfastmcp_slim.fastmcp.client.client.Client.ping() -> bool
Send a ping request.
methodfastmcp_slim.fastmcp.client.client.Client.progress(progress_token:str | int, progress:float, total:float | None=None, message:str | None=None) -> None
Send a progress notification.
methodfastmcp_slim.fastmcp.client.client.Client.send_roots_list_changed() -> None
Send a roots/list_changed notification.
methodfastmcp_slim.fastmcp.client.client.Client.session() -> ClientSession
Get the current active session.
methodfastmcp_slim.fastmcp.client.client.Client.set_elicitation_callback(elicitation_callback:ElicitationHandler) -> None
Set the elicitation callback for the client.
methodfastmcp_slim.fastmcp.client.client.Client.set_logging_level(level:mcp_types.LoggingLevel) -> None
Send a logging/setLevel request.
methodfastmcp_slim.fastmcp.client.client.Client.set_roots(roots:RootsList | RootsHandler) -> None
Set the roots for the client.
classfastmcp_slim.fastmcp.client.mixins.prompts.ClientPromptsMixin
Mixin providing prompt-related methods for Client.
classfastmcp_slim.fastmcp.client.mixins.tools.ClientToolsMixin
Mixin providing tool-related methods for Client.
methodfastmcp_slim.fastmcp.client.mixins.tools.ClientToolsMixin.list_tools(max_pages:int=AUTO_PAGINATION_MAX_PAGES) -> list[mcp_types.Tool]
Retrieve all tools available on the server.
funcfastmcp_slim.fastmcp.client.progress.default_progress_handler(progress:float, total:float | None, message:str | None) -> None
Default handler for progress notifications.
classfastmcp_slim.fastmcp.client.sampling.handlers.openai.OpenAISamplingHandler
Sampling handler that uses the OpenAI API.
classfastmcp_slim.fastmcp.client.transports.base.TransportOptions
How one client wants its connection built.
classfastmcp_slim.fastmcp.client.transports.memory.FastMCPTransport
In-memory transport for FastMCP servers.
classfastmcp_slim.fastmcp.client.transports.stdio.NodeStdioTransport
Transport for running Node.js scripts.
classfastmcp_slim.fastmcp.client.transports.stdio.NpxStdioTransport
Transport for running commands via the npx tool.
classfastmcp_slim.fastmcp.client.transports.stdio.PythonStdioTransport
Transport for running Python scripts.
classfastmcp_slim.fastmcp.client.transports.stdio.UvStdioTransport
Transport for running commands via the uv tool.
classfastmcp_slim.fastmcp.client.transports.stdio.UvxStdioTransport
Transport for running commands via the uvx tool.
funcfastmcp_slim.fastmcp.contrib.bulk_tool_caller.example.echo_tool(text:str) -> str
Echo the input text
funcfastmcp_slim.fastmcp.contrib.component_manager.example.get_greeting() -> str
Provides a simple greeting message.
funcfastmcp_slim.fastmcp.contrib.component_manager.example.get_info() -> str
Provides a simple info.
methodfastmcp_slim.fastmcp.contrib.mcp_mixin.example.Sample.first_prompt()
First prompt description.
methodfastmcp_slim.fastmcp.contrib.mcp_mixin.example.Sample.first_resource()
First resource description.
methodfastmcp_slim.fastmcp.contrib.mcp_mixin.example.Sample.first_tool()
First tool description.
classfastmcp_slim.fastmcp.decorators.HasFastMCPMeta
Protocol for callables decorated with FastMCP metadata.
funcfastmcp_slim.fastmcp.decorators.resolve_task_config(task:bool | TaskConfig | None) -> bool | TaskConfig
Resolve task config, defaulting None to False.
classfastmcp_slim.fastmcp.exceptions.AuthorizationError
Error when authorization check fails.
classfastmcp_slim.fastmcp.exceptions.ClientError
Error in client operations.
classfastmcp_slim.fastmcp.exceptions.DisabledError
Object is disabled.
classfastmcp_slim.fastmcp.exceptions.FastMCPError
Base error for FastMCP.
classfastmcp_slim.fastmcp.exceptions.InvalidSignature
Invalid signature for use with FastMCP.
classfastmcp_slim.fastmcp.exceptions.MCPError
Fallback used when MCP dependencies are not installed.
classfastmcp_slim.fastmcp.exceptions.NotFoundError
Object not found.
classfastmcp_slim.fastmcp.exceptions.PromptError
Error in prompt operations.
classfastmcp_slim.fastmcp.exceptions.ResourceError
Error in resource operations.
classfastmcp_slim.fastmcp.exceptions.ToolError
Error in tool operations.
classfastmcp_slim.fastmcp.exceptions.ValidationError
Error in validating parameters or return values.
classfastmcp_slim.fastmcp.experimental.transforms.code_mode.MontySandboxProvider
Sandbox provider backed by `pydantic-monty`.
classfastmcp_slim.fastmcp.mcp_config.CanonicalMCPConfig
Canonical MCP configuration format.
methodfastmcp_slim.fastmcp.mcp_config.CanonicalMCPConfig.add_server(name:str, server:CanonicalMCPServerTypes) -> None
Add or update a server in the configuration.
methodfastmcp_slim.fastmcp.mcp_config.MCPConfig.add_server(name:str, server:MCPServerTypes) -> None
Add or update a server in the configuration.
methodfastmcp_slim.fastmcp.mcp_config.MCPConfig.from_dict(config:dict[str, Any]) -> Self
Parse MCP configuration from dictionary format.
methodfastmcp_slim.fastmcp.mcp_config.MCPConfig.from_file(file_path:Path) -> Self
Load configuration from JSON file.
methodfastmcp_slim.fastmcp.mcp_config.MCPConfig.write_to_file(file_path:Path) -> None
Write configuration to JSON file.
classfastmcp_slim.fastmcp.mcp_config.RemoteMCPServer
MCP server configuration for HTTP/SSE transport.
classfastmcp_slim.fastmcp.mcp_config.StdioMCPServer
MCP server configuration for stdio transport.
classfastmcp_slim.fastmcp.mcp_config.TransformingRemoteMCPServer
A Remote server with tool transforms.
classfastmcp_slim.fastmcp.mcp_config.TransformingStdioMCPServer
A Stdio server with tool transforms.
funcfastmcp_slim.fastmcp.mcp_config.infer_transport_type_from_url(url:str | AnyUrl) -> Literal['http', 'sse']
Infer the appropriate transport type from the given URL.
classfastmcp_slim.fastmcp.prompts.base.Message
Wrapper for prompt message with auto-serialization.
methodfastmcp_slim.fastmcp.prompts.base.Message.to_mcp_prompt_message() -> PromptMessage
Convert to MCP PromptMessage.
classfastmcp_slim.fastmcp.prompts.base.Prompt
A prompt template that can be rendered with parameters.
methodfastmcp_slim.fastmcp.prompts.base.Prompt.convert_result(raw_value:Any) -> PromptResult
Convert a raw return value to PromptResult.
methodfastmcp_slim.fastmcp.prompts.base.Prompt.render(arguments:dict[str, Any] | None=None) -> str | list[Message | str] | PromptResult
Render the prompt with arguments.
methodfastmcp_slim.fastmcp.prompts.base.Prompt.to_mcp_prompt(**overrides:Any) -> SDKPrompt
Convert the prompt to an MCP prompt.
classfastmcp_slim.fastmcp.prompts.base.PromptArgument
An argument that can be passed to a prompt.
classfastmcp_slim.fastmcp.prompts.base.PromptResult
Canonical result type for prompt rendering.
methodfastmcp_slim.fastmcp.prompts.base.PromptResult.to_mcp_prompt_result() -> GetPromptResult
Convert to MCP GetPromptResult.
classfastmcp_slim.fastmcp.prompts.function_prompt.DecoratedPrompt
Protocol for functions decorated with @prompt.
classfastmcp_slim.fastmcp.prompts.function_prompt.FunctionPrompt
A prompt that is a function.
methodfastmcp_slim.fastmcp.prompts.function_prompt.FunctionPrompt.render(arguments:dict[str, Any] | None=None) -> PromptResult
Render the prompt with arguments.
classfastmcp_slim.fastmcp.resources.base.Resource
Base class for all resources.
methodfastmcp_slim.fastmcp.resources.base.Resource.convert_result(raw_value:Any) -> ResourceResult
Convert a raw result to ResourceResult.
methodfastmcp_slim.fastmcp.resources.base.Resource.key() -> str
The globally unique lookup key for this resource.
methodfastmcp_slim.fastmcp.resources.base.Resource.read() -> str | bytes | ResourceResult
Read the resource content.
methodfastmcp_slim.fastmcp.resources.base.Resource.set_default_mime_type(mime_type:str | None) -> str
Set default MIME type if not provided.
methodfastmcp_slim.fastmcp.resources.base.Resource.set_default_name() -> Self
Set default name from URI if not provided.
methodfastmcp_slim.fastmcp.resources.base.Resource.to_mcp_resource(**overrides:Any) -> SDKResource
Convert the resource to an SDKResource.
methodfastmcp_slim.fastmcp.resources.base.ResourceContent.to_mcp_resource_contents(uri:AnyUrl | str) -> mcp_types.TextResourceContents | mcp_types.BlobResourceContents
Convert to MCP resource contents type.
classfastmcp_slim.fastmcp.resources.base.ResourceResult
Canonical result type for resource reads.
methodfastmcp_slim.fastmcp.resources.base.ResourceResult.to_mcp_result(uri:AnyUrl | str) -> mcp_types.ReadResourceResult
Convert to MCP ReadResourceResult.
classfastmcp_slim.fastmcp.resources.function_resource.DecoratedResource
Protocol for functions decorated with @resource.
classfastmcp_slim.fastmcp.resources.template.FunctionResourceTemplate
A template for dynamically creating resources.
methodfastmcp_slim.fastmcp.resources.template.FunctionResourceTemplate.read(arguments:dict[str, Any]) -> str | bytes | ResourceResult
Read the resource content.
classfastmcp_slim.fastmcp.resources.template.ResourceTemplate
A template for dynamically creating resources.
methodfastmcp_slim.fastmcp.resources.template.ResourceTemplate.convert_result(raw_value:Any) -> ResourceResult
Convert a raw result to ResourceResult.
methodfastmcp_slim.fastmcp.resources.template.ResourceTemplate.key() -> str
The globally unique lookup key for this template.
methodfastmcp_slim.fastmcp.resources.template.ResourceTemplate.matches(uri:str) -> dict[str, Any] | None
Check if URI matches template and extract parameters.
methodfastmcp_slim.fastmcp.resources.template.ResourceTemplate.read(arguments:dict[str, Any]) -> str | bytes | ResourceResult
Read the resource content.
methodfastmcp_slim.fastmcp.resources.template.ResourceTemplate.set_default_mime_type(mime_type:str | None) -> str
Set default MIME type if not provided.
classfastmcp_slim.fastmcp.resources.types.BinaryResource
A resource that reads from bytes.
methodfastmcp_slim.fastmcp.resources.types.BinaryResource.read() -> ResourceResult
Read the binary content.
classfastmcp_slim.fastmcp.resources.types.DirectoryResource
A resource that lists files in a directory.
methodfastmcp_slim.fastmcp.resources.types.DirectoryResource.list_files() -> list[Path]
List files in the directory.
methodfastmcp_slim.fastmcp.resources.types.DirectoryResource.read() -> ResourceResult
Read the directory listing.
methodfastmcp_slim.fastmcp.resources.types.DirectoryResource.validate_absolute_path(path:Path) -> Path
Ensure path is absolute.
classfastmcp_slim.fastmcp.resources.types.FileResource
A resource that reads from a file.
methodfastmcp_slim.fastmcp.resources.types.FileResource.read() -> ResourceResult
Read the file content.
methodfastmcp_slim.fastmcp.resources.types.FileResource.validate_absolute_path(path:Path) -> Path
Ensure path is absolute.
classfastmcp_slim.fastmcp.resources.types.HttpResource
A resource that reads from an HTTP endpoint.
methodfastmcp_slim.fastmcp.resources.types.HttpResource.read() -> ResourceResult
Read the HTTP content.
classfastmcp_slim.fastmcp.resources.types.TextResource
A resource that reads from a string.
methodfastmcp_slim.fastmcp.resources.types.TextResource.read() -> ResourceResult
Read the text content.
classfastmcp_slim.fastmcp.server.auth.auth.AccessToken
AccessToken that includes all JWT claims.
classfastmcp_slim.fastmcp.server.auth.auth.AuthProvider
Base class for all FastMCP authentication providers.
methodfastmcp_slim.fastmcp.server.auth.auth.AuthProvider.get_routes(mcp_path:str | None=None) -> list[Route]
Get all routes for this authentication provider.
methodfastmcp_slim.fastmcp.server.auth.auth.AuthProvider.set_mcp_path(mcp_path:str | None) -> None
Set the MCP endpoint path and compute resource URL.
methodfastmcp_slim.fastmcp.server.auth.auth.AuthProvider.verify_token(token:str) -> AccessToken | None
Verify a bearer token and return access info if valid.
classfastmcp_slim.fastmcp.server.auth.auth.OAuthProvider
OAuth Authorization Server provider.
methodfastmcp_slim.fastmcp.server.auth.auth.OAuthProvider.verify_token(token:str) -> AccessToken | None
Verify a bearer token and return access info if valid.
classfastmcp_slim.fastmcp.server.auth.auth.TokenVerifier
Base class for token verifiers (Resource Servers).
methodfastmcp_slim.fastmcp.server.auth.auth.TokenVerifier.verify_token(token:str) -> AccessToken | None
Verify a bearer token and return access info if valid.
classfastmcp_slim.fastmcp.server.auth.cimd.CIMDClientManager
Manages all CIMD client operations for OAuth proxy.
methodfastmcp_slim.fastmcp.server.auth.cimd.CIMDClientManager.is_cimd_client_id(client_id:str) -> bool
Check if client_id is a CIMD URL.
classfastmcp_slim.fastmcp.server.auth.cimd.CIMDFetchError
Raised when CIMD document fetching fails.
classfastmcp_slim.fastmcp.server.auth.cimd.CIMDFetcher
Fetch and validate CIMD documents with SSRF protection.
methodfastmcp_slim.fastmcp.server.auth.cimd.CIMDFetcher.fetch(client_id_url:str) -> CIMDDocument
Fetch and validate a CIMD document with SSRF protection.
methodfastmcp_slim.fastmcp.server.auth.cimd.CIMDFetcher.is_cimd_client_id(client_id:str) -> bool
Check if a client_id looks like a CIMD URL.
classfastmcp_slim.fastmcp.server.auth.cimd.CIMDValidationError
Raised when CIMD document validation fails.
classfastmcp_slim.fastmcp.server.auth.identity_assertion.IdentityAssertionError
Raised when an ID-JAG fails validation.
funcfastmcp_slim.fastmcp.server.auth.identity_assertion.server_url_has_query(url:str) -> bool
Check if a URL has query parameters.
classfastmcp_slim.fastmcp.server.auth.oauth_proxy.models.JTIMapping
Maps FastMCP token JTI to upstream token ID.
classfastmcp_slim.fastmcp.server.auth.oauth_proxy.models.OAuthTransaction
OAuth transaction state for consent flow.
classfastmcp_slim.fastmcp.server.auth.oidc_proxy.OIDCConfiguration
OIDC Configuration.
classfastmcp_slim.fastmcp.server.auth.providers.auth0.Auth0JWTVerifier
JWT verifier for Auth0 MCP access tokens.
classfastmcp_slim.fastmcp.server.auth.providers.auth0.Auth0Provider
An Auth0 provider implementation for FastMCP.
classfastmcp_slim.fastmcp.server.auth.providers.aws.AWSCognitoProvider
Complete AWS Cognito OAuth provider for FastMCP.
classfastmcp_slim.fastmcp.server.auth.providers.aws.AWSCognitoTokenVerifier
Token verifier for Cognito access tokens.
methodfastmcp_slim.fastmcp.server.auth.providers.azure.AzureProvider.close_obo_credentials() -> None
Close all cached OBO credentials.
classfastmcp_slim.fastmcp.server.auth.providers.clerk.ClerkProvider
Complete Clerk OAuth provider for FastMCP.
classfastmcp_slim.fastmcp.server.auth.providers.clerk.ClerkTokenVerifier
Token verifier for Clerk OAuth tokens.
classfastmcp_slim.fastmcp.server.auth.providers.debug.DebugTokenVerifier
Token verifier with custom validation logic.
methodfastmcp_slim.fastmcp.server.auth.providers.debug.DebugTokenVerifier.verify_token(token:str) -> AccessToken | None
Verify token using custom validation logic.
classfastmcp_slim.fastmcp.server.auth.providers.discord.DiscordProvider
Complete Discord OAuth provider for FastMCP.
classfastmcp_slim.fastmcp.server.auth.providers.discord.DiscordTokenVerifier
Token verifier for Discord OAuth tokens.
classfastmcp_slim.fastmcp.server.auth.providers.github.GitHubProvider
Complete GitHub OAuth provider for FastMCP.
classfastmcp_slim.fastmcp.server.auth.providers.github.GitHubTokenVerifier
Token verifier for GitHub OAuth tokens.
methodfastmcp_slim.fastmcp.server.auth.providers.github.GitHubTokenVerifier.verify_token(token:str) -> AccessToken | None
Verify GitHub OAuth token by calling GitHub API.
classfastmcp_slim.fastmcp.server.auth.providers.google.GoogleProvider
Complete Google OAuth provider for FastMCP.
classfastmcp_slim.fastmcp.server.auth.providers.google.GoogleTokenVerifier
Token verifier for Google OAuth tokens.
classfastmcp_slim.fastmcp.server.auth.providers.jwt.JWKData
JSON Web Key data structure.
classfastmcp_slim.fastmcp.server.auth.providers.jwt.JWKSData
JSON Web Key Set data structure.
classfastmcp_slim.fastmcp.server.auth.providers.jwt.RSAKeyPair
RSA key pair for JWT testing.
methodfastmcp_slim.fastmcp.server.auth.providers.jwt.RSAKeyPair.generate() -> RSAKeyPair
Generate an RSA key pair for testing.
classfastmcp_slim.fastmcp.server.auth.providers.workos.WorkOSProvider
Complete WorkOS OAuth provider for FastMCP.
classfastmcp_slim.fastmcp.server.auth.providers.workos.WorkOSTokenVerifier
Token verifier for WorkOS OAuth tokens.
funcfastmcp_slim.fastmcp.server.auth.redirect_validation.is_loopback_host(host:str | None) -> bool
Check if a host is a loopback address.
classfastmcp_slim.fastmcp.server.auth.ssrf.SSRFError
Raised when an SSRF protection check fails.
classfastmcp_slim.fastmcp.server.auth.ssrf.SSRFFetchError
Raised when SSRF-safe fetch fails.
classfastmcp_slim.fastmcp.server.auth.ssrf.SSRFFetchResponse
Response payload from an SSRF-safe fetch.
funcfastmcp_slim.fastmcp.server.auth.ssrf.format_ip_for_url(ip_str:str) -> str
Format IP address for use in URL (bracket IPv6 addresses).
funcfastmcp_slim.fastmcp.server.auth.ssrf.resolve_hostname(hostname:str, port:int=443) -> list[str]
Resolve hostname to IP addresses using DNS.
funcfastmcp_slim.fastmcp.server.auth.ssrf.validate_url(url:str, require_path:bool=False) -> ValidatedURL
Validate URL for SSRF and resolve to IPs.
classfastmcp_slim.fastmcp.server.context.Context
Context object providing access to MCP capabilities.
methodfastmcp_slim.fastmcp.server.context.Context.client_id() -> str | None
Get the client ID if available.
methodfastmcp_slim.fastmcp.server.context.Context.debug(message:str, logger_name:str | None=None, extra:Mapping[str, Any] | None=None) -> None
Send a `DEBUG`-level message to the connected MCP Client.
methodfastmcp_slim.fastmcp.server.context.Context.delete_state(key:str) -> None
Delete a value from the state store.
methodfastmcp_slim.fastmcp.server.context.Context.error(message:str, logger_name:str | None=None, extra:Mapping[str, Any] | None=None) -> None
Send a `ERROR`-level message to the connected MCP Client.
methodfastmcp_slim.fastmcp.server.context.Context.fastmcp() -> FastMCP
Get the FastMCP instance.
methodfastmcp_slim.fastmcp.server.context.Context.get_prompt(name:str, arguments:dict[str, Any] | None=None) -> GetPromptResult
Get a prompt by name with optional arguments.
methodfastmcp_slim.fastmcp.server.context.Context.get_state(key:str) -> Any
Get a value from the state store.
methodfastmcp_slim.fastmcp.server.context.Context.info(message:str, logger_name:str | None=None, extra:Mapping[str, Any] | None=None) -> None
Send a `INFO`-level message to the connected MCP Client.
methodfastmcp_slim.fastmcp.server.context.Context.lifespan_context() -> dict[str, Any]
Access the server's lifespan context.
methodfastmcp_slim.fastmcp.server.context.Context.list_prompts() -> list[SDKPrompt]
List all available prompts from the server.
methodfastmcp_slim.fastmcp.server.context.Context.list_resources() -> list[SDKResource]
List all available resources from the server.
methodfastmcp_slim.fastmcp.server.context.Context.log(message:str, level:LoggingLevel | None=None, logger_name:str | None=None, extra:Mapping[str, Any] | None=None) -> None
Send a log message to the client.
methodfastmcp_slim.fastmcp.server.context.Context.read_resource(uri:str | AnyUrl) -> ResourceResult
Read a resource by URI.
methodfastmcp_slim.fastmcp.server.context.Context.report_progress(progress:float, total:float | None=None, message:str | None=None) -> None
Report progress for the current operation.
methodfastmcp_slim.fastmcp.server.context.Context.request_context() -> FastMCPRequestContext | None
Access to the underlying request context.
methodfastmcp_slim.fastmcp.server.context.Context.request_id() -> str
Get the unique ID for this request.
methodfastmcp_slim.fastmcp.server.context.Context.reset_visibility() -> None
Clear all session visibility rules.
methodfastmcp_slim.fastmcp.server.context.Context.send_notification(notification:mcp_types.ServerNotification) -> None
Send a notification to the client immediately.
methodfastmcp_slim.fastmcp.server.context.Context.session_id() -> str
Get the MCP session ID for ALL transports.
methodfastmcp_slim.fastmcp.server.context.Context.set_state(key:str, value:Any, *serializable:bool=True) -> None
Set a value in the state store.
methodfastmcp_slim.fastmcp.server.context.Context.transport() -> TransportType | None
Get the current transport type.
methodfastmcp_slim.fastmcp.server.context.Context.warning(message:str, logger_name:str | None=None, extra:Mapping[str, Any] | None=None) -> None
Send a `WARNING`-level message to the connected MCP Client.
classfastmcp_slim.fastmcp.server.context.LogData
Data object for passing log arguments to client-side handlers.
funcfastmcp_slim.fastmcp.server.context.reset_transport(token:Token[TransportType | None]) -> None
Reset transport to previous value.
funcfastmcp_slim.fastmcp.server.context.set_transport(transport:TransportType) -> Token[TransportType | None]
Set the current transport type.
funcfastmcp_slim.fastmcp.server.dependencies.CurrentContext() -> Context
Get the current FastMCP Context instance.
funcfastmcp_slim.fastmcp.server.dependencies.CurrentFastMCP() -> FastMCP
Get the current FastMCP server instance.
funcfastmcp_slim.fastmcp.server.dependencies.CurrentHeaders() -> dict[str, str]
Get the current HTTP request headers.
funcfastmcp_slim.fastmcp.server.dependencies.CurrentRequest() -> Request
Get the current HTTP request.
methodfastmcp_slim.fastmcp.server.dependencies.Progress.current() -> int | None
Current progress value.
methodfastmcp_slim.fastmcp.server.dependencies.Progress.increment(amount:int=1) -> None
Atomically increment the current progress value.
methodfastmcp_slim.fastmcp.server.dependencies.Progress.message() -> str | None
Current progress message.
methodfastmcp_slim.fastmcp.server.dependencies.Progress.set_message(message:str | None) -> None
Update the progress status message.
methodfastmcp_slim.fastmcp.server.dependencies.Progress.set_total(total:int) -> None
Set the total/target value for progress tracking.
methodfastmcp_slim.fastmcp.server.dependencies.Progress.total() -> int
Total/target progress value.
classfastmcp_slim.fastmcp.server.dependencies.ProgressLike
Protocol for progress tracking interface.
methodfastmcp_slim.fastmcp.server.dependencies.ProgressLike.current() -> int | None
Current progress value.
methodfastmcp_slim.fastmcp.server.dependencies.ProgressLike.increment(amount:int=1) -> None
Atomically increment the current progress value.
methodfastmcp_slim.fastmcp.server.dependencies.ProgressLike.message() -> str | None
Current progress message.
methodfastmcp_slim.fastmcp.server.dependencies.ProgressLike.set_message(message:str | None) -> None
Update the progress status message.
methodfastmcp_slim.fastmcp.server.dependencies.ProgressLike.set_total(total:int) -> None
Set the total/target value for progress tracking.
methodfastmcp_slim.fastmcp.server.dependencies.ProgressLike.total() -> int
Total/target progress value.
funcfastmcp_slim.fastmcp.server.dependencies.TokenClaim(name:str) -> str
Get a specific claim from the access token.
funcfastmcp_slim.fastmcp.server.dependencies.get_context() -> Context
Get the current FastMCP Context instance directly.
funcfastmcp_slim.fastmcp.server.dependencies.get_http_request() -> Request
Get the current HTTP request.
funcfastmcp_slim.fastmcp.server.dependencies.get_server() -> FastMCP
Get the current FastMCP server instance directly.
funcfastmcp_slim.fastmcp.server.dependencies.get_session(session_id:str) -> Session
Resolve and validate a `Session` for an explicit `session_id`.
classfastmcp_slim.fastmcp.server.elicitation.AcceptedElicitation
Result when user accepts the elicitation.
classfastmcp_slim.fastmcp.server.elicitation.ElicitConfig
Configuration for an elicitation request.
funcfastmcp_slim.fastmcp.server.elicitation.get_elicitation_schema(response_type:type[T]) -> dict[str, Any]
Get the schema for an elicitation response.
funcfastmcp_slim.fastmcp.server.elicitation.handle_elicit_accept(config:ElicitConfig, content:Any) -> AcceptedElicitation[Any]
Handle an accepted elicitation response.
classfastmcp_slim.fastmcp.server.event_store.EventEntry
Stored event entry.
classfastmcp_slim.fastmcp.server.event_store.EventStore
EventStore implementation backed by AsyncKeyValue.
methodfastmcp_slim.fastmcp.server.event_store.EventStore.store_event(stream_id:StreamId, message:JSONRPCMessage | None) -> EventId
Store an event and return its ID.
classfastmcp_slim.fastmcp.server.event_store.StreamEventList
List of event IDs for a stream.
classfastmcp_slim.fastmcp.server.extensions.MethodBinding
A new request method an extension serves, e.g.
classfastmcp_slim.fastmcp.server.lifespan.ComposedLifespan
Two lifespans composed together.
classfastmcp_slim.fastmcp.server.lifespan.Lifespan
Composable lifespan wrapper.
funcfastmcp_slim.fastmcp.server.lifespan.lifespan(fn:LifespanFn) -> Lifespan
Decorator to create a composable lifespan.
classfastmcp_slim.fastmcp.server.middleware.caching.CacheableMessage
A wrapper for Message that can be cached.
classfastmcp_slim.fastmcp.server.middleware.caching.CacheablePromptResult
A wrapper for PromptResult that can be cached.
classfastmcp_slim.fastmcp.server.middleware.caching.CacheableResourceResult
A wrapper for ResourceResult that can be cached.
classfastmcp_slim.fastmcp.server.middleware.caching.CallToolSettings
Configuration options for Tool-related caching.
classfastmcp_slim.fastmcp.server.middleware.caching.GetPromptSettings
Configuration options for Prompt-related caching.
classfastmcp_slim.fastmcp.server.middleware.caching.ListPromptsSettings
Configuration options for Prompt-related caching.
classfastmcp_slim.fastmcp.server.middleware.caching.ListToolsSettings
Configuration options for Tool-related caching.
classfastmcp_slim.fastmcp.server.middleware.caching.SharedMethodSettings
Shared config for a cache method.
classfastmcp_slim.fastmcp.server.middleware.logging.BaseLoggingMiddleware
Base class for logging middleware.
methodfastmcp_slim.fastmcp.server.middleware.logging.BaseLoggingMiddleware.on_message(context:MiddlewareContext[Any], call_next:CallNext[Any, Any]) -> Any
Log messages for configured methods.
classfastmcp_slim.fastmcp.server.middleware.middleware.Middleware
Base class for FastMCP middleware with dispatching hooks.
classfastmcp_slim.fastmcp.server.middleware.middleware.MiddlewareContext
Unified context for all middleware operations.
classfastmcp_slim.fastmcp.server.middleware.rate_limiting.RateLimitError
Error raised when rate limit is exceeded.
classfastmcp_slim.fastmcp.server.middleware.rate_limiting.SlidingWindowRateLimiter
Sliding window rate limiter implementation.
methodfastmcp_slim.fastmcp.server.middleware.rate_limiting.SlidingWindowRateLimiter.is_allowed() -> bool
Check if a request is allowed.
classfastmcp_slim.fastmcp.server.middleware.rate_limiting.TokenBucketRateLimiter
Token bucket implementation for rate limiting.
methodfastmcp_slim.fastmcp.server.middleware.rate_limiting.TokenBucketRateLimiter.consume(tokens:int=1) -> bool
Try to consume tokens from the bucket.
methodfastmcp_slim.fastmcp.server.middleware.timing.TimingMiddleware.on_request(context:MiddlewareContext, call_next:CallNext) -> Any
Time request execution and log the results.
classfastmcp_slim.fastmcp.server.mixins.lifespan.LifespanMixin
Mixin providing lifespan infrastructure for FastMCP.
methodfastmcp_slim.fastmcp.server.mixins.transport.TransportMixin.run(transport:Transport | None=None, show_banner:bool | None=None, **transport_kwargs:Any) -> None
Run the FastMCP server.
methodfastmcp_slim.fastmcp.server.mixins.transport.TransportMixin.run_async(transport:Transport | None=None, show_banner:bool | None=None, **transport_kwargs:Any) -> None
Run the FastMCP server asynchronously.
methodfastmcp_slim.fastmcp.server.mixins.transport.TransportMixin.run_stdio_async(show_banner:bool=True, log_level:str | None=None, stateless:bool=False) -> None
Run the server using stdio transport.
funcfastmcp_slim.fastmcp.server.providers.addressing.hash_tool(app_name:str, tool_name:str) -> str
Deterministic hex hash for a tool in an app.
funcfastmcp_slim.fastmcp.server.providers.addressing.hashed_resource_uri(app_name:str, tool_name:str) -> str
Per-tool Prefab renderer resource URI.
funcfastmcp_slim.fastmcp.server.providers.addressing.parse_hashed_resource_uri(uri:str) -> str | None
Extract the hash from a Prefab renderer URI, or None.
classfastmcp_slim.fastmcp.server.providers.base.Provider
Base class for dynamic component providers.
methodfastmcp_slim.fastmcp.server.providers.base.Provider.add_transform(transform:Transform) -> None
Add a transform to this provider.
methodfastmcp_slim.fastmcp.server.providers.base.Provider.list_prompts() -> Sequence[Prompt]
List prompts with all transforms applied.
methodfastmcp_slim.fastmcp.server.providers.base.Provider.list_resources() -> Sequence[Resource]
List resources with all transforms applied.
methodfastmcp_slim.fastmcp.server.providers.base.Provider.list_tools() -> Sequence[Tool]
List tools with all transforms applied.
classfastmcp_slim.fastmcp.server.providers.fastmcp_provider.FastMCPProvider
Provider that wraps a FastMCP server.
methodfastmcp_slim.fastmcp.server.providers.fastmcp_provider.FastMCPProvider.lifespan() -> AsyncIterator[None]
Start the mounted server's lifespan.
classfastmcp_slim.fastmcp.server.providers.filesystem_discovery.DiscoveryResult
Result of filesystem discovery.
funcfastmcp_slim.fastmcp.server.providers.filesystem_discovery.discover_files(root:Path) -> list[Path]
Recursively discover all Python files under a directory.
funcfastmcp_slim.fastmcp.server.providers.filesystem_discovery.extract_components(module:ModuleType) -> list[FastMCPComponent]
Extract all MCP components from a module.
funcfastmcp_slim.fastmcp.server.providers.filesystem_discovery.import_module_from_file(file_path:Path, provider_root:Path | None=None) -> ModuleType
Import a Python file as a module.
classfastmcp_slim.fastmcp.server.providers.local_provider.local_provider.LocalProvider
Provider for locally-defined components.
methodfastmcp_slim.fastmcp.server.providers.local_provider.local_provider.LocalProvider.remove_tool(name:str, version:str | None=None) -> None
Remove tool(s) from this provider's storage.
classfastmcp_slim.fastmcp.server.providers.openapi.components.OpenAPIResource
Resource implementation for OpenAPI endpoints.
classfastmcp_slim.fastmcp.server.providers.openapi.components.OpenAPITool
Tool implementation for OpenAPI endpoints.
methodfastmcp_slim.fastmcp.server.providers.openapi.components.OpenAPITool.run(arguments:dict[str, Any]) -> ToolResult
Execute the HTTP request using RequestDirector.
classfastmcp_slim.fastmcp.server.providers.openapi.routing.MCPType
Type of FastMCP component to create from a route.
methodfastmcp_slim.fastmcp.server.providers.proxy.ProxyResource.model_copy(**kwargs:Any) -> ProxyResource
Override to preserve _backend_uri when uri changes.
funcfastmcp_slim.fastmcp.server.providers.proxy.as_proxy_backend(c:Client) -> Client
Apply proxy connection settings to a copy we own.
classfastmcp_slim.fastmcp.server.providers.skills._common.SkillFileInfo
Information about a file within a skill.
classfastmcp_slim.fastmcp.server.providers.skills._common.SkillInfo
Parsed information about a skill.
funcfastmcp_slim.fastmcp.server.providers.skills._common.compute_file_hash(path:Path) -> str
Compute SHA256 hash of a file.
funcfastmcp_slim.fastmcp.server.providers.skills._common.parse_frontmatter(content:str) -> tuple[dict[str, Any], str]
Parse YAML frontmatter from markdown content.
funcfastmcp_slim.fastmcp.server.providers.skills._common.scan_skill_files(skill_dir:Path) -> list[SkillFileInfo]
Scan a skill directory for all files.
methodfastmcp_slim.fastmcp.server.providers.skills.skill_provider.SkillFileTemplate.read(arguments:dict[str, Any]) -> str | bytes | ResourceResult
Read a file from the skill directory.
classfastmcp_slim.fastmcp.server.providers.skills.vendor_providers.CursorSkillsProvider
Cursor skills from ~/.cursor/skills/.
classfastmcp_slim.fastmcp.server.providers.skills.vendor_providers.GeminiSkillsProvider
Gemini skills from ~/.gemini/skills/.
classfastmcp_slim.fastmcp.server.providers.skills.vendor_providers.GooseSkillsProvider
Goose skills from ~/.config/agents/skills/.
classfastmcp_slim.fastmcp.server.providers.skills.vendor_providers.VSCodeSkillsProvider
VS Code skills from ~/.copilot/skills/.
classfastmcp_slim.fastmcp.server.server.StateValue
Wrapper for stored context state values.
funcfastmcp_slim.fastmcp.server.server.default_lifespan(server:FastMCP[LifespanResultT]) -> AsyncIterator[Any]
Default lifespan context manager that does nothing.
methodfastmcp_slim.fastmcp.server.sessions.Session.delete(key:str) -> None
Remove `key` from this session, if present (preserves the marker).
methodfastmcp_slim.fastmcp.server.sessions.Session.get(key:str, default:Any=None) -> Any
Return the value for `key`, or `default` when it is not set.
methodfastmcp_slim.fastmcp.server.sessions.Session.set(key:str, value:Any) -> None
Store `value` under `key` in this session (read-modify-write).
classfastmcp_slim.fastmcp.server.sessions.SessionProvider
Provider contributing the session lifecycle tools.
classfastmcp_slim.fastmcp.server.sessions.UserSession
Annotation marker for the injected per-user session.
funcfastmcp_slim.fastmcp.server.sessions.create_session() -> str
Create a new session and return its identifier.
funcfastmcp_slim.fastmcp.server.sessions.end_session(session_id:SessionId) -> str
End a session and delete all of its state.
funcfastmcp_slim.fastmcp.server.sessions.session_storage_key(principal:str | None, session_id:str) -> str
The single storage key holding a session's state dict.
funcfastmcp_slim.fastmcp.server.telemetry.record_span_exception(span:Span, e:Exception) -> None
Record an exception and error status on a span.
classfastmcp_slim.fastmcp.server.transforms.GetPromptNext
Protocol for get_prompt call_next functions.
classfastmcp_slim.fastmcp.server.transforms.GetResourceNext
Protocol for get_resource call_next functions.
classfastmcp_slim.fastmcp.server.transforms.GetToolNext
Protocol for get_tool call_next functions.
classfastmcp_slim.fastmcp.server.transforms.Transform
Base class for component transformations.
methodfastmcp_slim.fastmcp.server.transforms.Transform.get_prompt(name:str, call_next:GetPromptNext, *version:VersionSpec | None=None) -> Prompt | None
Get a prompt by name.
methodfastmcp_slim.fastmcp.server.transforms.Transform.get_resource(uri:str, call_next:GetResourceNext, *version:VersionSpec | None=None) -> Resource | None
Get a resource by URI.
methodfastmcp_slim.fastmcp.server.transforms.Transform.get_resource_template(uri:str, call_next:GetResourceTemplateNext, *version:VersionSpec | None=None) -> ResourceTemplate | None
Get a resource template by URI.
methodfastmcp_slim.fastmcp.server.transforms.Transform.get_tool(name:str, call_next:GetToolNext, *version:VersionSpec | None=None) -> Tool | None
Get a tool by name.
methodfastmcp_slim.fastmcp.server.transforms.Transform.list_prompts(prompts:Sequence[Prompt]) -> Sequence[Prompt]
List prompts with transformation applied.
methodfastmcp_slim.fastmcp.server.transforms.Transform.list_resources(resources:Sequence[Resource]) -> Sequence[Resource]
List resources with transformation applied.
methodfastmcp_slim.fastmcp.server.transforms.Transform.list_tools(tools:Sequence[Tool]) -> Sequence[Tool]
List tools with transformation applied.
classfastmcp_slim.fastmcp.server.transforms.namespace.Namespace
Prefixes component names with a namespace.
methodfastmcp_slim.fastmcp.server.transforms.namespace.Namespace.get_prompt(name:str, call_next:GetPromptNext, *version:VersionSpec | None=None) -> Prompt | None
Get prompt by namespaced name.
methodfastmcp_slim.fastmcp.server.transforms.namespace.Namespace.get_resource(uri:str, call_next:GetResourceNext, *version:VersionSpec | None=None) -> Resource | None
Get resource by namespaced URI.
methodfastmcp_slim.fastmcp.server.transforms.namespace.Namespace.get_tool(name:str, call_next:GetToolNext, *version:VersionSpec | None=None) -> Tool | None
Get tool by namespaced name.
methodfastmcp_slim.fastmcp.server.transforms.namespace.Namespace.list_prompts(prompts:Sequence[Prompt]) -> Sequence[Prompt]
Prefix prompt names with namespace.
methodfastmcp_slim.fastmcp.server.transforms.namespace.Namespace.list_resources(resources:Sequence[Resource]) -> Sequence[Resource]
Add namespace path segment to resource URIs.
methodfastmcp_slim.fastmcp.server.transforms.namespace.Namespace.list_tools(tools:Sequence[Tool]) -> Sequence[Tool]
Prefix tool names with namespace.
funcfastmcp_slim.fastmcp.server.transforms.prompts_as_tools.PromptsAsTools.list_prompts() -> str
List all available prompts.
funcfastmcp_slim.fastmcp.server.transforms.resources_as_tools.ResourcesAsTools.read_resource(uri:Annotated[str, 'The URI of the resource to read']) -> str
Read a resource by its URI.
classfastmcp_slim.fastmcp.server.transforms.search.base.BaseSearchTransform
Replace the tool listing with a search interface.
classfastmcp_slim.fastmcp.server.transforms.search.regex.RegexSearchTransform
Search transform using regex pattern matching.
classfastmcp_slim.fastmcp.server.transforms.version_filter.VersionFilter
Filters components by version range.
classfastmcp_slim.fastmcp.server.transforms.visibility.Visibility
Sets visibility state on matching components.
methodfastmcp_slim.fastmcp.server.transforms.visibility.Visibility.get_prompt(name:str, call_next:GetPromptNext, *version:VersionSpec | None=None) -> Prompt | None
Mark prompt if found.
methodfastmcp_slim.fastmcp.server.transforms.visibility.Visibility.get_resource(uri:str, call_next:GetResourceNext, *version:VersionSpec | None=None) -> Resource | None
Mark resource if found.
methodfastmcp_slim.fastmcp.server.transforms.visibility.Visibility.get_resource_template(uri:str, call_next:GetResourceTemplateNext, *version:VersionSpec | None=None) -> ResourceTemplate | None
Mark resource template if found.
methodfastmcp_slim.fastmcp.server.transforms.visibility.Visibility.get_tool(name:str, call_next:GetToolNext, *version:VersionSpec | None=None) -> Tool | None
Mark tool if found.
methodfastmcp_slim.fastmcp.server.transforms.visibility.Visibility.list_prompts(prompts:Sequence[Prompt]) -> Sequence[Prompt]
Mark prompts by visibility state.
methodfastmcp_slim.fastmcp.server.transforms.visibility.Visibility.list_resources(resources:Sequence[Resource]) -> Sequence[Resource]
Mark resources by visibility state.
methodfastmcp_slim.fastmcp.server.transforms.visibility.Visibility.list_tools(tools:Sequence[Tool]) -> Sequence[Tool]
Mark tools by visibility state.
funcfastmcp_slim.fastmcp.server.transforms.visibility.create_visibility_transforms(rules:list[dict[str, Any]]) -> list[Visibility]
Convert rule dicts to Visibility transforms.
funcfastmcp_slim.fastmcp.server.transforms.visibility.get_visibility_rules(context:Context) -> list[dict[str, Any]]
Load visibility rule dicts from session state.
funcfastmcp_slim.fastmcp.server.transforms.visibility.is_enabled(component:FastMCPComponent) -> bool
Check if component is enabled.
funcfastmcp_slim.fastmcp.server.transforms.visibility.reset_visibility(context:Context) -> None
Clear all session visibility rules.
classfastmcp_slim.fastmcp.settings.Settings
FastMCP settings.
methodfastmcp_slim.fastmcp.settings.Settings.get_setting(attr:str) -> Any
Get a setting.
methodfastmcp_slim.fastmcp.settings.Settings.set_setting(attr:str, value:Any) -> None
Set a setting.
funcfastmcp_slim.fastmcp.telemetry.extract_trace_context(meta:dict[str, Any] | None) -> Context
Extract trace context from an MCP request meta dict.
funcfastmcp_slim.fastmcp.telemetry.get_tracer(version:str | None=None) -> Tracer
Get the FastMCP tracer for creating spans.
funcfastmcp_slim.fastmcp.telemetry.native_spans_enabled() -> bool
Whether FastMCP should create its own spans right now.
funcfastmcp_slim.fastmcp.telemetry.record_span_error(span:Span, exception:BaseException) -> None
Record an exception on a span and set error status.
funcfastmcp_slim.fastmcp.utilities.auth.decode_jwt_header(token:str) -> dict[str, Any]
Decode JWT header without signature verification.
funcfastmcp_slim.fastmcp.utilities.auth.decode_jwt_payload(token:str) -> dict[str, Any]
Decode JWT payload without signature verification.
funcfastmcp_slim.fastmcp.utilities.auth.parse_scopes(value:Any) -> list[str] | None
Parse scopes from environment variables or settings values.
classfastmcp_slim.fastmcp.utilities.authorization.AuthContext
Context passed to auth check callables.
funcfastmcp_slim.fastmcp.utilities.authorization.require_scopes(*scopes:str) -> AuthCheck
Require all of the given OAuth scopes.
funcfastmcp_slim.fastmcp.utilities.components.get_fastmcp_metadata(meta:dict[str, Any] | None) -> FastMCPMeta
Extract FastMCP metadata from a component's meta dict.
funcfastmcp_slim.fastmcp.utilities.http.find_available_port(host:str='127.0.0.1') -> int
Find an available port by letting the OS assign one.
classfastmcp_slim.fastmcp.utilities.inspect.FastMCPInfo
Information extracted from a FastMCP instance.
classfastmcp_slim.fastmcp.utilities.inspect.InspectFormat
Output format for inspect command.
classfastmcp_slim.fastmcp.utilities.inspect.PromptInfo
Information about a prompt.
classfastmcp_slim.fastmcp.utilities.inspect.ResourceInfo
Information about a resource.
classfastmcp_slim.fastmcp.utilities.inspect.TemplateInfo
Information about a resource template.
classfastmcp_slim.fastmcp.utilities.inspect.ToolInfo
Information about a tool.
funcfastmcp_slim.fastmcp.utilities.inspect.format_fastmcp_info(info:FastMCPInfo) -> bytes
Format FastMCPInfo as FastMCP-specific JSON.
funcfastmcp_slim.fastmcp.utilities.inspect.format_mcp_info(mcp:FastMCP[Any] | SDKServer) -> bytes
Format server info as standard MCP protocol JSON.
funcfastmcp_slim.fastmcp.utilities.inspect.inspect_fastmcp_v2(mcp:FastMCP[Any]) -> FastMCPInfo
Extract information from a FastMCP v2.x instance.
funcfastmcp_slim.fastmcp.utilities.logging.get_logger(name:str) -> logging.Logger
Get a logger nested under FastMCP namespace.
classfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.environments.base.Environment
Base class for environment configuration.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.environments.base.Environment.build_command(command:list[str]) -> list[str]
Build the full command with environment setup.
classfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.environments.uv.UVEnvironment
Configuration for Python environment setup.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.environments.uv.UVEnvironment.prepare(output_dir:Path | None=None) -> None
Prepare the Python environment using uv.
classfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.mcp_server_config.MCPServerConfig
Configuration for a FastMCP server.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.mcp_server_config.MCPServerConfig.from_file(file_path:Path) -> MCPServerConfig
Load configuration from a JSON file.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.mcp_server_config.MCPServerConfig.prepare(skip_source:bool=False, output_dir:Path | None=None) -> None
Prepare environment and source for execution.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.mcp_server_config.MCPServerConfig.prepare_environment(output_dir:Path | None=None) -> None
Prepare the Python environment.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.mcp_server_config.MCPServerConfig.prepare_source() -> None
Prepare the source for loading.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.mcp_server_config.MCPServerConfig.run_server(**kwargs:Any) -> None
Load and run the server with this configuration.
classfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.sources.base.Source
Abstract base class for all source types.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.sources.base.Source.load_server() -> Any
Load and return the FastMCP server instance.
classfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.sources.filesystem.FileSystemSource
Source for local Python files.
methodfastmcp_slim.fastmcp.utilities.mcp_server_config.v1.sources.filesystem.FileSystemSource.load_server() -> Any
Load server from filesystem.
funcfastmcp_slim.fastmcp.utilities.mime.resolve_ui_mime_type(uri:str, explicit_mime_type:str | None) -> str | None
Return the appropriate MIME type for a resource URI.
classfastmcp_slim.fastmcp.utilities.openapi.models.ResponseInfo
Represents response information in our IR.
funcfastmcp_slim.fastmcp.utilities.openapi.parser.OpenAPIParser.collect(schema_name:str) -> None
Collect a schema by name and recurse into its dependencies.
funcfastmcp_slim.fastmcp.utilities.openapi.parser.OpenAPIParser.find_refs(obj)
Recursively find all $ref references.
classfastmcp_slim.fastmcp.utilities.pagination.CursorState
Internal representation of pagination cursor state.
methodfastmcp_slim.fastmcp.utilities.pagination.CursorState.decode(cursor:str) -> CursorState
Decode cursor from an opaque string.
methodfastmcp_slim.fastmcp.utilities.pagination.CursorState.encode() -> str
Encode cursor state to an opaque string.
funcfastmcp_slim.fastmcp.utilities.pagination.paginate_sequence(items:Sequence[T], cursor:str | None, page_size:int) -> tuple[list[T], str | None]
Paginate a sequence of items.
funcfastmcp_slim.fastmcp.utilities.prefab.is_prefab_app(value:Any) -> bool
Return whether a value is a Prefab app.
funcfastmcp_slim.fastmcp.utilities.prefab.is_prefab_component(value:Any) -> bool
Return whether a value is a Prefab component.
funcfastmcp_slim.fastmcp.utilities.prefab.is_prefab_type(candidate:Any) -> bool
Return whether a type is a Prefab app or component type.
funcfastmcp_slim.fastmcp.utilities.prefab.prefab_app_from_component(component:Any) -> Any
Wrap a Prefab component in a Prefab app.
classfastmcp_slim.fastmcp.utilities.skills.SkillFile
Information about a file within a skill.
classfastmcp_slim.fastmcp.utilities.skills.SkillManifest
Full manifest of a skill including all files.
classfastmcp_slim.fastmcp.utilities.skills.SkillSummary
Summary information about a skill available on a server.

この情報について

掲載しているシグネチャは PrefectHQ/fastmcp の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る