MCP Database Server
Reasoning interface for databases — not a thin wrapper.
Features
- 7 reasoning tools for AI agents to work with databases
- Multi-engine: SQLite (built-in), PostgreSQL, MySQL, MSSQL (optional)
- Safety first: read-only default, parameterized queries, injection prevention
- LLM-friendly output: types translated, NULLs handled, results contextualized
- Schema introspection: auto-discover tables, columns, relationships, indexes
- Natural language queries: ask questions in plain text, get SQL + results
Install
pip install mcp-database-server
# With optional engines:
pip install "mcp-database-server[postgres]"
pip install "mcp-database-server[mysql]"
pip install "mcp-database-server[mssql]"
Usage
DATABASE_URL=sqlite:///mydb.db python -m src
Docker
docker build -t mcp-db .
docker run --rm -i -e DATABASE_URL=sqlite:///:memory: mcp-db
Configuration
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
(required) | Connection URL |
DATABASE_READ_ONLY |
true |
Read-only mode |
DATABASE_MAX_ROWS |
1000 |
Max rows per query |
DATABASE_MAX_QUERY_TIME |
30 |
Query timeout (seconds) |
License
MIT
Release files for mcp-database-universal 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_database_universal-0.1.0.tar.gz | 31.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_database_universal-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.0 kB
Release files / mcp_database_universal-0.1.0.tar.gz
| Download URL | mcp_database_universal-0.1.0.tar.gz |
|---|---|
| Size | 31.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42d3016e6780ee0a7d5b0075670b606dbe3e60b2e2f6f76e13d244f1e1150d17
|
|
BLAKE2b-256 checksum How to use checksums |
d906f688bd39e5134821eb8386a5507b1fad903e75bcb8b9a86408faa7545508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / mcp_database_universal-0.1.0-py3-none-any.whl
| Download URL | mcp_database_universal-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a00d2cf335e4fbae2a107fdc3d03eabd420da5e697ca6d4eb33099fc1bcd291
|
|
BLAKE2b-256 checksum How to use checksums |
5168dd453d805be21e17804152f32b73eee66a058a8aab739730c1f5038629be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|