MCP.Market

MCP Database Server MCP server

by Souhar-dya·io.github.Souhar-dya/mcp-db-server·v1.3.1·19 stars

MCP server for SQLite, PostgreSQL, and MySQL with natural language to SQL and direct SQL tooling.

A88/100grade A
What users say
No reviews yet
Be the first
Safety scan
A88/100

full report

Adoption
Growing

19 stars

Reviews

Write one

Nobody has reviewed MCP Database Server yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

MCP Database Server tools

No tool declarations could be read from the package source. They show once the server is installed.

Public scan report

scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it

no findings
  • –Code scanpackage could not be scannedn/a
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 14 days ago15/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 88/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How MCP Database Server compares

Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
88/100
higher than 75% of 802 Databases servers
GitHub stars
19
more than 83% of 602 Databases servers

Install MCP Database Server in Claude Code, Cursor or VS Code

claude mcp add mcp-db-server -- docker run -i --rm docker.io/souhardyak/mcp-db-server:1.3.1
Add to Cursor

What the publisher says

From the MCP Database Server repository's README, as published. We do not edit it. Read it on GitHub

mcp-db-server

An MCP (Model Context Protocol) server that exposes relational databases (PostgreSQL/MySQL) to AI agents with natural language query support. Transform natural language questions into SQL queries and get structured results.

Features

  • Multi-Database Support: Works with PostgreSQL and MySQL
  • Natural Language to SQL: Convert plain English queries to SQL using HuggingFace transformers
  • RESTful API: Clean FastAPI-based endpoints for database operations
  • Safety First: Read-only operations with query validation and result limits
  • Docker Ready: Complete containerization with Docker Compose
  • Production Ready: Health checks, logging, and error handling
  • AI Agent Friendly: Designed specifically for AI agent integration

Version 1.4.0 Changes

  • Added mandatory X-API-Key authentication for all database HTTP endpoints; /health remains public for health checks.
  • Removed unrestricted credentialed CORS and made allowed origins explicitly configurable.
  • Changed the default HTTP bind address to 127.0.0.1.
  • Added table-name validation against existing database tables to block SQL injection through table routes.
  • Added PostgreSQL sslmode=require compatibility for asyncpg connections.
  • Updated Docker Compose, environment examples, and documentation for secure API-key configuration.
  • Published Docker images:
  • souhardyak/mcp-db-server:1.4.0
  • souhardyak/mcp-db-server:latest
  • Added GitHub Container Registry publishing for:
  • ghcr.io/souhar-dya/mcp-db-server:1.4.0
  • ghcr.io/souhar-dya/mcp-db-server:latest

API Endpoints

Quick Start

Option 1: Docker Compose (Recommended)

  1. Clone and start the services:
git clone https://github.com/Souhar-dya/mcp-db-server.git
   cd mcp-db-server
   export MCP_API_KEY="$(openssl rand -hex 32)"
   docker-compose up --build
  1. Test the endpoints:
# Health check
   curl http://localhost:8000/health

   # List tables (requires the configured API key)
   curl -H "X-API-Key: $MCP_API_KEY" http://localhost:8000/mcp/list_tables

   # Describe a table
   curl -H "X-API-Key: $MCP_API_KEY" http://localhost:8000/mcp/describe/customers

   # Natural language query
   curl -X POST "http://localhost:8000/mcp/query" \
     -H "X-API-Key: $MCP_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"nl_query": "show top 5 customers by total orders"}'

Option 2: Local Development

  1. Prerequisites:
  • Python 3.11+
  • PostgreSQL or MySQL database
  1. Install dependencies:
pip install -r requirements.txt
  1. Set environment variables:
export DATABASE_URL="postgresql+asyncpg://user:password@localhost:5432/dbname"
   export MCP_API_KEY="$(openssl rand -hex 32)"
   # or for MySQL:
   # export DATABASE_URL="mysql+pymysql://user:password@localhost:3306/dbname"

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

MCP Database Server: common questions

Is MCP Database Server MCP server safe?
Yes, by our scan: it is graded A (88/100). Read the MCP Database Server safety report
How do I install MCP Database Server?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does MCP Database Server need an API key?
No secret keys are declared. It reads 1 setting from the environment.
Is MCP Database Server maintained?
The last commit was 52 days ago (2026-09-13). The latest release is v1.3.1.
What can I use instead of MCP Database Server?
Servers from other publishers that do the same job: DBHub MCP server, Faucet MCP server and Quarry MCP server. Compare all MCP Database Server alternatives.
How does MCP Database Server compare with other Databases MCP servers?
safety score 88/100 (higher than 75% of 802 Databases servers); github stars 19 (more than 83% of 602 Databases servers). Full comparison.

Alternatives to MCP Database Server

Same job from other publishers: the closest match first, then the best rated.

All MCP Database Server alternatives →
  • DBHub
    Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite
    A
  • Faucet
    SQL database to MCP tools and REST API: PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake.
    A
  • Quarry
    Safety-railed database access: Postgres, MySQL, SQLite, Redis. Read-only by default.
    A
  • NeoSQL MCP
    Schemas, SQL, ERDs, and codegen for PostgreSQL, MySQL, Oracle, SQLite, and more via NeoSQL Desktop.
    A
  • DB Explorer
    Read-only SQL for PostgreSQL, MySQL and SQLite: schema, safe SELECTs, EXPLAIN, index advice
    B