All projects
AI Security · 2026
mcpgate
A security gateway for the Model Context Protocol that fronts many MCP servers as one and checks every agent tool call for authorisation, rate limits, argument validity and tampered tool definitions.
Approach
MCP clients usually connect straight to every server, with no central authorisation, no audit trail and nothing stopping a server from changing a tool description after it was approved, a description the model reads as instructions.
mcpgate namespaces tools across servers, validates OAuth 2.1 bearer tokens against a local JWKS with audience binding, enforces default-deny per-client RBAC and token-bucket rate limits, and validates arguments against each tool's JSON Schema before anything reaches the upstream.
Highlights
- Tool-definition pinning: a changed definition (a “rug pull”) is quarantined with a field-level diff
- Tamper-evident, hash-chained JSONL audit log including refusals
- Supports stdio and Streamable HTTP upstreams
- 135 tests, 95.0% branch coverage