MCP Data Bridge
Provides schema discovery and guarded read-only SQL query execution against PostgreSQL databases, with keyword blocking and result limiting.
Provides schema discovery and guarded read-only SQL query execution against SQLite databases, including a seeded demo database for testing.
Click on "Deploy 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 Data BridgeWhat tables are in the database, and who are my top 3 customers by revenue?"
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 Data Bridge ā”
Secure Model Context Protocol (MCP) Database Gateway for Autonomous AI Agents with built-in runtime query guardrails, schema discovery, and interactive developer playground.
šÆ What is MCP Data Bridge?
Autonomous AI agents (such as Claude, Gemini, OpenAI Assistants, or LangGraph workflows) frequently require direct access to operational databases. However, granting LLMs direct connection credentials presents catastrophic security risks:
Prompt Injection Attacks: An adversary can trick an agent into executing
DROP TABLEor mutating financial data.Token Bloat: Large unstructured table dumps blow the model's context window.
Schema Hallucinations: Agents guessing table or column names without structured discovery.
MCP Data Bridge solves this by acting as a hardened intermediary layer following Anthropic's open Model Context Protocol (MCP) specification.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Autonomous AI Agents & Clients ā
ā (Claude Desktop, Cursor, Custom Agents) ā
āāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāā
ā JSON-RPC 2.0 (STDIO / REST)
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MCP DATA BRIDGE ā
ā ā
ā š§ Tool: list_tables() ā
ā āā Discovers active database tables ā
ā ā
ā š§ Tool: describe_table(table_name) ā
ā āā Schema inspection & PRAGMA regex sanitization ā
ā ā
ā š§ Tool: execute_query(sql) ā
ā āā Pydantic input validation ā
ā āā Strict Read-Only Guardrail (SELECT only) ā
ā āā Prohibited Keyword Interceptor (DROP/DELETE...) ā
ā āā Hard result limit clamping (Max 100 rows) ā
āāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Parameterized Safe Query
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Enterprise Database ā
ā (SQLite, PostgreSQL, AWS RDS) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāRelated MCP server: sql-guard-mcp
⨠Features
Standard MCP Compliant: Implements the official Model Context Protocol JSON-RPC specification. Compatible out of the box with Claude Desktop, Cursor, and custom agents.
Strict Read-Only Guardrails: Regex-powered gatekeeper blocks any mutation keywords (
INSERT,UPDATE,DELETE,DROP,ALTER,TRUNCATE,EXEC).Interactive Web Playground: Includes a dark-mode visual explorer to inspect schemas and test query safety in real-time.
Autonomous Agent Simulator: Pre-built script demonstrating an end-to-end multi-turn agent reasoning loop with prompt-injection interception.
Zero-Config Seed Database: Includes automated enterprise database generator (
customers,products,orders).Production Ready: Fully dockerized with unit test suite running on GitHub Actions.
š Quickstart
1. Installation
git clone https://github.com/NithinPathikonda/mcp-data-bridge.git
cd mcp-data-bridge
# Install minimal dependencies
pip install -r requirements.txt2. Run Autonomous Agent Simulation
Watch an AI agent explore the database, run multi-table analytics, and attempt a simulated prompt-injection attack that gets blocked:
python agent_demo.py3. Launch Interactive Web Playground
Explore the database visually and test guardrails directly at http://localhost:8500:
python web_ui.py4. Run Unit Test Suite
python test_server.pyš¤ Claude Desktop & Cursor Integration
To expose this database directly to Claude Desktop, add this server to your claude_desktop_config.json:
{
"mcpServers": {
"enterprise-data-bridge": {
"command": "python",
"args": [
"/ABSOLUTE/PATH/TO/mcp-data-bridge/server.py",
"--stdio"
]
}
}
}Now, ask Claude: "What tables do I have in the database?" or "Who are my top 3 customers by revenue?", and Claude will automatically call your tools!
š³ Docker Deployment
Run the complete containerized stack:
docker compose up --buildThe web playground will be available at http://localhost:8500.
š¼ System Design & Interview Talking Points
If asked about this project during a technical or system design interview:
"At HPE and in my independent work, I recognized that giving autonomous LLMs unrestricted database access is an anti-pattern. I designed
mcp-data-bridgeusing the Model Context Protocol to serve as an air-gapped proxy. It provides structured schema discovery (list_tables,describe_table) and read-only query execution (execute_query). It implements Pydantic runtime validation, sanitized table regexes, and a zero-trust guardrail that drops any destructive mutations or prompt-injected SQL before reaching the database engine."
š License
Distributed under the MIT License. Copyright Ā© 2026 Nithin Pathikonda.
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor ā on any device. Read-only, encrypted, audited.
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to query SQL databases safely with read-only access, allowing schema discovery and SELECT queries while blocking writes and DDL operations.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely query and explore SQLite databases through read-only, guard-protected tools that block writes, sensitive table access, and runaway queries.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely query SQL databases through read-only tools for describing entities, reading records, and aggregating records, with view-based access and fail-closed per-user row-level security.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query Postgres, BigQuery and DuckDB read-only through policy-checked SQL, with AST-based guards that refuse writes and dangerous functions, column masking on the way out, and an audit log of every query. Also exposes schema browsing and query-planning tools so agents can see allowed tables, columns and costs before running anything.MIT