mcp-data-gateway
Enforces identity-based access control and audit logging for MCP servers, letting you grant fine-grained tool permissions to users and systems while failing secure by default.
README
mcp-data-gateway
Hand an AI client to one person and MCP is easy. Hand it to a team — analysts, people-ops, leads, each entitled to different systems — and the server needs an answer it can defend: who is calling, and what may they touch? This repo is that answer, cut down to its load-bearing parts.
One allows() decision drives everything. It filters what each identity
sees and refuses what they try anyway, so the tool list is never the
only thing standing between a caller and a system. Grants fail closed: a
missing or corrupt store denies everyone except a break-glass superuser
who lives in code, precisely so no store outage can lock out the person
who fixes stores. Every call — and every denial — lands as a size-capped
audit line.
Opinions baked in:
- Grants name tools one by one. Globs get rejected at load time, because the write tool someone ships next quarter must not inherit its way into a read-only identity.
- A tool that joins two systems declares both, and the caller needs both. The reads are what leak, not the names.
- A snapshot test pins the tool surface, and a second one holds the write surface at exactly one tool.
- The SQL gate gives fast, specific refusals — but the real fence is the database identity's permissions. You can talk past a text scan. You cannot talk past IAM.
Quickstart
python3 -m unittest discover -s tests # no dependencies
python3 -m gateway.demo # three identities, one denial on the record
pip install mcp && GATEWAY_IDENTITY=analyst@example.com python3 -m gateway.server
Going deeper
docs/design.md walks the pieces with captured output. docs/rules.md gives every rule its reason and its test. docs/lineage.md holds the honest limits and provenance.
Distilled August 2026 from production gateways that earned each rule the hard way. The commit log starts at the distillation.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.