tower-mcp 0.25.0

Tower-native Model Context Protocol (MCP) implementation
Documentation
//! Task-oriented guides for building and operating tower-mcp applications.
//!
//! These guides complement the API reference and point to the authoritative
//! MCP specification for wire-protocol semantics:
//!
//! - [`client`]: transports, lifecycle, callbacks, requests, caching, retries,
//!   and shutdown.
//! - [`deployment`]: endpoint mounting, reverse proxies, origin and host
//!   policy, sessions, scaling, timeouts, health, and middleware order.
//! - [`protocol_versions`]: compile-time availability, runtime allowlists,
//!   lifecycle differences, interoperability, and upgrades.
//! - [`oauth`]: protected resource servers, interactive clients,
//!   service-to-service clients, persistence, and production policy.
//! - [`mcp_apps`]: typed MCP Apps resources, negotiation, fallback, CSP,
//!   permissions, and visibility.
//! - [`schema_validation`]: checking tool arguments against `inputSchema`
//!   and `structuredContent` against `outputSchema`, deriving output schemas,
//!   the error format, and opting out.
//! - [`local_runtime`]: serving tools, resources and prompts backed by
//!   `!Send` state, such as an embedded interpreter, through a channel to a
//!   task on a `LocalSet`, and reloading them as one set.
//! - [`tracing`]: sending and reading W3C trace context (SEP-414) and linking
//!   it to OpenTelemetry with `tracing-opentelemetry`.

// Each guide is gated on the features its examples use. The guides are
// doc-only, so this is invisible to callers, and it stops a default-features
// reader being shown a page of examples they cannot compile. docs.rs builds
// with all features, so every guide still renders there (#1275).
#[cfg(feature = "http-client")]
pub mod client;
#[cfg(feature = "http")]
pub mod deployment;
#[cfg(all(feature = "dynamic-tools", feature = "schema-validation"))]
pub mod local_runtime;
#[cfg(feature = "mcp-apps")]
pub mod mcp_apps;
#[cfg(feature = "oauth-client")]
pub mod oauth;
pub mod protocol_versions;
#[cfg(feature = "schema-validation")]
pub mod schema_validation;
pub mod tracing;