EchelonGraph CVE & Exposure
CVE, KEV, EPSS, SBOM and advisory lookups; per-CVE exposure from Shodan data (© Shodan). Keyless.
作者による説明(英語の原文)
Security-first MySQL MCP server with AST validation, table whitelist, schema resources, and audit.
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
MYSQL_MCP_PASSWORD「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MYSQL_MCP_PASSWORD",
"ghcr.io/kurok1/mcp-server-mysql:2.1.0",
"--config",
"/data/config.yaml"
],
"env": {
"MYSQL_MCP_PASSWORD": "your-value"
}
}
}
}ターミナルでこれを実行します
claude mcp add mysql --env MYSQL_MCP_PASSWORD=your-value -- docker run -i --rm -e MYSQL_MCP_PASSWORD ghcr.io/kurok1/mcp-server-mysql:2.1.0 --config /data/config.yaml動かす前に、空欄の値を入力してください。
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"mysql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MYSQL_MCP_PASSWORD",
"ghcr.io/kurok1/mcp-server-mysql:2.1.0",
"--config",
"/data/config.yaml"
],
"env": {
"MYSQL_MCP_PASSWORD": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"mysql": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MYSQL_MCP_PASSWORD",
"ghcr.io/kurok1/mcp-server-mysql:2.1.0",
"--config",
"/data/config.yaml"
],
"env": {
"MYSQL_MCP_PASSWORD": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月8日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント Kurok1 で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
入力が必要なもの:MYSQL_MCP_PASSWORD
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(2.1.0)がレジストリに届いたのは2 か月前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにDockerも必要です。
同じカテゴリには:EchelonGraph CVE & Exposure, SML Risk Firewall, Nife
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
CVE, KEV, EPSS, SBOM and advisory lookups; per-CVE exposure from Shodan data (© Shodan). Keyless.
Pre-trade risk checks for agent trades: orders vs your limits, signed receipts.
Manage Nife.io cloud apps, sites, secrets and Git integrations from MCP clients.
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
English | 简体中文
A security-first MySQL [MCP](https://modelcontextprotocol.io) server. Every SQL statement must survive a full AST parse by an industrial-grade SQL parser (TiDB parser) before it can touch your database — backed by a read-only transaction fallback and a driver-level multi-statement lockout. Three independent layers of defense-in-depth: let AI query your database, without letting it walk off with your database.
Most MySQL MCP servers enforce "read-only" with regex/keyword matching, or by wrapping queries in a read-only transaction. Both are broken:
COMMIT; DROP TABLE ... stacked-statement injection — the exact attack Datadog demonstrated against the official Postgres reference server, which has since been archived.This project puts the security boundary on real SQL semantic parsing instead. Every statement is parsed into an AST by the TiDB parser (MySQL 8.0-grammar compatible); anything the parser cannot understand is rejected — fail-closed, so incomplete grammar coverage can only over-block, never under-block. And because the parser sees real MySQL semantics, tricks like hiding a JOIN mysql.user inside a versioned comment /*!80000 ... */ are extracted and checked like any other table reference.
list_profile, then pass an explicit profile to every SQL tool.SELECT / INSERT / UPDATE / DELETE / DDL are individually switchable; the default is read-only. SET, GRANT, CALL, USE, LOAD DATA, LOCK TABLES, and transaction control (BEGIN/COMMIT/ROLLBACK) are rejected unconditionally — classification itself is an allowlist, so unknown statement types land on the deny side by construction.db.*, db.table, app_*.logs (glob per side, case-insensitive). Every table reference is extracted from the AST: JOINs, subqueries, derived tables, CTEs (scope-aware — a CTE name can't shadow a real table to smuggle it past the check), multi-table DML, INSERT ... SELECT, and versioned comments.mysql:///schema/{profile}/{database}/{table}. Reading a resource returns live SHOW CREATE TABLE SQL with only the volatile table-level AUTO_INCREMENT=N counter removed.UPDATE/DELETE without WHERE.mysql_stats tool so you can ask "which query was slowest?" right in the conversation.mysql_script runs a multi-statement script in a single transaction with every statement individually re-validated; any failure rolls back everything. DDL is banned inside scripts because MySQL's implicit commit would break atomicity.mysql_explain with traditional / json / tree formats and EXPLAIN ANALYZE support.mysql_query as a filterable, sortable table with per-view history, selection, column controls, and TSV/CSV/JSON copy; other hosts keep receiving the original text result.All seven mysql_* tools require a non-empty profile string matching a configured name. There is no default connection: missing or unknown profiles are rejected before database access. mysql_describe_table defaults its optional database argument to the selected profile's database.
| Tool | What it does |
|---|---|
list_profile | No arguments; return names and descriptions sorted by name as text and structured {profiles: [{name, description}]}; no connection probe or credentials |
mysql_query | Run one read-only statement (SELECT / SHOW / DESCRIBE / EXPLAIN) |
mysql_execute | Run one write statement (INSERT / UPDATE / DELETE / DDL — each type must be enabled in config); returns affected rows |
mysql_script | Run a ;-separated multi-statement script atomically in one transaction — all-or-nothing; DDL banned |
mysql_explain | Execution plan for a single SELECT (format: traditional / json / tree; analyze: true runs EXPLAIN ANALYZE) |
mysql_list_tables | List the base tables visible through the whitelist |
mysql_describe_table | Column structure of a whitelisted table |
mysql_stats | Selected profile's process-lifetime stats window: profile name, totals / denials, average & P95 latency, top-N slow queries, per-table access counts |
For example, call list_profile with {}, then mysql_query with {"profile":"dev","sql":"SELECT * FROM myapp.orders LIMIT 10"} or mysql_stats with {"profile":"dev","top_n":5}. Keep the same profile when inspecting, changing, and verifying data.
The server takes a table snapshot for each profile during MCP initialization/discovery and registers one direct resource per visible base table. Resource names also identify the profile, so identical database and table names on different servers stay distinct:
| URI | MIME type | Content |
|---|---|---|
mysql:///schema/{profile}/{database}/{table} | application/sql | Current normalized SHOW CREATE TABLE output |
"Visible" is the intersection of what the profile's MySQL account can see and its security.table_whitelist. Views are not registered. Resource discovery is not capped by security.max_rows, and resource reads remain available even when select is absent from allowed_statements, because both operations execute fixed server-owned metadata SQL rather than user-submitted SQL.
The resource set is a discovery-time snapshot: a table created later appears after the next discovery or reconnect, while a dropped or newly inaccessible table returns MCP Resource Not Found. The resource content is live, so ALTER TABLE is reflected on the next read. Resource discovery and reads do not enter the audit log or mysql_stats; a discovery failure is logged with the profile name and clears only that profile's table resources; other profiles, tools, and the shared query-results App remain available.
The root-level resources.enabled switch applies to every profile. Set it to false to disable the entire resource feature. It defaults to true; when disabled, the server does not advertise Resources, register table or MCP App resources, or query any profile's MySQL during initialization/discovery. The interactive MCP App is therefore unavailable, while all eight tools, including mysql_query's text and structured results, remain available.
Prebuilt — download the tarball for your platform (linux_amd64 / linux_arm64 / darwin_arm64) from Releases (checksums included), or install with Go:
go install github.com/Kurok1/mcp-server-mysql/cmd/mcp-server-mysql@latest
Docker — multi-arch images are published to GitHub Container Registry:
docker pull ghcr.io/kurok1/mcp-server-mysql:latest
Copy config.example.yaml and adjust:
mkdir -p ~/.mcp-server-mysql
cp config.example.yaml ~/.mcp-server-mysql/config.yaml
A minimal config:
resources:
enabled: true profiles: dev: description: Development database mysql: host: 127.0.0.1 port: 3306 user: mcp_dev # use a dedicated least-privilege account, not root password: ${MYSQL_MCP_PASSWORD} database: myapp
security: allowed_statements: [select] # add insert/update/delete/ddl only if you need them table_whitelist:
Add sibling entries under profiles for other connections; each accepts the same mysql, security, and audit fields. The annotated example includes two profiles. The client examples below use this minimal config; for other configurations, pass every referenced password environment variable to the MCP process.
Claude Code:
claude mcp add mysql --env MYSQL_MCP_PASSWORD=your-password -- \
~/go/bin/mcp-server-mysql --config ~/.mcp-server-mysql/config.yaml
Claude Desktop or any JSON-configured client:
{
"mcpServers": { "mysql": { "command": "/usr/local/bin/mcp-server-mysql", "args": ["--config", "/Users/me/.mcp-server-mysql/config.yaml"], "env": { "MYSQL_MCP_PASSWORD": "..." } } } }
Docker:
{
"mcpServers": { "mysql": { "command": "docker", "args": [ "run", "-i", "--rm", "-v", "/Users/me/.mcp-server-mysql:/data", "-e", "MYSQL_MCP_PASSWORD", "ghcr.io/kurok1/mcp-server-mysql:latest", "--config", "/data/config.yaml" ], "env": { "MYSQL_MCP_PASSWORD": "..." } } } }
Docker note 1 — audit logs must live on a mounted volume. The container is destroyed with the session; if you enable audit logging, point
audit.log_dirat the mounted volume (e.g./data/logs) or the logs vanish with the container.
Docker note 2 — reaching MySQL on the host. On macOS/Windows set
mysql.host: host.docker.internal; on Linux also append"--add-host=host.docker.internal:host-gateway"toargs.
mysql_query advertises the embedded ui://mcp-server-mysql/query-results resource to hosts that support MCP Apps. Successful calls include both the existing human-readable text and structured query data with a required profile field, so older or text-only hosts degrade without losing any result information. Query errors retain their text and carry the original {profile, sql} in result metadata so the App can identify the request. list_profile also returns text and structured data; the six remaining tools use text results.
The result view keeps up to 20 snapshots inside the current View, supports global and optional status filtering, natural numeric sorting, column visibility, row selection, and TSV/CSV/JSON copy. Results and history identify their profile, including failed and cancelled requests. Refresh invokes mysql_query through the host with the selected snapshot's original {profile, sql}, including after switching history; if the host does not expose tool calling to apps, the view explains that refresh is unavailable while all read-only controls continue to work. View history is memory-only and disappe
冒頭だけを表示しています。続きはリポジトリで読めます