rmcp 0.12.0

Rust SDK for Model Context Protocol
Documentation
[dependencies.async-trait]
version = "0.1.89"

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

[dependencies.base64]
optional = true
version = "0.22"

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

[dependencies.futures]
version = "0.3"

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

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

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

[dependencies.oauth2]
optional = true
version = "5.0"

[dependencies.pastey]
optional = true
version = "0.2.0"

[dependencies.pin-project-lite]
version = "0.2"

[dependencies.process-wrap]
features = ["tokio1"]
optional = true
version = "9.0"

[dependencies.rand]
optional = true
version = "0.9"

[dependencies.reqwest]
default-features = false
features = ["json", "stream"]
optional = true
version = "0.12"

[dependencies.rmcp-macros]
optional = true
version = "0.12.0"

[dependencies.schemars]
features = ["chrono04"]
optional = true
version = "1.0"

[dependencies.serde]
features = ["derive", "rc"]
version = "1.0"

[dependencies.serde_json]
version = "1.0"

[dependencies.sse-stream]
optional = true
version = "0.2"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
features = ["sync", "macros", "rt", "time"]
version = "1"

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

[dependencies.tokio-util]
version = "0.7"

[dependencies.tower-service]
optional = true
version = "0.3"

[dependencies.tracing]
version = "0.1"

[dependencies.url]
optional = true
version = "2.4"

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

[dev-dependencies.anyhow]
version = "1.0"

[dev-dependencies.async-trait]
version = "0.1"

[dev-dependencies.schemars]
features = ["chrono04"]
version = "1.1.0"

[dev-dependencies.tokio]
features = ["full"]
version = "1"

[dev-dependencies.tracing-subscriber]
features = ["env-filter", "std", "fmt"]
version = "0.3"

[features]
__reqwest = ["dep:reqwest"]
auth = ["dep:oauth2", "__reqwest", "dep:url"]
client = ["dep:tokio-stream"]
client-side-sse = ["dep:sse-stream", "dep:http"]
default = ["base64", "macros", "server"]
elicitation = []
macros = ["dep:rmcp-macros", "dep:pastey"]
reqwest = ["__reqwest", "reqwest?/rustls-tls"]
reqwest-tls-no-provider = ["__reqwest", "reqwest?/rustls-tls-no-provider"]
schemars = ["dep:schemars"]
server = ["transport-async-rw", "dep:schemars"]
server-side-http = ["uuid", "dep:rand", "dep:tokio-stream", "dep:http", "dep:http-body", "dep:http-body-util", "dep:bytes", "dep:sse-stream", "tower"]
tower = ["dep:tower-service"]
transport-async-rw = ["tokio/io-util", "tokio-util/codec"]
transport-child-process = ["transport-async-rw", "tokio/process", "dep:process-wrap"]
transport-io = ["transport-async-rw", "tokio/io-std"]
transport-streamable-http-client = ["client-side-sse", "transport-worker"]
transport-streamable-http-client-reqwest = ["transport-streamable-http-client", "reqwest"]
transport-streamable-http-server = ["transport-streamable-http-server-session", "server-side-http", "transport-worker"]
transport-streamable-http-server-session = ["transport-async-rw", "dep:tokio-stream"]
transport-worker = ["dep:tokio-stream"]

[lib]
name = "rmcp"
path = "src/lib.rs"

[package]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
description = "Rust SDK for Model Context Protocol"
documentation = "https://docs.rs/rmcp"
edition = "2024"
homepage = "https://github.com/modelcontextprotocol/rust-sdk"
license = "MIT"
name = "rmcp"
readme = "README.md"
repository = "https://github.com/modelcontextprotocol/rust-sdk/"
resolver = "2"
version = "0.12.0"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies.chrono]
default-features = false
features = ["serde", "clock", "std", "oldtime"]
version = "0.4.38"

[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies.chrono]
features = ["serde"]
version = "0.4.38"

[[test]]
name = "test_completion"
path = "tests/test_completion.rs"

[[test]]
name = "test_complex_schema"
path = "tests/test_complex_schema.rs"

[[test]]
name = "test_custom_request"
path = "tests/test_custom_request.rs"

[[test]]
name = "test_deserialization"
path = "tests/test_deserialization.rs"

[[test]]
name = "test_elicitation"
path = "tests/test_elicitation.rs"
required-features = ["elicitation", "client", "server"]

[[test]]
name = "test_embedded_resource_meta"
path = "tests/test_embedded_resource_meta.rs"

[[test]]
name = "test_json_schema_detection"
path = "tests/test_json_schema_detection.rs"

[[test]]
name = "test_logging"
path = "tests/test_logging.rs"
required-features = ["server", "client"]

[[test]]
name = "test_message_protocol"
path = "tests/test_message_protocol.rs"
required-features = ["client"]

[[test]]
name = "test_message_schema"
path = "tests/test_message_schema.rs"
required-features = ["server", "client", "schemars"]

[[test]]
name = "test_notification"
path = "tests/test_notification.rs"
required-features = ["server", "client"]

[[test]]
name = "test_progress_subscriber"
path = "tests/test_progress_subscriber.rs"
required-features = ["server", "client", "macros"]

[[test]]
name = "test_prompt_handler"
path = "tests/test_prompt_handler.rs"

[[test]]
name = "test_prompt_macro_annotations"
path = "tests/test_prompt_macro_annotations.rs"

[[test]]
name = "test_prompt_macros"
path = "tests/test_prompt_macros.rs"

[[test]]
name = "test_prompt_routers"
path = "tests/test_prompt_routers.rs"

[[test]]
name = "test_resource_link"
path = "tests/test_resource_link.rs"

[[test]]
name = "test_resource_link_integration"
path = "tests/test_resource_link_integration.rs"

[[test]]
name = "test_sampling"
path = "tests/test_sampling.rs"

[[test]]
name = "test_structured_output"
path = "tests/test_structured_output.rs"

[[test]]
name = "test_tool_builder_methods"
path = "tests/test_tool_builder_methods.rs"

[[test]]
name = "test_tool_handler"
path = "tests/test_tool_handler.rs"

[[test]]
name = "test_tool_macro_annotations"
path = "tests/test_tool_macro_annotations.rs"

[[test]]
name = "test_tool_macros"
path = "tests/test_tool_macros.rs"
required-features = ["server", "client"]

[[test]]
name = "test_tool_result_meta"
path = "tests/test_tool_result_meta.rs"

[[test]]
name = "test_tool_routers"
path = "tests/test_tool_routers.rs"

[[test]]
name = "test_with_js"
path = "tests/test_with_js.rs"
required-features = ["server", "client", "transport-child-process", "transport-streamable-http-server", "transport-streamable-http-client", "__reqwest"]

[[test]]
name = "test_with_python"
path = "tests/test_with_python.rs"
required-features = ["reqwest", "server", "client", "transport-child-process"]