Put human approval and audit logs in front of any API your AI agent can call

The security layer between your AI agents and your business APIs. Every tool call is authenticated, authorized, rate-limited, and logged — with human approval for destructive operations. Built on FastAPI with Streamable HTTP MCP transport.

Default-deny access policy Free self-hosted Community edition Full audit log of every call Multi-tenancy for enterprise OpenAPI import to MCP tools
Features

What the gateway enforces

Each tool call passes through the same checks, in the same order, every time.

Human approval

Destructive operations create a pending approval instead of running. Each approval is single-use, tied to the caller, tool and exact arguments, and expires after 15 minutes by default.

OpenAPI import

Upload an OpenAPI spec to automatically generate MCP tools, each classified as read, write or destructive. An admin reviews and approves them before anything goes live.

Role-based access control

Default-deny policy — nothing works until you explicitly allow it. Roles map to tools: a support agent gets read-only while an ops agent gets read and write.

Rate limits and quotas

Redis-backed token buckets with per-role and per-tool rate limits plus daily quotas. A runaway agent cannot overwhelm your upstream systems.

Full audit trail

Every call is logged with caller, role, tool, outcome and latency. Sensitive data is redacted. Logs are stored in JSONL and/or PostgreSQL for compliance.

API key & JWT auth

Agents authenticate with API keys or JWT bearer tokens from Okta, Auth0, or Keycloak. JWKS-based key rotation is supported for enterprise identity providers.

Multi-tenancy

Organization isolation with namespaced API keys, quotas, and approvals. Enterprise feature for multi-org deployments with separate security boundaries.

Secret management

Upstream API credentials are resolved from environment variables or HashiCorp Vault (Enterprise). Secrets are never stored in OpenAPI specs or policy files.

Observability

Request tracing with X-Request-ID, structured logging, health checks at /health, and Prometheus-compatible metrics at /admin/metrics.

Human approval

Risky actions wait for a person

An agent can ask to delete an account or refund an invoice. It cannot do it until someone with the right role says yes.

  1. The agent calls a destructive tool

    For example, deactivating a customer. The gateway sees the tool is classified as destructive.

  2. The call pauses

    The gateway creates a single-use approval tied to the caller, the tool and the arguments. Nothing reaches the upstream API.

  3. A person decides

    Only roles you authorize as approvers can approve in the dashboard. Pending requests expire after 15 minutes by default.

  4. The call runs once

    Changed arguments or a reused approval are rejected, and every step is written to the audit log.

Architecture

A secure request path, end to end

Lintel validates, isolates, and records every MCP call before a request reaches your systems.

AI

AI Clients

MCP agents and the React admin dashboard send requests.

MCP · HTTP · :8080
HTTPS
PX

Nginx Proxy

Terminates traffic and load-balances gateway instances.

TLS · LB · :8000
Forward
GW

Lintel Gateway

Tenant isolation, authentication, RBAC, quotas, approvals, validation, and audit.

Python 3.12 · FastAPI · MCP
Execute
API

Your APIs

CRM, ERP, billing, and other OpenAPI-backed systems.

HTTP · REST · OpenAPI
Control & state plane
PG

PostgreSQL

Tenants, policies, approvals, usage, and searchable audit.

RD

Redis

Distributed rate limits, quotas, cache, and approval state.

JL

Audit Logs

Optional JSONL event logs with PII redaction.

VK

HashiCorp Vault

Enterprise runtime credentials for upstream APIs.

Request Lifecycle

Every incoming tool call passes through 6 sequential gates before reaching your upstream API.

1

Authenticate

JWT or API key validation

401
2

Authorize

RBAC policy check

403
3

Rate Limit

Token bucket per agent

429
4

Validate

OpenAPI schema check

400
5

Approval

Human-in-the-loop if required

202
6

Execute

Proxy to upstream API

200

Technology Stack

Python 3.12 FastAPI MCP Streamable HTTP PostgreSQL 16 Redis 7 Nginx 1.27 React 19 Alembic SQLAlchemy 2.0 HashiCorp Vault Docker Compose Pydantic 2.0
Admin Dashboard

Manage everything from one place

A React-based dashboard gives you full visibility and control over agents, policies, approvals, and audit records.

Overview & Analytics

Real-time gateway health, per-agent and per-tool call counts, and usage trends. Advanced charts available in Enterprise.

API Integrations

Review, approve, and manage OpenAPI imports. See generated tools, risk classifications, and permission mappings.

MCP Tools

Browse all available tools, their risk levels, and which roles can access them.

Agent Management

Create and manage API keys, assign roles, and disable agents when needed.

Permissions

Edit role-based access policies with a visual editor. Define which roles can call which tools.

Human Approvals

Approve or reject destructive operations in real time. Track pending approvals and their expiration.

Audit Logs

Search and filter every tool call with caller, role, outcome, and timestamp. Export for compliance.

Rate Limits & Usage

Monitor per-role and per-tool rate limits, daily quotas, and current usage in real time.

Quick start

Run it on your own machine

One Docker Compose command starts the full stack: gateway, PostgreSQL, Redis, Nginx proxy, and the admin dashboard.

# clone and configure git clone https://github.com/mzee300/mcp-gateway.git cd mcp-gateway cp .env.example .env # edit .env — set API keys and POSTGRES_PASSWORD # start everything docker compose up --build -d # verify services are running docker compose ps # endpoints # Gateway API: http://127.0.0.1:8000 # MCP endpoint: http://127.0.0.1:8000/mcp # Admin dashboard: http://127.0.0.1:8080
  1. Onboard your APIs

    Upload an OpenAPI spec in the dashboard. The gateway generates MCP tools from it, classifying each as read, write, or destructive.

  2. Create agents & assign roles

    Issue API keys, assign roles, and define which tools each role can reach. Default-deny means nothing works until you explicitly allow it.

  3. Connect and monitor

    Agents connect over MCP (Streamable HTTP). Watch activity in the audit log, handle approvals, and monitor rate limits from the dashboard.

  4. Test with the demo client

    Run the included demo client to see authentication, role-based access, and human approval in action with built-in sample tools.

Licensing

Free Community edition. Enterprise for large-scale deployments.

The Community edition is MIT-licensed and includes everything you need to secure AI agents. Enterprise adds multi-tenancy, SSO, Vault integration, and more.

Community

Free
MIT License — self-hosted
  • API key & JWT authentication
  • RBAC with default-deny
  • Rate limits & daily quotas
  • Human approval workflow
  • OpenAPI import pipeline
  • Audit logging (JSONL + PostgreSQL)
  • Admin dashboard
  • Health checks & metrics
  • Built-in demo tools
Run it free

Enterprise

Custom
Self-hosted with license
  • Everything in Community
  • Multi-tenancy (organizations)
  • SSO dashboard login (OIDC/SAML)
  • SCIM & group mapping
  • HashiCorp Vault secrets
  • Long-term audit retention
  • SIEM & webhook export
  • Tamper-evident logs
  • Compliance reports (SOC 2, HIPAA, GDPR)
  • Dashboard analytics
  • Database policy store with versioning
Request a license

Enterprise features require a separately distributed package and an offline RSA-signed license key. A 14-day trial is available for evaluation.