MCP Database Server with read-only access
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"mcp-db-server","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# MCP Database Server A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server implementation in Python that provides **strictly read-only** access to databases. It allows Large Language Models (LLMs) to inspect schemas and query data safely without risking data modification. ## Features - **🛡️ Strict Read-Only**: Enforced at the driver level (e.g., SQLite `?mode=ro`) or session level (MySQL `SET SESSION TRANSACTION READ ONLY`). - **🏗️ Repository Pattern**: Abstracted database access allows for easy extension to other backends (PostgreSQL, MySQL) via Dependency Injection. - **⚡ FastMCP**: Built efficiently using the official MCP Python SDK. - **🔌 Connection Pooling**: Automatic connection pooling for MySQL using `DBUtils` to ensure performance and reliability. - **🔧 Easy Configuration**: Managed via environment variables and Makefiles. ## Project Structure - `mcp_db_server/`: Main Python package for the MCP server. - `__init__.py`: Entry point and server initialization. - `db/`: Repository implementations (`sqlite_repository.py`, `mysql_repository.py`). - `seed.py`: Utility script to populate the database (write access). - `Makefile`: Automation for common tasks. - `pyproject.toml`: Package configuration and dependencies. ## Quick Start ### Prerequisites - Python 3.12+ (managed via `venv`) - `make` (optional, but recommended) - MySQL Server (optional, if using MySQL backend) ### 1. Setup Use the Makefile to create a virtual environment, install dependencies, and seed a test database: ```bash make setup ``` *This runs `pip install -r requirements.txt` and `python seed.py`.* ### 2. Configuration The project uses `python-dotenv`. Copy the example config and adjust as needed: ```bash cp .env.example .env ``` **Key Variables:** - `DB_ENGINE`: `sqlite` (Default) or `mysql` - `DB_ADDRESS`: Path to db file (SQLite) or Host URL (MySQL). - `DB_PORT`: Database port (Default: 3306 for MySQL). - `DB_USER` / `DB_PASSWORD`: Database credentia…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.