contextvm-sdk 0.1.1

Rust SDK for the ContextVM protocol — MCP over Nostr
Documentation
[package]
name = "contextvm-sdk"
version = "0.1.1"
edition = "2021"
rust-version = "1.70"
description = "Rust SDK for the ContextVM protocol — MCP over Nostr"
license = "MIT"
readme = "README.md"
repository = "https://github.com/ContextVM/rs-sdk"
homepage = "https://contextvm.org"
documentation = "https://docs.rs/contextvm-sdk"
keywords = ["nostr", "mcp", "modelcontextprotocol", "decentralized", "ai"]
categories = ["network-programming", "api-bindings", "asynchronous"]

[dependencies]
# Async runtime
tokio = { version = "1", features = ["full"] }

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

# Error handling
thiserror = "2.0"
async-trait = "0.1"

# Nostr SDK with NIP-59 (Gift Wrap) support
nostr-sdk = { version = "0.43", features = ["nip59"] }

# Logging
tracing = "0.1"

# Optional MCP integration (Rust equivalent to TS @modelcontextprotocol/sdk)
rmcp = { version = "0.16.0", features = ["server", "client", "macros", "transport-worker"], optional = true }

# LRU cache for gift-wrap (outer event id) deduplication
lru = "0.12"

# CancellationToken for graceful event-loop shutdown
tokio-util = { version = "0.7", features = ["rt"] }

[features]
# Enable rmcp by default while keeping legacy APIs available.
default = ["rmcp"]
rmcp = ["dep:rmcp"]
## Exposes `MockRelayPool` for use in downstream integration tests.
test-utils = []

[[example]]
name = "rmcp_integration_test"
required-features = ["rmcp"]

[[example]]
name = "native_echo_server"
required-features = ["rmcp"]

[[example]]
name = "native_echo_client"
required-features = ["rmcp"]

[[test]]
name = "transport_integration"
required-features = ["test-utils"]

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