Expand description
Server module re-exports.
Re-exports all types from mcpkit_server.
Modules§
- adapter_
peer - Server→client request/response peer for the HTTP adapters (#153).
- builder
- Fluent server builder for MCP servers.
- capability
- Capability handlers for MCP servers.
- context
- Request context for MCP handlers.
- dispatch
- Object-safe dispatch layer.
- handler
- Composable handler traits for MCP servers.
- health
- Health check utilities for MCP servers.
- metrics
- Server-level metrics for MCP servers.
- prelude
- Prelude module for convenient imports.
- router
- Request routing for MCP servers.
- server
- Server runtime for MCP servers.
- state
- Typestate connection management for MCP servers.
- streams
- Per-session, per-stream SSE delivery (shared by the HTTP adapters).
Structs§
- Cancellation
Token - A cancellation token for tracking request cancellation.
- Cancelled
Future - A future that completes when cancellation is requested.
- Component
Health - Health status of a single component.
- Context
- Request context passed to handler methods.
- Context
Data - Owned data for creating contexts.
- Health
Checker - Health checker for MCP servers.
- Health
Report - Detailed health check result.
- Liveness
Response - Liveness probe response.
- Method
Stats - Statistics for a single MCP method.
- Metrics
Snapshot - A point-in-time snapshot of server metrics.
- NoOp
Peer - A no-op peer implementation for testing.
- NotRegistered
- Marker type indicating no handler is registered for a capability.
- Readiness
Response - Readiness probe response.
- Registered
- Marker type indicating a handler is registered for a capability.
- Runtime
Config - Server runtime configuration.
- Server
- A configured MCP server ready to serve requests.
- Server
Builder - Builder for constructing MCP servers with specific capabilities.
- Server
Metrics - Server metrics collector.
- Server
Notifier - A cloneable handle for sending server-initiated notifications from outside a request context.
- Server
Runtime - Server runtime that handles the message loop.
- Server
State - State for a running server.
- Transport
Peer - A peer implementation that sends notifications over a transport.
Enums§
- Augmented
Task Outcome - Outcome of
begin_augmented_task— the adapter’s decision for a (potentially) task-augmentedtools/call. - Health
Status - Overall health status of the service.
- LogLevel
- Logging severity, ordered least → most severe (the syslog levels the MCP
spec uses).
Ordreflects severity, solevel >= minfilters messages.
Traits§
- Completion
Handler - Handler for completion suggestions (
completion/complete). - Peer
- Trait for sending messages to the peer (client or server).
- Prompt
Handler - Handler for prompt-related operations.
- Request
Router - Trait for routing requests to handlers.
- Resource
Handler - Handler for resource-related operations.
- Server
Handler - Core server handler trait - required for all MCP servers.
- Task
Handler - Handler for task-related operations.
- Tool
Handler - Handler for tool-related operations.
Functions§
- begin_
augmented_ task - Begin a task-augmented
tools/callagainst a per-session taskstore. - call_
tool_ json - Run a tool and return its
CallToolResultas JSON (thetasks/resultpayload shape). Shared by the stdio runtime and the HTTP adapters. - dispatch_
notification_ hooks - Dispatch an inbound client notification to the server’s lifecycle hooks.
- route_
completion - Route
completion/completeto a registered completion handler. - route_
logging - Route
logging/setLevelto the base handler’sset_log_level, but only when the server advertises theloggingcapability. - route_
prompts - Route prompt-related requests to a handler implementing
PromptHandler. - route_
resources - Route resource-related requests to a handler implementing
ResourceHandler. - route_
tools - Route tool-related requests to a handler implementing
ToolHandler. - run_
augmented_ tool - Run a task-augmented tool to completion, writing the result (or failure) back
through the task-store
handle. - tool_
task_ support - The task-augmentation support a tool declares (
Tool.execution.taskSupport).
Type Aliases§
- Full
Server - Type alias for a fully-configured server with all handlers.
- Minimal
Server - Type alias for a minimal server with no optional handlers.