Get the FREE Ultimate OpenClaw Setup Guide →

mcp -mamp-mysql

MCP server from kerongon/mcp-server-mamp-mysql

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio kerongon-mcp-server-mamp-mysql node dist/server.js \
  --env MYSQL_DB="MySQL database name" \
  --env MYSQL_HOST="MySQL server host" \
  --env MYSQL_PASS="MySQL password" \
  --env MYSQL_PORT="MySQL server port" \
  --env MYSQL_USER="MySQL username" \
  --env MYSQL_SOCKET="MySQL socket path (alternative to host/port)" \
  --env MYSQL_POOL_LIMIT="Connection pool limit (default: 10)"

How to use

This MCP server exposes a MySQL database access layer to the MCP ecosystem. It provides capabilities to list database tables and their schemas, perform read-only SQL queries, and manage connections via a pool for efficiency and safety. After the MCP system initializes this server, you can interact with it through the MCP interface using the typical MCP toolset and resources that are wired to this server. Use the available MCP endpoints to discover schemas, execute safe read-only queries, and fetch results in a structured format suitable for downstream MCP clients.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your development or deployment environment
  • Git to clone the repository

Installation steps:

  1. Clone the repository git clone <repository-url>
  2. Navigate into the project directory cd kerongon-mcp-server-mamp-mysql
  3. Install dependencies npm install
  4. Build the project npm run build
  5. Configure environment variables (see Configuration section below) and run within your MCP environment where the MCP system will auto-start the server.

Environment prerequisites (example):

  • MYSQL_HOST=localhost
  • MYSQL_PORT=3306
  • MYSQL_USER=root
  • MYSQL_PASS=secret
  • MYSQL_DB=my_database
  • MYSQL_POOL_LIMIT=10

Note: The MCP system will manage starting the server; when deploying, ensure the environment variables are provided in your deployment environment if not using a container that injects them automatically.

Additional notes

Environment variables are critical for establishing the MySQL connection. Ensure host, port, user, and password are correct and that the MySQL user has access to the specified database. The pool limit controls concurrent connections; adjust it based on expected load. If using a socket path (MYSQL_SOCKET), you can omit host/port. If you encounter connection errors, verify network access, MySQL user permissions, and that the MySQL server is accepting connections from the MCP host. The server is intended for read-only queries and schema discovery; ensure your client tools enforce read-only access where appropriate.

Related MCP Servers

Sponsor this space

Reach thousands of developers