Module mcp

Module mcp 

Source
Expand description

Model Context Protocol types and services re-exported from gestura-core-mcp.

Modules§

client
MCP Client — connects to external MCP servers and invokes tools.
cmd_utils
config
MCP server configuration types.
discovery
MCP Tool Discovery and Registry
error
Error types (compatibility wrapper).
execution_mode
Execution-mode primitives used for tool categorization and permission checks.
integrator
MCP Integrator - Token management and tool exposure Provides McpIntegrator trait and LocalMcp implementation for tool exposure, dual authentication, and MDH translation.
lifecycle
MCP Lifecycle Management Handles initialize/initialized handshake, ping, and shutdown.
notifications
MCP Notifications - Progress, logging, and cancellation Provides notification handling for long-running operations.
prompts
MCP Prompts - Templated messages and workflows Provides prompt definitions for voice commands and common workflows.
provision
MCP server provisioning — runtime availability checks and package pre-installation.
registry
MCP Registry integration — popular server discovery.
server
MCP JSON-RPC server (transport-agnostic)
tool_inspection
Tool inspection primitives used for MCP discovery metadata.
types
MCP Protocol Types (Version 2025-11-25) Defines all types for MCP protocol compliance including capabilities, lifecycle messages, prompts, and notifications.

Structs§

CachedTool
Cached tool information from an MCP server
CancelledNotification
Cancelled notification params
ClientCapabilities
Client capabilities received during initialization
ClientInfo
Client information received during initialization
EmbeddedResource
Embedded resource content
InitializeParams
Initialize request parameters
InitializeResult
Initialize response result
JsonRpcError
JSON-RPC error payload.
JsonRpcRequest
JSON-RPC request structure.
JsonRpcResponse
JSON-RPC response structure.
LocalMcp
MCP integrator with token storage and validation
LoggingCapability
Logging capability configuration
LoggingMessage
Logging message notification params
McpCacheStats
Cache statistics
McpClient
An active connection to a single MCP server.
McpClientRegistry
Global registry of active MCP client connections, keyed by server name.
McpDiscoveryManager
MCP Tool Discovery Manager
McpJsonFile
Represents an .mcp.json configuration file.
McpLogger
Logger for MCP logging notifications
McpRequestContext
Context passed into tool/resource handlers.
McpServer
Transport-agnostic MCP JSON-RPC server.
McpServerConfig
Configuration for MCP server connection
McpServerEntry
Full MCP server entry compatible with .mcp.json.
McpServerInfo
Information about a connected MCP server
McpTool
MCP tool entry (basic) — DEPRECATED: use McpServerEntry instead.
MdhResource
Result of local MDH translation suitable for MCP usage
OperationProgress
Progress state for an operation
PingParams
Ping request (empty params)
PingResult
Ping response (empty result)
PopularMcpServer
A recommended MCP server entry sourced from the official MCP Registry.
ProgressNotification
Progress notification params
ProgressTracker
Progress tracker for long-running operations
Prompt
Prompt definition
PromptArgument
Prompt argument definition
PromptMessage
Prompt message content
PromptRegistry
Prompt registry for managing available prompts
PromptsCapability
Prompts capability configuration
PromptsGetParams
prompts/get request params
PromptsGetResult
prompts/get response
PromptsListParams
prompts/list request params
PromptsListResult
prompts/list response
ProvisionResult
Result returned to the frontend after a provisioning attempt.
RegisteredPrompt
A registered prompt with its handler
RegistryBrowseEntry
One entry in a paginated registry browse result.
RegistryBrowsePage
Paginated response returned by browse_mcp_registry.
Resource
Resource definition per MCP spec
ResourceAnnotations
Resource annotations
ResourceContent
Resource content
ResourceReference
Resource reference
ResourcesCapability
Resources capability configuration
ResourcesListParams
resources/list request params
ResourcesListResult
resources/list response
ResourcesReadParams
resources/read request params
ResourcesReadResult
resources/read response
ServerCapabilities
Server capabilities advertised during initialization
ServerInfo
Server information sent during initialization
SessionManager
Session manager for MCP lifecycle
TextContent
Text content
TokenInfo
Token information with expiration and permissions
Tool
Tool definition per MCP spec
ToolAnnotations
Tool annotations for behavior hints
ToolsCallParams
tools/call request params
ToolsCallResult
tools/call response
ToolsCapability
Tools capability configuration
ToolsListParams
tools/list request params
ToolsListResult
tools/list response

Enums§

LogLevel
Log level for logging notifications
McpNotification
MCP notification types
McpScope
Configuration scope for MCP servers.
McpTransportType
Transport type for MCP server connections.
ProgressToken
Progress token (string or integer)
PromptContent
Prompt content (text or embedded resource)
PromptRole
Prompt role
ProvisionStatus
Outcome of a provisioning attempt.
ServerState
MCP server connection state
SessionState
MCP session state
ToolResultContent
Tool result content

Constants§

PROTOCOL_VERSION
MCP Protocol version

Traits§

McpIntegrator
Unifies MCP operations with dual authentication
McpResourceHandler
Handler for an MCP resource.
McpToolHandler
Handler for an MCP tool.

Functions§

browse_mcp_registry
Fetch a single page from the MCP Registry with optional full-text search.
create_notification_channel
Create a notification channel
create_session_manager
Create a shared session manager
get_mcp
Get the global MCP instance
get_mcp_client_registry
Get the global MCP client registry.
import_claude_desktop_servers
Import MCP servers from Claude Desktop config.
list_popular_mcp_servers
Return up to limit popular, open-source MCP servers that can be added without additional configuration.
mdh_translate
Local-only MDH translate: read JSON file, validate minimal JSON-LD shape, and create URI NOTE: In production we will use json-ld-rs to expand/compact; here we simulate locally
normalize_mcp_server_name
Convert an arbitrary registry name into a safe, stable tool identifier.
provision_mcp_server
Check runtime availability and pre-install/fetch the package for entry.

Type Aliases§

NotificationReceiver
Notification receiver for MCP notifications
NotificationSender
Notification sender for MCP notifications