@enemyrr/mcp-mysql-server
MySQL ๋ฐ์ดํฐ๋ฒ ์ด์ค ์์ ์ ์ ๊ณตํ๋ ๋ชจ๋ธ ์ปจํ ์คํธ ํ๋กํ ์ฝ ์๋ฒ์ ๋๋ค. ์ด ์๋ฒ๋ฅผ ํตํด AI ๋ชจ๋ธ์ ํ์คํ๋ ์ธํฐํ์ด์ค๋ฅผ ํตํด MySQL ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ํธ ์์ฉํ ์ ์์ต๋๋ค.
์ปค์ IDE ์ค์น ๋ฐ ์ค์
Smithery๋ฅผ ํตํด ์ค์น
Smithery๋ฅผ ํตํด Claude Desktop์ฉ MySQL ๋ฐ์ดํฐ๋ฒ ์ด์ค ์๋ฒ๋ฅผ ์๋์ผ๋ก ์ค์นํ๋ ค๋ฉด:
์ง์์คํผ1
์๋ ์ค์น
ํ๋ก์ ํธ๋ฅผ ๋ณต์ ํ๊ณ ๋น๋ํฉ๋๋ค.
git clone https://github.com/enemyrr/mcp-mysql-server.git
cd mcp-mysql-server
npm install
npm run build์ปค์ IDE ์ค์ ์ ์๋ฒ๋ฅผ ์ถ๊ฐํฉ๋๋ค.
๋ช ๋ น ํ๋ ํธ ์ด๊ธฐ(Cmd/Ctrl + Shift + P)
"MCP: ์๋ฒ ์ถ๊ฐ"๋ฅผ ๊ฒ์ํ์ธ์
๋ค์ ํ๋๋ฅผ ์ฑ์์ฃผ์ธ์:
์ด๋ฆ:
mysql์ ํ:
command๋ช ๋ น์ด:
node /absolute/path/to/mcp-mysql-server/build/index.js
์ฐธ๊ณ :
/absolute/path/to/ํ๋ก์ ํธ๋ฅผ ๋ณต์ ํ๊ณ ๋น๋ํ ์ค์ ๊ฒฝ๋ก๋ก ๋ฐ๊พธ์ธ์.
Related MCP server: MCP MySQL Server
๋ฐ์ดํฐ๋ฒ ์ด์ค ๊ตฌ์ฑ
๋ฐ์ดํฐ๋ฒ ์ด์ค ์ฐ๊ฒฐ์ ์ธ ๊ฐ์ง ๋ฐฉ๋ฒ์ผ๋ก ๊ตฌ์ฑํ ์ ์์ต๋๋ค.
.env์ ๋ฐ์ดํฐ๋ฒ ์ด์ค URL (๊ถ์ฅ):
DATABASE_URL=mysql://user:password@host:3306/database.env์ ๊ฐ๋ณ ๋งค๊ฐ๋ณ์ :
DB_HOST=localhost
DB_USER=your_user
DB_PASSWORD=your_password
DB_DATABASE=your_database๋๊ตฌ๋ฅผ ํตํ ์ง์ ์ฐ๊ฒฐ :
use_mcp_tool({
server_name: "mysql",
tool_name: "connect_db",
arguments: {
url: "mysql://user:password@host:3306/database"
// OR
workspace: "/path/to/your/project" // Will use project's .env
// OR
host: "localhost",
user: "your_user",
password: "your_password",
database: "your_database"
}
});์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ
1. ์ฐ๊ฒฐ_DB
URL, ์์ ๊ณต๊ฐ ๊ฒฝ๋ก ๋๋ ์ง์ ์๊ฒฉ ์ฆ๋ช ์ ์ฌ์ฉํ์ฌ MySQL ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ฐ๊ฒฐํฉ๋๋ค.
2. ์ง์
์ ํ์ ์ผ๋ก ์ค๋น๋ ๋ช ๋ น๋ฌธ ๋งค๊ฐ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ SELECT ์ฟผ๋ฆฌ๋ฅผ ์คํํฉ๋๋ค.
use_mcp_tool({
server_name: "mysql",
tool_name: "query",
arguments: {
sql: "SELECT * FROM users WHERE id = ?",
params: [1]
}
});3. ์คํํ๋ค
์ ํ์ ์ผ๋ก ์ค๋น๋ ๋ช ๋ น๋ฌธ ๋งค๊ฐ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ INSERT, UPDATE ๋๋ DELETE ์ฟผ๋ฆฌ๋ฅผ ์คํํฉ๋๋ค.
use_mcp_tool({
server_name: "mysql",
tool_name: "execute",
arguments: {
sql: "INSERT INTO users (name, email) VALUES (?, ?)",
params: ["John Doe", "john@example.com"]
}
});4. ๋ฆฌ์คํธ_ํ ์ด๋ธ
์ฐ๊ฒฐ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์๋ ๋ชจ๋ ํ ์ด๋ธ์ ๋์ดํฉ๋๋ค.
use_mcp_tool({
server_name: "mysql",
tool_name: "list_tables"
});5. ์ค๋ช _ํ ์ด๋ธ
ํน์ ํ ์ด๋ธ์ ๊ตฌ์กฐ๋ฅผ ๊ฐ์ ธ์ต๋๋ค.
use_mcp_tool({
server_name: "mysql",
tool_name: "describe_table",
arguments: {
table: "users"
}
});6. ํ ์ด๋ธ ์์ฑ
์ง์ ๋ ํ๋์ ์ธ๋ฑ์ค๋ก ์ ํ ์ด๋ธ์ ๋ง๋ญ๋๋ค.
use_mcp_tool({
server_name: "mysql",
tool_name: "create_table",
arguments: {
table: "users",
fields: [
{
name: "id",
type: "int",
autoIncrement: true,
primary: true
},
{
name: "email",
type: "varchar",
length: 255,
nullable: false
}
],
indexes: [
{
name: "email_idx",
columns: ["email"],
unique: true
}
]
}
});7. ์ด ์ถ๊ฐ
๊ธฐ์กด ํ์ ์ ์ด์ ์ถ๊ฐํฉ๋๋ค.
use_mcp_tool({
server_name: "mysql",
tool_name: "add_column",
arguments: {
table: "users",
field: {
name: "phone",
type: "varchar",
length: 20,
nullable: true
}
}
});ํน์ง
๋ค์ํ ์ฐ๊ฒฐ ๋ฐฉ์(URL, ์ํฌ์คํ์ด์ค, ์ง์ )
์๋ ์ ๋ฆฌ๋ฅผ ํตํ ์์ ํ ์ฐ๊ฒฐ ์ฒ๋ฆฌ
์ฟผ๋ฆฌ ๋งค๊ฐ๋ณ์์ ๋ํ ์ค๋น๋ ๋ช ๋ น๋ฌธ ์ง์
์คํค๋ง ๊ด๋ฆฌ ๋๊ตฌ
ํฌ๊ด์ ์ธ ์ค๋ฅ ์ฒ๋ฆฌ ๋ฐ ๊ฒ์ฆ
TypeScript ์ง์
์๋ ์์ ๊ณต๊ฐ ๊ฐ์ง
๋ณด์
SQL ์ฃผ์ ์ ๋ฐฉ์งํ๊ธฐ ์ํด ์ค๋น๋ ๋ช ๋ น๋ฌธ์ ์ฌ์ฉํฉ๋๋ค.
ํ๊ฒฝ ๋ณ์๋ฅผ ํตํด ์์ ํ ์ํธ ์ฒ๋ฆฌ๋ฅผ ์ง์ํฉ๋๋ค.
์คํ ์ ์ ์ฟผ๋ฆฌ๋ฅผ ๊ฒ์ฆํฉ๋๋ค.
์๋ฃ๋๋ฉด ์๋์ผ๋ก ์ฐ๊ฒฐ์ ๋ซ์ต๋๋ค.
์ค๋ฅ ์ฒ๋ฆฌ
์๋ฒ๋ ๋ค์์ ๋ํ ์์ธํ ์ค๋ฅ ๋ฉ์์ง๋ฅผ ์ ๊ณตํฉ๋๋ค.
์ฐ๊ฒฐ ์คํจ
์๋ชป๋ ์ฟผ๋ฆฌ ๋๋ ๋งค๊ฐ๋ณ์
๊ตฌ์ฑ์ด ๋๋ฝ๋์์ต๋๋ค
๋ฐ์ดํฐ๋ฒ ์ด์ค ์ค๋ฅ
์คํค๋ง ๊ฒ์ฆ ์ค๋ฅ
๊ธฐ์ฌํ๋ค
๊ธฐ์ฌ๋ฅผ ํ์ํฉ๋๋ค! https://github.com/enemyrr/mcp-mysql-server ์ ํ ๋ฆฌํ์คํธ๋ฅผ ์ ์ถํด ์ฃผ์ธ์.
ํนํ
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kevinbin/mcp-mysql-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
