
Mcp Gateway
io.github.authzxPublished by GitHub account authzxv1.0.1Updated Oct 24, 2026
AuthzX MCP Gateway — policy-enforcing proxy between AI agents and MCP servers
Overview
A policy-enforcing gateway that sits between an AI agent and other MCP servers, authorizing each tool call before it is forwarded.
- What you can do
- Proxy downstream MCP servers configured in a gateway config file and expose their tools to the client through the gateway instead of directly. Intercept every tool call and check it against an authorization policy before forwarding, in local mode against a local agent and .rego policy file or in cloud mode against a cloud API. Log each invocation as structured JSON with subject, tool name, arguments and decision. Serve callers over stdio for a single desktop agent or over HTTP with per-caller bearer tokens and subjects. List downstream tools and generate a starter policy file from the command line.
- When to use it
- Use it when an assistant is connected to MCP servers whose tools can read databases, delete files or run SQL, and you want every call checked against a policy and audited before it executes. Also useful for sharing one governed gateway across several agents with distinct identities.
- Requirements
- Runs locally as an npm package over stdio, or over HTTP when enabled. Needs a gateway config file naming the downstream servers to spawn and a subject identity. Local mode needs the Vengtoo Agent installed and a .rego policy file; cloud mode needs a cloud URL and an API key, which can be supplied by environment variable. HTTP mode needs caller tokens for non-loopback binding.
Installation
In SourceWeft
- Open Mcp Gateway in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Vengtoo MCP Gateway
Authorization gateway for AI agents and MCP tool calls.
Open-source. Drop-in. Works with any MCP client.
Why
AI agents connected to MCP servers can call any tool they have access to: read your database, delete files, execute arbitrary SQL. Vengtoo MCP Gateway puts a policy enforcement point between the agent and those tools, so every call is authorized before it executes.
What it does
- Sits between MCP clients (Claude Code, Cursor, VS Code, GitHub Copilot) and any MCP server
- Intercepts every tool call and checks authorization before forwarding
- Two modes: cloud (Vengtoo Cloud API) and local (Vengtoo Agent + .rego policy file)
- Full audit trail of every tool invocation: subject, tool name, arguments, and decision are logged as structured JSON:
Quick Start
- Install and start the Vengtoo Agent. The agent runs locally and evaluates your authorization policy; no cloud account needed.
Create a policy.rego to define what your agent can do:
See demo/policies/ for more examples including Kubernetes namespace protection.
- Create a
gateway.config.json:
- Add to your MCP client (e.g. Claude Code):
Configuration
Config schema
* Provide either agentUrl (local mode) or cloudUrl (cloud mode).
Each entry in servers has:
Modes
Cloud mode
Connect to Vengtoo Cloud for managed policies:
Local mode
Run the Vengtoo Agent locally with a .rego policy file for offline, self-contained authorization:
Transport
The gateway exposes its (policy-enforced) tools to callers over one of two transports.
stdio (default)
Runs as a local subprocess speaking MCP over stdin/stdout: the right choice for a single desktop agent (Claude Desktop, Cursor, Claude Code). No network surface.
HTTP (remote)
Runs a Streamable HTTP MCP server at a URL, so a
remote agent (or many concurrent agents) can share one governed gateway. Enable it
with --http (or "transport": "http" in the config):
HTTP config (http.*):
Per-caller identity. Give each agent its own token and subject, and your policies (and audit trail) see each caller's real identity through one shared gateway:
Also settable via VENGTOO_GATEWAY_HTTP_CALLERS="<token>=agent:claude,<token>=agent:cursor".
Sessions are bound to the token that opened them: a different caller presenting another
caller's session id gets a 401, so identities cannot cross sessions. Tokens listed in
authTokens (or callers omitted entirely) run as the config's global subject.
Safety: the gateway refuses to bind a non-loopback interface with no caller auth
(callers or authTokens). Either configure tokens, or set
VENGTOO_GATEWAY_ALLOW_UNAUTHENTICATED=true to knowingly expose an open endpoint. An
unauthenticated GET /healthz liveness probe is always served.
⚠️ Security: Vengtoo trusts whichever subject this gateway asserts. The
callerstoken→subject mapping above (owned by this gateway's own config) is the correct pattern; it is NOT the same as trusting a client-supplied header. Never change this to derive the subject from a header/field a calling client sends; that would let any caller claim to be any subject and inherit its permissions within your tenant. If you front this gateway with another reverse proxy, make sure that proxy cannot be made to forward an arbitrary caller-chosen bearer token or subject.
CLI Flags
Environment overrides: VENGTOO_API_KEY, VENGTOO_AGENT_URL, VENGTOO_SUBJECT,
VENGTOO_GATEWAY_TRANSPORT (http), VENGTOO_GATEWAY_PORT / PORT, VENGTOO_GATEWAY_HOST,
VENGTOO_GATEWAY_PATH, VENGTOO_GATEWAY_HTTP_TOKENS (comma-separated), VENGTOO_GATEWAY_ALLOW_UNAUTHENTICATED.
MCP Client Setup
The gateway runs as a stdio MCP server. Point your MCP client at it instead of the downstream server directly.
Claude Code
Cursor
Add to .cursor/mcp.json:
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
VS Code / GitHub Copilot
Add to .vscode/mcp.json:
See demo/ for full end-to-end examples with sample policies.
Roadmap
See ROADMAP.md for what's planned: per-caller OAuth, downstream resilience, dynamic tool lists, metrics, remote downstream servers, and more.
Feedback
- GitHub Issues: Bug reports and feature requests
- Documentation: Guides and API reference
License
Apache-2.0, see LICENSE.
Source: README.md at commit 8eff947
Tools
0Version history
1- v1.0.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts