mcp-sql
MCP server that lets LLMs query PostgreSQL, SQLite, and MySQL databases. Single binary, read-only by default, multi-database.
Install
cargo install mcp-sql
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
MCP server that lets LLMs query PostgreSQL, SQLite, and MySQL databases. Single binary, read-only by default, multi-database.
cargo install mcp-sql
MCP server that lets LLMs query PostgreSQL, SQLite, and MySQL databases
# Demo mode — try it instantly with sample data
mcp-sql --demo
# Single database
mcp-sql --url postgres://user:pass@localhost/mydb
# SQLite
mcp-sql --url sqlite:path/to/db.sqlite
# Multiple databases
mcp-sql --url postgres://localhost/app --url sqlite:analytics.db
# Enable write operations
mcp-sql --url sqlite:local.db --allow-write
# Custom row limit
mcp-sql --url mysql://user:pass@localhost/shop --row-limit 500
# Read URL from environment variable
mcp-sql --url-env DATABASE_URL
# Mix --url and --url-env
mcp-sql --url sqlite:local.db --url-env PROD_DB_URL
# Custom query timeout (default: 30s)
mcp-sql --url sqlite:local.db --query-timeout 60
claude mcp add sql -- mcp-sql --url sqlite:path/to/your.db
Or edit ~/.claude.json directly:
{
"mcpServers": {
"sql": {
"type": "stdio",
"command": "mcp-sql",
"args": ["--url", "sqlite:path/to/your.db"]
}
}
}
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"sql": {
"command": "mcp-sql",
"args": [
"--url", "postgres://user:pass@localhost/mydb",
"--url", "sqlite:analytics.db"
]
}
}
}
Add to your MCP config (.cursor/mcp.json or equivalent):
{
"mcpServers": {
"sql": {
"command": "mcp-sql",
"args": ["--url", "sqlite:path/to/your.db"]
}
}
}
All tools accept an optional database parameter when multiple databases are connected. If only one database is connected, it's used automatically.
At least one --url or --url-env is required (unless using --demo).
SELECT, WITH, SHOW, PRAGMA, and EXPLAIN queries are allowedLIMIT is injected if not present (default: 100)list_databases outputSET TRANSACTION READ ONLY for database-level enforcementPass --allow-write to enable INSERT, UPDATE, DELETE, CREATE, and DROP operations.
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
MCP server that lets LLMs query PostgreSQL, SQLite, and MySQL databases
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
MCP Sql ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 MCP server that lets LLMs query PostgreSQL, SQLite, and MySQL databases