Server Database
БесплатноНе проверенProvides tools for interacting with relational databases (PostgreSQL, MySQL, SQLite), enabling SQL queries, schema inspection, and migration execution.
Описание
Provides tools for interacting with relational databases (PostgreSQL, MySQL, SQLite), enabling SQL queries, schema inspection, and migration execution.
README
An MCP (Model Context Protocol) server that provides tools for interacting with relational databases. Supports PostgreSQL, MySQL, and SQLite.
Architecture
graph TB
subgraph Client
style Client fill:#4A90D9,stroke:#2E6BA6,color:#FFFFFF
MCP_Client["MCP Client"]
end
subgraph Server["mcp-server-database"]
style Server fill:#2ECC71,stroke:#1A9B52,color:#FFFFFF
Index["index.ts<br/>MCP Server Entry"]
subgraph Tools
style Tools fill:#F39C12,stroke:#C67D0A,color:#FFFFFF
T1["query"]
T2["list_tables"]
T3["describe_table"]
T4["list_databases"]
T5["execute_migration"]
T6["get_schema"]
end
end
subgraph Databases["Database Engines"]
style Databases fill:#9B59B6,stroke:#7D3C98,color:#FFFFFF
PG["PostgreSQL"]
MY["MySQL"]
SQ["SQLite"]
end
MCP_Client -- "stdio transport" --> Index
Index --> T1 & T2 & T3 & T4 & T5 & T6
T1 --> PG & MY & SQ
T2 --> PG & MY & SQ
T3 --> PG & MY & SQ
T4 --> PG & MY
T5 --> PG & MY & SQ
T6 --> PG & MY & SQ
Installation
npm install
npm run build
Configuration
| Variable | Description | Required |
|---|---|---|
DB_DRIVER |
Database driver: postgres, mysql, or sqlite |
Yes |
DB_HOST |
Database host | Yes (postgres/mysql) |
DB_PORT |
Database port | No |
DB_USER |
Database username | Yes (postgres/mysql) |
DB_PASSWORD |
Database password | Yes (postgres/mysql) |
DB_NAME |
Database name | Yes |
DB_PATH |
Path to SQLite file | Yes (sqlite) |
Usage
Standalone
DB_DRIVER=postgres DB_HOST=localhost DB_USER=admin DB_PASSWORD=secret DB_NAME=mydb npm start
Development
npm run dev
Docker
docker build -t mcp-server-database .
docker run -e DB_DRIVER=postgres -e DB_HOST=host.docker.internal -e DB_USER=admin -e DB_PASSWORD=secret -e DB_NAME=mydb mcp-server-database
MCP Client Configuration
{
"mcpServers": {
"database": {
"command": "node",
"args": ["dist/index.js"],
"env": {
"DB_DRIVER": "postgres",
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_USER": "admin",
"DB_PASSWORD": "secret",
"DB_NAME": "mydb"
}
}
}
}
Tool Reference
| Tool | Description | Parameters |
|---|---|---|
query |
Execute a SQL query | sql, params? |
list_tables |
List all tables | none |
describe_table |
Describe a table schema | table_name |
list_databases |
List databases on the server | none |
execute_migration |
Execute a migration SQL script | sql |
get_schema |
Get full database schema DDL | none |
License
MIT
from github.com/Citadel-Cloud-Management/mcp-server-database
Установка Server Database
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Citadel-Cloud-Management/mcp-server-databaseFAQ
Server Database MCP бесплатный?
Да, Server Database MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Server Database?
Нет, Server Database работает без API-ключей и переменных окружения.
Server Database — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Server Database в Claude Desktop, Claude Code или Cursor?
Открой Server Database на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolCompare Server Database with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
