[package]
license = "Apache-2.0"
name = "kigi-mcp"
version.workspace = true
edition.workspace = true
description = "MCP integration crate. Quarantines rmcp + reqwest 0.13 (rmcp 2.1 requires reqwest >= 0.13.2 while the rest of the workspace uses reqwest 0.12) and owns the MCP credential store and OAuth flow orchestrator."
authors = ["xAI"]

[dependencies]
rmcp = { version = "2.1", features = [
    "auth",
    "client",
    "transport-async-rw",
    "transport-streamable-http-client-reqwest",
    "reqwest",
] }
kigi-version = { workspace = true }
# reqwest 0.13 feature set for MCP transports. Notably:
# - `blocking` is for build-script style use (not actually used here today, but
#   kept for future MCP transports that may need it).
# - `query`/`form` opt-in features stay off; rmcp transports don't use them.
reqwest = { version = "0.13", default-features = false, features = [
    "blocking",
    "json",
    "rustls",
    "stream",
] }

# Deps for credentials.rs + oauth.rs.
async-trait = { workspace = true }
axum = { workspace = true }
oauth2 = { workspace = true }
parking_lot = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
webbrowser = { workspace = true }
kigi-config = { workspace = true }

# For mcp_http_client.rs (rmcp trait signatures). Must match rmcp 2.1's own
# versions or the trait types won't unify.
http = { workspace = true }
sse-stream = "0.2"

# Deps for servers.rs.
agent-client-protocol = { workspace = true }
kigi-file-utils = { path = "../kigi-file-utils" }
futures = { workspace = true }
regex = { workspace = true }
which = { workspace = true }
# Atomic descriptor writes (NamedTempFile + persist) in materialize_descriptors.
tempfile = { workspace = true }
kigi-tools = { workspace = true }
kigi-log = { workspace = true }
kigi-workspace-types = { workspace = true }
kigi-tool-protocol = { workspace = true }
kigi-tool-runtime = { workspace = true }
kigi-tool-types = { workspace = true }

[target.'cfg(unix)'.dependencies]
libc = { workspace = true }

[dev-dependencies]
# Used in servers.rs test `test_same_raw_name_different_servers_no_local_registry_collision`
# to verify MCP tools register into a `LocalRegistry` without collision.
# `test-util` enables `tokio::time::pause` / `advance`, required by
# the deterministic timing tests in `liveness.rs`.
tokio = { workspace = true, features = ["test-util"] }

[lints]
workspace = true
