BookbagBookbag
Gateway · bookbag-gateway-sdk

OSS runtime gate. Drop-in for any MCP-speaking agent.

Transparent MCP proxy + OTLP collector. Sits between your agent and its MCP servers. Enforces policy locally. Streams telemetry to Bookbag. Offline-first, MIT licensed, Docker-ready.

What it does

MCP-native

Speaks the Model Context Protocol natively. Your agent's MCP client connects to the Gateway, not the upstream server.

Policy runtime

Local JSON-match rule engine. Sub-millisecond decisions. Pulls compiled policy bundles from Bookbag with ETag caching.

OTLP collector

Batch OpenTelemetry exporter. Every tool call becomes an AgentSpan + AgentToolCall in Bookbag's Observe product.

Offline-first

Last-known policy bundle stays on disk. Gate keeps enforcing when Bookbag is unreachable. Telemetry buffered locally.

Docker + npm

docker run bookbaghq/bookbag-gateway · npm install -g bookbag-gateway-sdk · CLI binary bookbag-gateway.

MIT licensed

Full source. PRs welcome. We want this to be the default MCP proxy the ecosystem uses.

Three ways to run it

Docker, CLI, or Kubernetes. Pick what fits your deploy story.

gateway-deploy.md
# 1. Pull a RuntimeKey from Bookbag dashboard.
# 2. Run the Gateway in front of your upstream MCP server.
docker run --rm \
  -e BOOKBAG_API_KEY=bk_key_... \
  -e UPSTREAM_MCP_URL=https://mcp.internal.example.com \
  -p 9595:9595 \
  bookbaghq/bookbag-gateway

# 3. Point your agent at the Gateway, not at the upstream.
#    Every tool call now gates through Bookbag.
#    Policy bundle is cached locally — offline-first.

Gateway FAQs

Frequently Asked Questions

Docker run, and every MCP tool call goes through the gate.

Join the teams shipping safer AI with real-time evaluation, audit trails, and continuous improvement.