Skip to main content

Crate rmcp_server_kit

Crate rmcp_server_kit 

Source
Expand description

rmcp-server-kit - reusable MCP server framework.

Provides Streamable-HTTP transport with TLS/mTLS, health endpoints, structured observability (tracing + JSON logs + audit file), authentication (Bearer/mTLS/OAuth 2.1 JWT), RBAC, and rate limiting. Application crates depend on rmcp-server-kit and supply their own ServerHandler implementation.

Re-exports§

pub use crate::error::McpxError;
pub use crate::error::Result;

Modules§

admin
Admin diagnostic endpoints (status, auth keys metadata, counters, RBAC). Admin diagnostic endpoints.
auth
Authentication state (API keys, mTLS, OAuth JWT) and middleware. Authentication middleware for MCP servers.
bounded_limiter
Memory-bounded keyed rate limiter (LRU + idle eviction). Memory-bounded keyed rate limiter.
config
Reusable server and observability configuration primitives.
error
Generic error type and Result alias for server-side code.
metrics
Prometheus metrics registry shared across server components. Prometheus metrics for MCP servers.
mtls_revocation
CDP-driven CRL revocation support for mTLS. CDP-driven CRL revocation support for mTLS.
oauth
OAuth 2.1 JWKS cache, token validation, and token exchange helpers. OAuth 2.1 JWT bearer token validation with JWKS caching.
observability
Tracing / JSON logs / audit file initialization.
rbac
Role-based access control policy engine and middleware. Role-Based Access Control (RBAC) policy engine.
secret
Re-exports for the secrecy crate’s secret-wrapper types. Re-exports of secrecy types for handling sensitive values.
tool_hooks
Opt-in tool-call hooks (before/after) and result-size cap. Opt-in tool-call instrumentation for ServerHandler implementations.
transport
Streamable HTTP transport and server entry points.