Skip to main content

Module server

Module server 

Source
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§

CancellationToken
A cancellation token for tracking request cancellation.
CancelledFuture
A future that completes when cancellation is requested.
ComponentHealth
Health status of a single component.
Context
Request context passed to handler methods.
ContextData
Owned data for creating contexts.
HealthChecker
Health checker for MCP servers.
HealthReport
Detailed health check result.
LivenessResponse
Liveness probe response.
MethodStats
Statistics for a single MCP method.
MetricsSnapshot
A point-in-time snapshot of server metrics.
NoOpPeer
A no-op peer implementation for testing.
NotRegistered
Marker type indicating no handler is registered for a capability.
ReadinessResponse
Readiness probe response.
Registered
Marker type indicating a handler is registered for a capability.
RuntimeConfig
Server runtime configuration.
Server
A configured MCP server ready to serve requests.
ServerBuilder
Builder for constructing MCP servers with specific capabilities.
ServerMetrics
Server metrics collector.
ServerNotifier
A cloneable handle for sending server-initiated notifications from outside a request context.
ServerRuntime
Server runtime that handles the message loop.
ServerState
State for a running server.
TransportPeer
A peer implementation that sends notifications over a transport.

Enums§

AugmentedTaskOutcome
Outcome of begin_augmented_task — the adapter’s decision for a (potentially) task-augmented tools/call.
HealthStatus
Overall health status of the service.
LogLevel
Logging severity, ordered least → most severe (the syslog levels the MCP spec uses). Ord reflects severity, so level >= min filters messages.

Traits§

CompletionHandler
Handler for completion suggestions (completion/complete).
Peer
Trait for sending messages to the peer (client or server).
PromptHandler
Handler for prompt-related operations.
RequestRouter
Trait for routing requests to handlers.
ResourceHandler
Handler for resource-related operations.
ServerHandler
Core server handler trait - required for all MCP servers.
TaskHandler
Handler for task-related operations.
ToolHandler
Handler for tool-related operations.

Functions§

begin_augmented_task
Begin a task-augmented tools/call against a per-session task store.
call_tool_json
Run a tool and return its CallToolResult as JSON (the tasks/result payload 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/complete to a registered completion handler.
route_logging
Route logging/setLevel to the base handler’s set_log_level, but only when the server advertises the logging capability.
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§

FullServer
Type alias for a fully-configured server with all handlers.
MinimalServer
Type alias for a minimal server with no optional handlers.