Metadata-Version: 2.5
Name: mcp-database-universal
Version: 0.1.1
Summary: MCP Database Server — reasoning interface for databases, not a thin wrapper
Project-URL: Homepage, https://github.com/kobramantra-debug/mcp-database-server
Project-URL: Repository, https://github.com/kobramantra-debug/mcp-database-server
Project-URL: Issues, https://github.com/kobramantra-debug/mcp-database-server/issues
Author: Lukas
License-Expression: MIT
Keywords: ai-tools,database,mcp,model-context-protocol,mysql,postgresql,sqlite
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: mcp[cli]>=2.0.0
Provides-Extra: all
Requires-Dist: psycopg[binary]>=3.1.0; extra == 'all'
Requires-Dist: pymysql>=1.1.0; extra == 'all'
Requires-Dist: pyodbc>=5.1.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Provides-Extra: mssql
Requires-Dist: pyodbc>=5.1.0; extra == 'mssql'
Provides-Extra: mysql
Requires-Dist: pymysql>=1.1.0; extra == 'mysql'
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1.0; extra == 'postgres'
Description-Content-Type: text/markdown

# 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

```bash
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

```bash
DATABASE_URL=sqlite:///mydb.db python -m mcp_database_universal
```

## Docker

```bash
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
