Skip to main content
Glama
MCP MySQL Server

MCP MySQL Server

MCP MySQL Server

This is a generated Model Context Protocol (MCP) server designed to interact with a MySQL database in a read-only fashion, providing schema inspection and custom query capabilities.

Setup Instructions

  1. Create a folder: Create a new directory for your server, for example, my-mcp-server.

    mkdir my-mcp-server
    cd my-mcp-server
  2. Save the files: Place package.json, tsconfig.json, index1.ts, and README.md into this new directory.

  3. Install dependencies: Open your terminal in the my-mcp-server directory and run:

    npm install
  4. Build the project: Compile the TypeScript code:

    npm run build

Related MCP server: MCP Server for MySQL

Available Tools

This server exposes the following tools:

  • list_tables(): Lists all tables in the connected MySQL database.

  • describe_table(tableName: string): Describes the columns of a specified table.

  • execute_read_query(query: string, params?: any[]): Executes a read-only SQL query (SELECT, SHOW, DESCRIBE) against the database.

With Cursor

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that provides read-only access to MySQL databases, enabling LLMs to inspect database schemas and execute read-only queries.
      20,882 npm
      2,222
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables schema introspection and safe read-only queries on MySQL databases, supporting table/column discovery, relationship exploration, and controlled SELECT queries.
      10 npm
      MIT