GitHubスター
0
ユーザー評価
未評価
お気に入り
0
閲覧数
7
フォーク
0
イシュー
0
README
MySQL MCP Server
A simple Model Context Protocol (MCP) server that connects to your MySQL database and provides tools for database exploration and querying.
Installation
Clone or download this repository
Install dependencies:
npm install
Copy the environment file and configure your database:
cp .env.example .env
Edit
.env
with your MySQL database credentials:DB_HOST=localhost DB_PORT=3306 DB_USER=your_username DB_PASSWORD=your_password DB_NAME=your_database
Building and Running
- Build the TypeScript code:
$ npm run build $ npm start
MCP Client Configuration
Add this server to your MCP client configuration. For example for gemini create .gemini/settings.json
:
{
"mcpServers": [
{
"name": "mcpsql",
"command": "node",
"args": ["/path/to/your/mcp/server/dist/server.js"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "3306",
"DB_USER": "db_user",
"DB_PASSWORD": "db_pass",
"DB_NAME": "db_name"
}
}
]
}