MCP Database Bridge
Provides read-only access to SQLite databases, allowing AI agents to list tables, inspect schemas, execute SELECT queries, and analyze query plans without modifying data.
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 Database Bridgelist all tables in the database"
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.
Demo Video
Click the preview below to watch the MCP Database Bridge project demonstration on YouTube.
Related MCP server: sqlite-mcp
โจ Features
๐ก๏ธ Read-Only Safeties: Strict regex filtering intercepts and rejects destructive operations like
INSERT,UPDATE,DROP, andALTER. The AI can look, but it can't touch.๐ Introspection: AI can autonomously list tables and read schemas (
PRAGMA table_info) directly to understand your data structure before writing queries.๐ Claude Desktop Ready: Comes with one-click automated setup scripts for both macOS/Linux and Windows that instantly wire it up to your Claude Desktop config.
๐ Query Analysis: Includes
explain_querycapabilities to help AI debug complex data retrieval.
Quick Start
The setup scripts create a Python virtual environment, install dependencies, and register database-mcp in Claude Desktop.
Hosted Custom Client
Run the ChatGPT-inspired DB/BRIDGE client locally:
export GROQ_API_KEY=your_groq_api_key
uvicorn client.api.app:app --reloadOpen http://127.0.0.1:8000 to select a Groq model, manage temporary SQLite
databases, ask questions, and inspect the MCP tool activity used for each answer.
Vercel Deployment
The hosted client is configured through vercel.json. Add these environment
variables in Vercel before deploying:
GROQ_API_KEY=your_groq_api_key
GROQ_MODELS=llama-3.3-70b-versatile,llama-3.1-8b-instant,openai/gpt-oss-120b
ALLOWED_ORIGINS=https://your-docs-domain.example,https://your-vercel-app.vercel.appUploaded databases are isolated by anonymous browser session but remain temporary because Vercel's function filesystem is not durable.
Prerequisites
Python 3.11 or newer
Git
Claude Desktop
1. Clone the Repository
git clone https://github.com/buvaneswaraneb/mcp-database-bridge.git
cd mcp-database-bridge2. Run the Setup Script
Choose the instructions for your operating system.
Run:
chmod +x setup.sh
./setup.shAfter setup completes:
Completely quit Claude Desktop.
On macOS, press
Cmd + Q.On Linux, quit Claude from the application menu.
Reopen Claude Desktop.
Open a new chat and confirm that
database-mcpappears in the available tools.
Run setup.bat from Command Prompt:
setup.batYou can also double-click setup.bat from File Explorer.
Completely Restart Claude Desktop on Windows
Closing the Claude window may leave it running in the background. Fully stop it before reopening:
Press
Ctrl + Shift + Escto open Task Manager.Select the Processes tab.
Find Claude under Apps or Background processes.
Select each Claude process and click End task.
Wait a few seconds, then reopen Claude Desktop.
If Claude does not appear under Processes, open the Details tab and end any Claude.exe processes.
3. Verify the Connection
In Claude Desktop:
Open a new chat.
Open the tools or integrations menu.
Confirm that
database-mcpis connected.Ask:
What databases are available?
If the server is not listed, completely stop Claude Desktop again and reopen it.
๐ ๏ธ Manual Setup (Claude Code / Custom Agents)
If you prefer to configure things manually or use Claude Code in your terminal:
Create Virtual Environment & Install Dependencies:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt cp .env.example .envAdd to Claude Code:
claude mcp add database-mcp .venv/bin/python mcp/src/server.py
๐งช Running Tests
Ensure everything is working correctly by running the comprehensive test suite:
pytest mcp/tests/ -v๐๏ธ Architecture & Internals
graph TD
A[๐ค Claude Desktop / AI Agents] <-->|stdio JSON-RPC| B{MCP Bridge Router}
subgraph Database MCP Server
B -->|tools/call: list_tables| C[๐ list_tables]
B -->|tools/call: get_schema| D[๐ get_schema]
B -->|tools/call: explain_query| E[๐ explain_query]
B -->|tools/call: run_select| F[โถ๏ธ run_select]
F --> G{๐ก๏ธ Read-Only Safeties}
G -. Block UPDATE/DROP/INSERT .-> H[โ Reject]
G -- Allow SELECT --> I[โ
Execute]
end
C & D & E & I --> J[(๐๏ธ SQLite Database)]
style A fill:#4B32C3,stroke:#fff,stroke-width:2px,color:#fff
style B fill:#2D3748,stroke:#4B32C3,stroke-width:2px,color:#fff
style G fill:#9B2C2C,stroke:#FC8181,stroke-width:2px,color:#fff
style J fill:#276749,stroke:#68D391,stroke-width:2px,color:#fff
style H fill:#E53E3E,stroke:#fff,stroke-width:1px,color:#fff
style C fill:#2A4365,stroke:#63B3ED,color:#fff
style D fill:#2A4365,stroke:#63B3ED,color:#fff
style E fill:#2A4365,stroke:#63B3ED,color:#fff
style F fill:#2A4365,stroke:#63B3ED,color:#fff
style I fill:#38A169,stroke:#fff,color:#fffCurious how it works under the hood?
Read documentation/docs/structure.md for a detailed walkthrough of the file architecture and the JSON-RPC execution flow.
Read documentation/docs/ai_usage_note.md for notes on how AI was leveraged to build this project.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/buvaneswaraneb/mcp-database-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server