ScopeGate
Allows managing Cloudflare zones, DNS records, Workers, Pages, and R2 storage.
Provides tools for interacting with GitHub repositories, issues, and a git credential helper for GitHub App installation tokens.
Enables sending and listing Gmail messages.
Integrates with Google Drive (list, search, read), Gmail (send, list), and Google Calendar (list, create).
Allows connecting to a Notion MCP server for accessing workspaces, pages, and databases.
Provides tools to list, deploy, redeploy, and manage Railway projects, logs, variables, and domains.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ScopeGaterequest a capability to list my GitHub repositories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ScopeGate
Ephemeral credentials & persistent MCP connections for coding agents — Claude Code, Kimi Code, Cursor, OpenCode.
The agent never holds credentials — it holds short-lived, minimum-scope capabilities. Secrets live in an AES-256-GCM encrypted local vault and are injected only at the outbound hop. A leaked context leaks nothing of durable value.
Agent/CLI ──(MCP, zero secrets)──► ScopeGate ──(creds injected)──► GitHub / AWS / your MCPs
│
vault + policy engine + token minter + signed auditCapability ≠ credential. What the agent gets expires in minutes and is scoped to one task; what the vault keeps never enters the model's context.
Quickstart (agent-executable, non-interactive)
npm i -g scopegate
scopegate initor via the installer:
curl -sSL https://scopegate.io/install.sh | shinit is idempotent and does everything:
creates
~/.scopegate/(encrypted vault, master key, default policies)detects harness configs (Claude Code, Kimi Code, Cursor, OpenCode,
.mcp.json)migrates existing MCPs behind the gateway, moving plaintext secrets (env vars, auth headers) into the encrypted vault and leaving only refs
rewrites the harness config so
scopegateis the single MCP entry point (backup kept as*.pre-scopegate.bak;scopegate rollbackrestores it)
Deposit secrets — human-only path, never through chat, never via argv:
scopegate secret add github_pat # hidden prompt
echo "$TOKEN" | scopegate secret add notion_token # or pipedThen restart the agent session (once — the harness launches the gateway on
startup). From there, the agent operates ScopeGate by itself through the
scopegate_* MCP tools (see SKILL.md). Later secret add
deposits hot-reload: the running gateway drops its connections and re-injects
fresh credentials on the next call — no restart, no context loss.
Related MCP server: Agentic Vault
CLI
Command | What it does |
| Idempotent setup: vault, policies, harness detection & secret migration |
| Run the gateway MCP server on stdio (launched by the harness) |
| Vault secrets. Value via hidden prompt or piped stdin — never argv |
| Config, vault ref names and upstream health |
| Verify seq continuity, hash chain and Ed25519 signatures (exit 1 on tamper) |
| What did an agent/token touch in a window (JSONL) |
| Rebuild the derived |
| OAuth device-code re-authorization (human, out-of-band) |
| Run the vault as an isolated process (unix socket / Windows named pipe) |
| Re-encrypt the vault with a fresh master key |
| Restore harness configs from |
| Human-side approval of escalated capability requests (TTY or |
| Human review of agent-proposed policy rules ( |
| Run the ScopeGate Cloud control plane (landing at |
| Enroll this gateway into a control plane (writes |
| Git credential-helper: |
| Materialize a vault secret into a legacy config file (approval by default, atomic 0600, sha256-only audit) |
| Plant a decoy credential ( |
Agent tools (MCP)
Exposed by scopegate start; the agent self-manages through them (21 tools).
Tool | Use when |
| Before privileged actions — returns a TTL grant, or |
| Batch: up to 20 capability requests in one call, per-item outcomes |
| Active grants and remaining TTL |
| Connect a new service (never accepts secret values, only |
| Any auth/connection error — self-repair with |
| A needed capability was denied — lands in |
| Which secretRef names exist (never values) |
| Collect / long-poll an approval-continuation outcome |
| Per-upstream liveness, oauth state and circuit-breaker state |
| Read-only policy preflight and session-start digest — plan before acting |
| Session memory from the signed audit; metadata-only event tail for host UIs |
| Long-task leases (double budget) and agent-driven grant renewal |
| Submit a whole task plan — ONE aggregated approval with the full blast radius |
| Page/search oversized results via handles (context window never flooded) |
| Attenuated sub-grants for subagents (scope ⊆ parent, dies with the parent) |
| Materialize a vault secret into a file (governed exception; approval by default) |
Library API (embed the gateway in-process)
import { createGatewayServer } from "scopegate";
const gw = await createGatewayServer({ agentId: "my-worker" });
// gw.server is the full agent-facing MCP server — connect any transport.
await gw.close();No subprocess, no daemons (opt-in), throws instead of process.exit. For
consumer integration tests, scopegate/testkit ships a fake upstream and
bootFakeGateway() wired to an MCP client over in-memory transport — no real
credentials needed. Experimental in v0.x; strict semver from v1.
Configuration
Two files in ~/.scopegate/ (both secret-free; secrets live only in the vault):
scopegate.yaml— upstream registry (example), transportsstdio/http/openapi(OpenAPI 3 spec → one governed tool per operation, no bridge needed)policies.yaml— policy engine rules (example):limits(max_ttl,denyglobs,rate_limit,approval_ttl),auto_approve,require: human_approval,redact: [pii],when:(argument guards — e.g. auto-approve only onkimi/*branches)
Auth types per upstream:
upstreams:
- name: notion
transport: { kind: http, url: "https://mcp.notion.com/mcp" }
auth: { type: bearer, secretRef: notion_token }
- name: github
transport: { kind: stdio, command: npx, args: ["-y", "@modelcontextprotocol/server-github"] }
auth:
type: env
env: { GITHUB_PERSONAL_ACCESS_TOKEN: github_pat }All auth types: bearer (header injection), env (env vars into spawned
stdio servers), composite (several sources fused into one stdio upstream:
static refs + provider mints — multi-service MCPs 100% minted), oauth2
(refresh daemon + device-code re-auth), jwt (gateway-minted HS256),
github_app (installation tokens minted from the App key), aws_sts (session
credentials via AssumeRole/GetSessionToken), huly (workspace token minted
via login + selectWorkspace against a Huly account service — URL discovery
through /config.json), google_sa (Google service account JWT → access
token), none. Minted credentials on stdio respawn proactively at 80% of
their TTL, and spawned children only inherit a secret-scrubbed env
(SCOPEGATE_ENV_PASSTHROUGH=1 restores legacy full-inherit).
See scopegate.example.yaml for commented examples of each.
Native connectors (bridges in src/upstreams/)
Ready-to-run MCP bridges; each runs as a stdio upstream and is also available
in the signed registry (scopegate_register_upstream {from_registry}):
Upstream | Tools | Auth |
| 16 tools: tracker (create/read/update/comment/search issues incl. comments, milestone/dueDate, assignee filter; projects), documents, chunter (post/edit messages, threads, thinking flag), contacts |
|
| 7 tools: list/status/deploy/redeploy/logs/variables(names only)/domains |
|
| 8 tools: zones, DNS list/create/update/delete, workers, pages, R2 |
|
| 7 tools: Drive list/search/read, Gmail send/list, Calendar list/create |
|
Plus: github-official in the registry (GitHub's own remote MCP with
github_app auth — ~1h installation tokens, no PAT), and the openapi
transport that turns any OpenAPI 3 spec into a governed upstream.
Their manifests ship signed in registry/;
docs/Implementacion/EPIC-13..18 has the design docs.
Environment variables:
Variable | Purpose |
| Base dir instead of |
|
|
| Upstream connect timeout (default 10000) |
|
|
| Override the vaultd IPC socket/pipe path |
|
|
| Agent identity for policy/audit (set per harness entry) |
| Lets |
|
|
|
|
| Override the telemetry collector URL |
| Bearer token — required in |
Production deployment (Railway)
The gateway also speaks Streamable HTTP: scopegate start --http --port <n> --host <h> (bearer SCOPEGATE_HTTP_TOKEN on every request except a public
GET /health). This repo deploys as-is to Railway:
railway.tomlpins the build (Nixpacks:npm run build) and the start command (seed-demoidempotente +start --http), with/healthas the healthcheck. A rootDockerfile(multi-stage, non-root) is kept for plain Docker builds outside Railway.Persistent state lives on a volume mounted at
/data(SCOPEGATE_HOME=/data): vault, identity, policies, config.With
SCOPEGATE_SEED_DEMO=1and an empty home, a clearly-marked demo seed provisions a fake upstream + fake secret so the deployment is self-contained (zero real credentials).Live proof:
SCOPEGATE_PROD_URL=<url> SCOPEGATE_HTTP_TOKEN=<token> node e2e-prod.mjsruns the production e2e (8 assertions: health, auth 401s, initialize, listTools, grant, authenticated proxied call, diagnose, deny path).
ScopeGate Cloud (management plane)
scopegate cloud serve runs the optional multi-tenant control plane —
metadata-only by design (no secret values ever cross it), and the gateway
keeps enforcing its local policy + last signed team policy when the cloud is
down (local-first). One process serves three things:
GET /— the public landing page (site/)GET /panel— the product panel (vanilla SPA, no build step): Overview (fleet health, security events), Fleet (revocation with explicit blast-radius confirmation, including team-wide), Approvals (the human queue: approve/deny from the browser and the gateway applies it in seconds via the approval-sync loop — no terminal needed), Capabilities (live grants with TTLs), Audit (query + signed JSONL export), Policy (signed, versioned, with line diff), Billing (active-agent metering), Settings (enroll snippets, Slack alerts)./v1/*— the management API: enroll, signed policy distribution, audit ingest (hash-chain + per-event Ed25519 verified,looksLikeSecretguard), revocation feed, approval decisions feed, billing usage, admin overview/queue/export endpoints.GET /healthis a public probe.
Gateway side: scopegate cloud enroll --cloud <url> --token <enrollToken>
links a gateway to a team; from there four background loops run — policy-sync
(signed, restrictive intersection), audit-export, revocation-sync and
approval-sync (all fail-soft: a dead cloud never blocks a tool call).
Access today: the panel authenticates with the control plane's admin token
(env ADMIN_TOKEN) — dev-grade by design; SSO with per-team roles
(owner/approver/viewer) plugs into the same API via the SsoAdapter
interface (src/cloud/server/sso.ts). Persistence: the FileStore (default)
or PostgresStore when SCOPEGATE_CLOUD_DATABASE_URL is set — both behind
the Store interface, with configurable audit retention
(SCOPEGATE_CLOUD_AUDIT_RETENTION_DAYS).
Verify the whole plane: node e2e-cloud.mjs (enroll → sync → central audit →
panel approval loop → fleet revocation → local-first) and node e2e-landing.mjs (static routing contract).
Security model (summary)
Secrets never enter the model's context (CLI/stdin only, encrypted at rest).
Capability ≠ credential: grants expire in minutes, scoped per task.
Write asymmetry: agents propose policy, humans approve (
policies.pending.yaml→ human review).looksLikeSecret()guard rejects raw secrets smuggled as refs by agents.Hard limits are fail-closed:
denyglobs andmax_ttlbeat any rule.Every action lands in
audit.jsonl— append-only, hash-chained, signed Ed25519; inputs are hashed, never stored. Verify withscopegate audit verify.
Full detail: docs-site/security-model.md.
Telemetry (opt-in, anonymous)
ScopeGate collects nothing by default. If you explicitly opt in
(SCOPEGATE_TELEMETRY=1 or {"enabled": true} in ~/.scopegate/telemetry.json),
it sends a minimal anonymous event on install, init completion and first tool
call: version, OS/arch, Node version, detected harness ids, a random anonymous
install id. Never agentId, paths, upstream names, tool args, inputs, or
anything derived from your config. Fail-silent by design — telemetry can never
break a run. Endpoint: https://telemetry.scopegate.dev/v1/event
(override with SCOPEGATE_TELEMETRY_ENDPOINT for self-hosting). The full
payload contract lives in src/telemetry/telemetry.ts.
Documentation
docs-site/quickstart.md — agent-executable quickstart
docs-site/security-model.md — enforcement model
docs-site/agent-protocol.md — the SKILL protocol
docs-site/cli-reference.md — every command
docs-site/configuration.md — config reference
SKILL.md — drop-in agent protocol (skills dir or
CLAUDE.md/AGENTS.md)
Contributing & license
See CONTRIBUTING.md for dev setup, tests and e2e.
Licensed under Apache-2.0 (LICENSE). Deliberate choice: the
gateway core is open and permissive because adoption by agents and enterprises
demands zero legal friction — the future commercial moat is the cloud
management plane, not the proxy. Dependency licenses (@modelcontextprotocol/sdk,
commander, picomatch, yaml, @aws-sdk/client-sts) are all permissive
(MIT/Apache-2.0) and compatible.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NexgenSystemsMX/scopegate'
If you have feedback or need assistance with the MCP directory API, please join our Discord server