[package]
name = "tower-mcp"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
authors = ["Josh Rotenberg <joshrotenberg@gmail.com>"]
license = "MIT OR Apache-2.0"
description = "Tower-native Model Context Protocol (MCP) implementation"
documentation = "https://docs.rs/tower-mcp"
homepage = "https://github.com/joshrotenberg/tower-mcp"
repository = "https://github.com/joshrotenberg/tower-mcp"
readme = "README.md"
keywords = ["mcp", "tower", "json-rpc", "ai", "llm"]
categories = ["network-programming", "asynchronous"]

[workspace]
members = ["examples/crates-mcp"]

[dependencies]
# Tower ecosystem
tower = { version = "0.5", features = ["util"] }
tower-service = "0.3"

# Async runtime
tokio = { version = "1", features = ["full"] }
futures = "0.3"
pin-project-lite = "0.2"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Schema generation
schemars = "1.2"

# Error handling
thiserror = "2"

# Async traits
async-trait = "0.1"

# Tracing
tracing = "0.1"

# URI template matching
regex = "1"
base64 = "0.22.1"

[dev-dependencies]
tokio-test = "0.4"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[features]
default = []
# Transport features
http = ["dep:axum", "dep:hyper", "dep:http", "dep:http-body-util", "dep:tokio-stream", "dep:uuid"]
websocket = ["dep:axum", "dep:tokio-tungstenite", "dep:uuid"]
childproc = []

[dependencies.axum]
version = "0.8"
optional = true
features = ["json", "ws"]

[dependencies.tokio-tungstenite]
version = "0.26"
optional = true

[dependencies.hyper]
version = "1"
optional = true

[dependencies.http]
version = "1"
optional = true

[dependencies.http-body-util]
version = "0.1"
optional = true

[dependencies.tokio-stream]
version = "0.1"
optional = true
features = ["sync"]

[dependencies.uuid]
version = "1"
optional = true
features = ["v4"]

[[example]]
name = "basic"
path = "examples/basic.rs"

[[example]]
name = "stdio_server"
path = "examples/stdio_server.rs"

[[example]]
name = "http_server"
path = "examples/http_server.rs"
required-features = ["http"]

[[example]]
name = "http_server_with_auth"
path = "examples/http_server_with_auth.rs"
required-features = ["http"]

[[example]]
name = "client_cli"
path = "examples/client_cli.rs"
