MySQL MCP Server

MCP Server for MySQL

Local serverstdio

What is the MySQL MCP Server?

MCP Server for MySQL

What the server does

The server exposes several tools via MCP for database interaction. All tools are designed for read-only operations.

This project provides a read-only Model Context Protocol (MCP) server for interacting with MySQL & PostgreSQL databases. It allows clients compatible with MCP to inspect database schemas, retrieve metadata, and execute read-only SQL queries through a set of defined tools. The server is built with extensibility in mind and enforces read-only operations for safety.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Configuration

VariableDescriptionRequired
MYSQL_HOSTEndpoint or connection string the server talks to.Optional
MYSQL_USERConfiguration value read at startup.Optional
MYSQL_PASSWORDConfiguration value read at startup.Optional
MYSQL_PORTConfiguration value read at startup.Optional
PG_HOSTEndpoint or connection string the server talks to.Optional
PG_USERConfiguration value read at startup.Optional
PG_PASSWORDConfiguration value read at startup.Optional
PG_PORTConfiguration value read at startup.Optional

Frequently asked questions

Yes, all operations are read-only to prevent data modification.