[package] name = "jcp-gateway" description = "The energy-native MCP gateway: a JCP enforcement point in front of an MCP server. Every tools/call is gated by a capability grant, the upstream call is metered (on the upstream server's own process tree where the host's kernel counts per-process CPU energy, and otherwise machine-wide: a hardware reading where the host exposes a live energy counter, an estimate where it does not, each sealed as what it is), the metered joules are debited from the grant's budget, and the decision seals into a hash-chained receipt log. The chokepoint position the AI-gateway field occupies — denominated in joules, with a tamper-evident audit, not dollars and a span." version.workspace = true edition.workspace = true license.workspace = true repository.workspace = true [dependencies] jcp-schema = { workspace = true } jcp-grant = { workspace = true } jcp-runtime = { workspace = true } jcp-receipt = { path = "../jcp-receipt" } jcp-bridge = { path = "../jcp-bridge" } jcp-flow = { path = "../jcp-flow" } # A priced tool paid by an x402 `upto` authorization: the v2 wire and the # facilitator seam, network-free. op-rails-x402 = { path = "../../../../openpay/crates/op-rails-x402" } # The caller of a call over HTTP is the key that signed it (C35). jcp-httpsig = { path = "../jcp-httpsig" } # Serving as one node of a fleet (`--fleet`): records in a shared store, one # owner each (extensions/fleet.md). jcp-fleet = { path = "../jcp-fleet" } sandbox-meter = { path = "../../../../sandbox/sandbox-rs/crates/sandbox-meter" } # The meter's device classes: a hardware span with no CPU record is a reading # of part of the call, and is sealed as one. sandbox-schema = { path = "../../../../sandbox/sandbox-rs/crates/sandbox-schema" } ed25519-dalek = { workspace = true } serde_json = { workspace = true } # A presented chain's grants are unpadded base64url; a mirrored MCP header # value may be the Base64 sentinel form. base64 = "0.23" [dev-dependencies] # tests/upstream_tree.rs's oracle reads the upstream server's energy count # with proc_pid_rusage into a raw buffer, sharing no code with the meter. libc = "0.2" [[bin]] name = "jcp-gateway" path = "src/bin/jcp_gateway.rs" [lints] workspace = true