arbit 0.7.0

Security proxy for MCP (Model Context Protocol) — auth, rate limiting, payload filtering, and audit logging between AI agents and MCP servers
Documentation
transport:
  type: http
  addr: "0.0.0.0:4000"
  upstream: "http://localhost:3000/mcp"
  session_ttl_secs: 3600
  # tls:
  #   cert: "cert.pem"
  #   key:  "key.pem"

audit:
  type: sqlite
  path: "gateway-audit.db"

# Named upstreams — agents can reference these via `upstream:` in their policy.
# upstreams:
#   filesystem: "http://localhost:3001"
#   database:   "http://localhost:3002"

agents:
  cursor:
    allowed_tools:
      - echo
    rate_limit: 5

  claude-code:
    denied_tools:
      - delete_database
    rate_limit: 20

  # Pre-shared API key — for api_key auth tests
  secured-agent:
    allowed_tools:
      - echo
    rate_limit: 10
    api_key: "test-key-123"

  # Low rate limit — for global rate limit exhaustion test
  rate-test:
    allowed_tools:
      - echo
    rate_limit: 3

  # Per-tool cap — for tool_rate_limits test
  tool-rate-test:
    allowed_tools:
      - echo
    rate_limit: 10
    tool_rate_limits:
      echo: 2

  # Can call secret_dump — for response filtering test
  secret-dumper:
    allowed_tools:
      - secret_dump
    rate_limit: 10

  # Agent identity derived from JWT "sub" claim — for JWT auth test
  jwt-agent:
    allowed_tools:
      - echo
    rate_limit: 10

auth:
  secret: "test-jwt-secret"
  agent_claim: "sub"

rules:
  # ip_rate_limit: 100  # max tools/call per minute per IP (HTTP mode)
  block_patterns:
    - "password"
    - "api_key"
    - "secret"
    - "Bearer "
    - "private_key"