Scoped MCP Gateway
Connects to GitHub through a remote MCP adapter for repository tools, enabling approved operations such as listing issues, reading file contents, and creating issues under policy enforcement, credential isolation, and audit logging.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Scoped MCP Gateway
A policy enforcement gateway for agents that use repository tools. It checks delegated permissions before each call, keeps upstream credentials on the server, blocks external writes after private data exposure, and records authorization decisions in CockroachDB.

Features
JWT identity mapped to explicitly provisioned agent delegations.
Cedar policies that evaluate both agent permissions and owner entitlements.
Persistent private-data exposure tracking across calls and token refreshes.
Approved tool definitions pinned by their canonical SHA-256 hashes.
Durable operation records, encrypted results, and cached replay of completed operations.
Append-only audit events with a hash chain and an audit verifier.
An administration console with delegations, a policy editor and simulator, tool approvals, audit history, and an MCP workbench.
A local MCP fixture with synthetic repositories and an OIDC demonstration using Keycloak.
Structured logs, trace-context propagation, health endpoints, and Prometheus metrics.
Related MCP server: ToolBridge
Tech stack
Component | Technology |
Runtime | Node.js 22, TypeScript, Express |
Protocol | Model Context Protocol, official TypeScript SDK |
Authorization | Cedar WASM, JWT/JWKS, OAuth authorization code with PKCE |
Storage | CockroachDB, PostgreSQL wire protocol |
Encryption | AES-256-GCM, HMAC argument commitments |
Console | React, Vite |
Tests | Vitest, fast-check, Playwright |
Packaging | Docker, Docker Compose, GitHub Actions |
Run locally
Install Node.js 22.23.2 and Docker, or use the included script to install a local CockroachDB binary. npm 11.6.2 is recommended for dependency changes.
npm ci
npm run build
bash scripts/local-db.sh
npm run demoTo use Docker for the database, replace bash scripts/local-db.sh with:
docker compose up -d --wait dbOpen localhost:3000 and select Open demo workspace. The demo starts an MCP upstream with synthetic repository content, creates local signing keys, seeds three approved tools, and runs the gateway with a restricted database role. Local keys and database state are stored under the ignored .local/ directory.
In Workbench, read issues from demo/public, read a file from demo/private with get_file_contents, then try create_issue against demo/public. The gateway denies the write after the private read. Audit trail displays the decisions and provides a hash-chain check.
Ctrl-C stops the gateway and fixture. A database started by the demo stops with it; a separately started database stays running. State persists between runs.
Development
Keep the demo running, then start the console development server:
npm run console:devOpen localhost:5173. Vite proxies API and MCP requests to the local gateway.
npm run check # types, lint, unit/property tests, production builds
npm run format:check # formattingRun database integration tests against a dedicated test database:
.local/bin/cockroach sql --insecure --host=127.0.0.1:26267 \
--execute='CREATE DATABASE IF NOT EXISTS gateway_test;'
TEST_DATABASE_URL='postgresql://root@127.0.0.1:26267/gateway_test?sslmode=disable' \
npm run test:integrationWith the demo running and Google Chrome installed:
npm run test:browserAdditional scripts exercise attack sequences against the synthetic fixture and compare direct fixture calls with the complete gateway path:
npm run redteam
npm run benchReports are written to .local/reports/. For the Keycloak login demo and its browser tests, follow the runbook.
Architecture
flowchart LR
Client[MCP client] --> Auth[JWT identity + delegation]
Auth --> Policy[Cedar agent AND owner]
Policy --> Admission[Atomic admission + data labels + audit]
Admission --> Upstream[Approved MCP upstream]
Admission <--> DB[(CockroachDB)]
Upstream --> Completion[Encrypted result + completion audit]
Completion --> DB
Completion --> Client
Console[Admin console / OIDC PKCE] --> PolicyThe gateway commits operation intent and audit records before dispatching an upstream call. Completion stores the encrypted result and its audit event together. A repeated operation ID with matching inputs replays a completed result. Recovery records expired operations as unknown for operator inspection.
Supported tools are list_issues, get_file_contents, and create_issue, namespaced by connector. Connectors use the local fixture or the GitHub remote MCP adapter. Operators provision identity bindings, credentials, and policies, then approve tool definitions in the console.
Configuration and operations
.env.example lists the runtime configuration. The demo supplies local defaults and generates its keys automatically. For a configured deployment, provide JWT issuer/JWKS settings, the resource URL, restricted database credentials, and independent encryption and HMAC keys.
The container runs as a non-root user. Production startup enforces HTTPS identity/resource URLs, verified database TLS, restricted runtime permissions, and externally supplied keys. The runbook covers provisioning, database grants, identity setup, recovery, retention, and deployment configuration.
Documentation
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Every AI tool call runs as the person who asked, under your rules, fully audited.
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables controlled AI-agent access to enterprise-shaped tools with a deny-by-default gated write path, human approval, dry-run execution, and append-only audit logging.1-
- AlicenseNot gradedqualityBmaintenanceEnables autonomous AI agents to securely access and execute external tools, such as GitHub REST API operations, with per-user authentication, authorization, audit logging, and observability.MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to access third-party APIs through a least-privilege set of audited tools with allowlists, per-caller scopes, label gates, write confirmation, limits, and PII-masked logging. It restricts reads to labeled data, prevents sending or destructive actions, and records every allowed or denied call.MIT
- AlicenseAqualityBmaintenanceEnables agents to score, inspect, and gate tool calls before they execute, resolving shell commands the way a shell would in order to block destructive actions and detect multi-step attack sequences. It also redacts credentials and PII in either direction, requires signed single-use approval tokens for high-impact actions, and keeps a tamper-evident audit trail.611 npmApache 2.0