Labsco
MCP SERVER

MySQL MCP

by Gcluowenqiang

Query a MySQL database and generate its documentation, with the write permissions decided before you connect.

Relational SQL Databases
Summary
Decide how much SQL the agent may run before you connect it.

The three modes are the distinguishing feature: readonly by default, limited_write for data entry that must not touch schema, full_access only where you actually mean it. The documentation generators are the second reason to keep it around, because a table or a whole database gets written up in Markdown on request.

What it is

A MySQL server designed for Cursor. It reads table structure, runs SQL under one of three security modes, and generates Markdown, JSON or SQL documentation for a table or for a whole database. Query results are cached automatically.

What you get
  • The connection tested and the active security configuration reported (test_connection, get_security_info)
  • Accessible databases and their tables listed (list_schemas, list_tables), and one table's structure described in detail (describe_table)
  • SQL executed at whatever level the security mode allows (execute_query)
  • Markdown, JSON or SQL documentation generated for a table (generate_table_doc), and an overview document for an entire database (generate_database_overview)
  • Three security modes: readonly, the default, allowing only SELECT, SHOW, DESCRIBE and EXPLAIN; limited_write, adding INSERT and UPDATE while blocking DELETE, DROP, CREATE and ALTER; and full_access, allowing everything
  • Query result caching, so a repeated question does not become a repeated round trip
Requirements

Python with requirements.txt installed, and the host, port, username, password and database in the client config. MYSQL_ALLOWED_SCHEMAS limits which databases are reachable, taking * for everything the user can see, auto to discover them, or a comma-separated list. Results are capped at 1,000 rows by default, and that cap is itself configurable.