Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Just A Mysql

БесплатноНе проверен

Read-only MySQL MCP server that lets AI agents list tables, describe schemas, and run SELECT/SHOW/EXPLAIN queries with a row cap, bound to a single database for

GitHubEmbed

Описание

Read-only MySQL MCP server that lets AI agents list tables, describe schemas, and run SELECT/SHOW/EXPLAIN queries with a row cap, bound to a single database for safety.

README

Browse MySQL schema and run read-only SQL from your AI agent.

Read-only by design. Tools never INSERT / UPDATE / DELETE / DDL. An agent writing to the wrong table or environment can cause production-level incidents. Just because we can doesn't mean we should. Prefer a MySQL account that is itself read-only.

What it does

  • Database scope — Allowlist + Default Database for this process
  • List tables — names in one Allowlisted Database
  • Describe a table — columns and types (explicit Database + table)
  • Run a query — one read-only statement (SELECT / WITH…SELECT, SHOW, DESCRIBE/DESC, EXPLAIN), with a hard row cap; visited Databases must be on the Allowlist

One MCP process is bound to an Allowlist of Databases (MYSQL_DATABASE: one name or a comma-separated list). Size one is strict single-Database; size many permits exactly those names.

Requirements

  • uvbrew install uv
  • MySQL 5.7+ / 8.x reachable over TCP

Setup

1. Clone and install

git clone https://github.com/xingyuli/just-a-mysql-mcp
cd just-a-mysql-mcp
uv sync

2. Add to your AI agent

Single Database:

{
  "mcpServers": {
    "mysql": {
      "command": "uv",
      "args": [
        "--directory", "/path/to/just-a-mysql-mcp",
        "run", "mysql_mcp_server.py"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "readonly_user",
        "MYSQL_PASSWORD": "secret",
        "MYSQL_DATABASE": "your_database"
      }
    }
  }
}

Multiple Databases (stable Allowlist order; optional default override):

"env": {
  "MYSQL_HOST": "127.0.0.1",
  "MYSQL_PORT": "3306",
  "MYSQL_USER": "readonly_user",
  "MYSQL_PASSWORD": "secret",
  "MYSQL_DATABASE": "app_dev,billing_dev",
  "MYSQL_DEFAULT_DATABASE": "billing_dev"
}

Shell exports work too:

"MYSQL_HOST": "${MYSQL_DEV_HOST}",
"MYSQL_USER": "${MYSQL_DEV_USER}",
"MYSQL_PASSWORD": "${MYSQL_DEV_PASSWORD}",
"MYSQL_DATABASE": "app_dev"

3. Restart the agent and ask things like:

  • "What databases are in scope?"
  • "List tables in app_dev"
  • "Describe users in app_dev"
  • "Select the 10 most recent rows from …"

Configuration

Variable Required Default Notes
MYSQL_HOST No 127.0.0.1
MYSQL_PORT No 3306
MYSQL_USER Yes
MYSQL_PASSWORD Yes No short alias
MYSQL_DATABASE Yes One name or comma-separated Allowlist
MYSQL_DEFAULT_DATABASE No First name in MYSQL_DATABASE Must be on the Allowlist

Safety summary

Rule Behavior
Writes Rejected by the MCP; use a read-only DB user too
Statements Exactly one per mysql_query call
Statement types SELECT, WITH, SHOW, DESCRIBE/DESC, EXPLAIN
Database scope sqlglot visit check ⊆ Allowlist; unqualified → Default Database; USE rejected; parse errors fail closed
Row cap Default 100, max 1000; truncation is explicit

Design notes: CONTEXT.md, docs/adr/0001-v1-design.md, docs/adr/0002-database-allowlist.md.


For local development and tests, see DEVELOPMENT.md.

from github.com/xingyuli/just-a-mysql-mcp

Установка Just A Mysql

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/xingyuli/just-a-mysql-mcp

FAQ

Just A Mysql MCP бесплатный?

Да, Just A Mysql MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Just A Mysql?

Нет, Just A Mysql работает без API-ключей и переменных окружения.

Just A Mysql — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить Just A Mysql в Claude Desktop, Claude Code или Cursor?

Открой Just A Mysql на 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-devавтор: wenb1n-dev

Postgres Server

This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools

madhurprashавтор: madhurprash

Postgres

Query your database in natural language

Anthropicавтор: Anthropic

PostgreSQL

Read-only database access with schema inspection.

modelcontextprotocolавтор: modelcontextprotocol

Redis

Interact with Redis key-value stores.

modelcontextprotocolавтор: modelcontextprotocol

SQLite

Database interaction and business intelligence capabilities.

modelcontextprotocolавтор: modelcontextprotocol

mxcp

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-labsавтор: raw-labs

tadas-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-githubавтор: tadas-github

julien040/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

julien040автор: julien040

drakonkat/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.

drakonkatавтор: drakonkat

Compare Just A Mysql with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории data