mysql-server MCP Server

by xianzong85

356 downloads
Not rated
GitHub

Description

# mysql-server MCP Server A Model Context Protocol server for MySQL database access This is a TypeScript-based MCP server that provides tools for querying MySQL databases. It demonstrates core MCP concepts by providing: - Tools for executing SQL queries - Connection to MySQL…

About

# mysql-server MCP Server A Model Context Protocol server for MySQL database access This is a TypeScript-based MCP server that provides tools for querying MySQL databases. It demonstrates core MCP concepts by providing: - Tools for executing SQL queries - Connection to MySQL databases via environment variables ##…

Details

Author
xianzong85
Downloads
356
Categories
Database, Other

- Executes SQL queries via the query tool
- Accepts any SQL query string as input
- Returns query results as output
- Connects to MySQL using environment variables
- Built with TypeScript for reliability
- Supports debugging via the MCP Inspector

Install dependencies with npm install, then build the server with npm run build. Configure the environment variables MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE in your MCP host configuration (e.g., Claude Desktop’s claude_desktop_config.json). Invoke the query tool with a SQL query string to execute queries and receive results.

A Model Context Protocol server for MySQL database access

This is a TypeScript-based MCP server that provides tools for querying MySQL databases. It demonstrates core MCP concepts by providing:

- Tools for executing SQL queries
- Connection to MySQL databases via environment variables

- query- Execute SQL queries

- Takes SQL query string as required parameter
- Returns query results

Set the following environment variables in your MCP server configuration:

- MYSQL_HOST: MySQL server host
- MYSQL_USER: MySQL username
- MYSQL_PASSWORD: MySQL password
- MYSQL_DATABASE: MySQL database name

To use with Claude Desktop, add the server config:

On MacOS:~/Library/Application Support/Claude/claude_desktop_config.jsonOn Windows:%APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "mysql": { "command": "/path/to/mysql-server/build/index.js", "env": { "MYSQL_HOST": "your-mysql-host", "MYSQL_USER": "your-mysql-user", "MYSQL_PASSWORD": "your-mysql-password", "MYSQL_DATABASE": "your-mysql-database" } } } }

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using theMCP Inspector, which is available as a package script:

The Inspector will provide a URL to access debugging tools in your browser.

Multi-database agent access (PostgreSQL, SQLite, MySQL, Oracle, SQL Server) with batch queries, pre-configured connections, and SQLGlot-enforced read-only safety

A read-only MCP server for MySQL, enabling LLMs to query live data using the CData JDBC Driver.

Database MCP server for MySQL, MariaDB, PostgreSQL & SQLite

A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite

A Model Context Protocol (MCP) server that provides multi-database query execution capabilities with support for SQLite, PostgreSQL, and MySQL databases. Includes a built-in Web UI for managing database connections.

Allows Claude AI to interact directly with MySQL databases.

Update various databases (PostgreSQL, MySQL, MongoDB, SQLite) using data from CSV and Excel files.

Enables AI assistants to interact with various databases through JDBC connections.

An MCP server for retrieving data from a MariaDB database.

Access and manage MariaDB or MySQL databases using an MCP server.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.