MCP Policy Gateway
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., "@MCP Policy GatewayApprove the pending billing refund request"
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.
MCP Policy Gateway
A zero-trust policy enforcement gateway that sits between AI agents/MCP clients and real MCP servers.
MCP Client / AI Agent
↓
Identity + Rate Limit + Policy + Approval + Egress Guard
↓
MCP Policy Gateway
↓
Schema Pin + Circuit Breaker + Audit
↓
one or many MCP upstream serversWhy it exists
MCP makes tool access easy; production systems also need to answer who may call a tool, with which arguments, how often, to which destinations, and when a human must approve the action. MCP Policy Gateway keeps those controls outside the agent prompt and applies them before the upstream tool executes.
Tools are namespaced at the gateway boundary to prevent collisions:
local__filesystem_read
crm__customer_lookup
billing__refund_paymentRelated MCP server: nice
v0.3 — zero-trust controls
real MCP stdio and Streamable HTTP gateway from v0.2
per-agent identity (
agent_id, tenant, roles)identity/role-aware policy rules
argument-level
argument_equalspolicy conditionsshort-lived HMAC approval tokens bound to agent + tool + exact arguments
approval resume without weakening the original rule
per-agent/per-tool sliding-window rate limits
outbound URL/domain allowlists
prompt-injection signal detection before high-risk tool execution
secret/email redaction helpers for logs and operator surfaces
upstream circuit breakers and request timeouts
schema pinning and drift enforcement
structured JSONL audit
tests and CI
Policy example
{
"default": "deny",
"rules": [
{
"id": "finance-refund-usd",
"tool": "billing__refund*",
"effect": "approval",
"risk": "high",
"roles_any": ["finance"],
"argument_equals": {"currency": "USD"}
},
{
"id": "block-delete",
"tool": "billing__delete*",
"effect": "deny",
"risk": "critical"
}
]
}Signed approval flow
identity = AgentIdentity("agent-42", tenant="acme", roles=("finance",))
args = {"invoice_id": "INV-7", "amount": 50, "currency": "USD"}
first = await service.call_tool("billing__refund", args, identity=identity)
# -> approval_required
token = signer.issue(tool="billing__refund", arguments=args, identity=identity)
result = await service.call_tool(
"billing__refund",
args,
identity=identity,
approval_token=token,
)Changing the amount, tool, agent or tenant invalidates the token.
Install
pip install -e .The gateway targets the stable MCP Python SDK v2 line (mcp>=2.1,<3).
Run over stdio
mcp-policy-gateway --config examples/gateway.json --transport stdioRun over Streamable HTTP
mcp-policy-gateway \
--config examples/gateway.json \
--transport streamable-http \
--host 127.0.0.1 \
--port 8000Clients connect to http://127.0.0.1:8000/mcp.
Security boundary
v0.3 provides a practical policy layer, not a claim of complete isolation. Persistent identity extraction from every client transport, external approval APIs, signed schema registries, policy hot reload, OpenTelemetry, deployment hardening and a formal threat model remain roadmap items.
See ROADMAP.md.
License
MIT.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
MCP enforcement layer that intercepts AI agent actions and blocks rule violations before execution.
MCP Gateway: wrap any MCP server with cold-start retries, uptime SLA, and per-execution MPP billing.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceMCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.761MIT
- AlicenseNot gradedqualityBmaintenanceProvides a secure MCP gateway for AI agents to access APIs without exposing raw credentials, with scoped access, audit logging, and OAuth support.MIT
- AlicenseNot gradedqualityDmaintenanceGoverns AI agent HTTP requests with policy enforcement, security scanning, and audit logging via MCP.MIT
- AlicenseNot gradedqualityBmaintenanceProvides a governance gateway for LLM and agent traffic via MCP, blocking prompt injection, redacting PII, enforcing per-tenant token budgets, and caching repeat questions semantically. Enables AI agents to route model calls through the same guardrails instead of calling providers directly.MIT
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/ahmed2qaid/mcp-policy-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server