SqlExecutorMCP
БесплатноНе проверенMCP server that lets AI agents work SQL Server and MySQL safely: allowlisted targets, statement-type gating, and destructive ops split into their own tools.
Описание
MCP server that lets AI agents work SQL Server and MySQL safely: allowlisted targets, statement-type gating, and destructive ops split into their own tools.
README
Python MCP SQL Server MySQL License: MIT
An MCP server that lets AI agents work with real databases without handing them the keys to the kingdom. It speaks to SQL Server and MySQL over named connections, and every request passes through an allowlist and a statement-type gate before it touches an engine.
I built it because I point Claude at working databases every day, and "the agent can run whatever SQL it wants" was never going to fly. It's wired into my own Claude Code sessions as I type this.
The safety model
This is the part I care about. Three layers, all enforced server-side:
- Named connections only. The agent never sees a connection string. It asks for a connection by name, and credentials live in a local
config.jsonthat never leaves the machine. - Per-connection allowlists. Each connection declares which databases and schemas are fair game (
"*"is available, but it's an explicit opt-in). Anything outside the list raises a permission error before any SQL runs. - Statement-type gating. Every statement is parsed with
sqlparseand its type is checked against the tool that submitted it:execute_queryaccepts SELECT and CALL, nothing elseexecute_statementaccepts INSERT, UPDATE, CREATE, ALTER, and MERGE- DELETE and DROP each require their own dedicated tool, so a destructive statement can't ride in on a generic call
- TRUNCATE is blocked everywhere, full stop
Transactions get the same treatment: execute_transaction runs a batch of DML atomically, and the MySQL adapter knows that DDL there commits implicitly, so it won't pretend a DDL rollback would have worked.
Tools
| Tool | What it does |
|---|---|
list_connections |
Show the named connections and what they allow |
list_databases |
List databases visible on a connection |
list_tables |
List tables in a database |
describe_table |
Columns, types, and nullability for a table |
get_table_constraints |
Keys, foreign keys, and constraints |
get_schema |
Broader schema snapshot for orientation |
preview_table |
Peek at the first rows without writing SQL |
execute_query |
Read-only SELECT / CALL |
execute_statement |
Gated writes: INSERT, UPDATE, CREATE, ALTER, MERGE |
execute_transaction |
A batch of DML statements, all-or-nothing |
delete_statement |
DELETE, and only DELETE |
drop_statement |
DROP, and only DROP |
Setup
pip install -e .
cp config.template.json config.json # connections + allowlist, see the template
Then register it with your MCP client (Claude Code / Claude Desktop shown):
{
"mcpServers": {
"sql-executor": { "command": "sql-executor-mcp" }
}
}
Stack
Python 3.10+ · FastMCP · pyodbc · mysql-connector-python · sqlparse
Установить SqlExecutorMCP в Claude Desktop, Claude Code, Cursor
unyly install sqlexecutormcpСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add sqlexecutormcp -- uvx --from git+https://github.com/TylerBuilds-Official/SqlExecutorMCP sql-executor-mcpПошаговые гайды: как установить SqlExecutorMCP
FAQ
SqlExecutorMCP MCP бесплатный?
Да, SqlExecutorMCP MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для SqlExecutorMCP?
Нет, SqlExecutorMCP работает без API-ключей и переменных окружения.
SqlExecutorMCP — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить SqlExecutorMCP в Claude Desktop, Claude Code или Cursor?
Открой SqlExecutorMCP на 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.
автор: modelcontextprotocolRedis
Interact with Redis key-value stores.
автор: modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
автор: modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
автор: raw-labstadas-github/a2asearch-mcp
MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access
автор: tadas-githubjulien040/anyquery
Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi
автор: julien040drakonkat/wizzy-mcp-tmdb
A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.
автор: drakonkatCompare SqlExecutorMCP with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
