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-universal
# 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 mcp_database_universal
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.1
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.1.tar.gz | 32.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_database_universal-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.0 kB
Release files / mcp_database_universal-0.1.1.tar.gz
| Download URL | mcp_database_universal-0.1.1.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efd1e70cbc02415123a5fe6486f22bc4bc7642c50e4dcfa8972afe06120ac645
|
|
BLAKE2b-256 checksum How to use checksums |
489d6c38fa4054fbdd7c2061abff89bf0027e80a8e74935e475f891ace4ec8d1
|
| 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.1-py3-none-any.whl
| Download URL | mcp_database_universal-0.1.1-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75fb45368439f140eef37d51d45017de53587044a17312a1039d88b71ae103d6
|
|
BLAKE2b-256 checksum How to use checksums |
9e288c86a835bef23efd161322e3b5c3a6aed3de1566c934b9b01ed2742a214e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|