how to use in cursor
Any one know how to setup in cursor MCP
@ManojINaik
I haven't personally tested mysql_mcp_server in Cursor yet, but it should just work if correctly configured. https://docs.cursor.com/context/model-context-protocol
Note: MCP tools may not work with all models. MCP tools are only available to the Agent in Composer.
Just tried, but could not get it working in cursor. Need instructions.
What models did you try it with @mowliv?
Claude 3.7 thinking, but I never got past the MCP settings window which said connection refused. I tried port 8000 and 8080. It wasn't clear to me whether the URL would be just http://localhost or http://localhost/sse. I tried some variants.
[image: image.png]
On Thu, Mar 6, 2025 at 2:39 PM Dana K. Williams @.***> wrote:
What models did you try it with @mowliv https://github.com/mowliv?
— Reply to this email directly, view it on GitHub https://github.com/designcomputer/mysql_mcp_server/issues/6#issuecomment-2705098937, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDDXTMFB6VD2GCIDLDDELD2TDFBBAVCNFSM6AAAAABXNZVAI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBVGA4TQOJTG4 . You are receiving this because you were mentioned.Message ID: @.***> [image: designcomputer]designcomputer left a comment (designcomputer/mysql_mcp_server#6) https://github.com/designcomputer/mysql_mcp_server/issues/6#issuecomment-2705098937
What models did you try it with @mowliv https://github.com/mowliv?
— Reply to this email directly, view it on GitHub https://github.com/designcomputer/mysql_mcp_server/issues/6#issuecomment-2705098937, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDDXTMFB6VD2GCIDLDDELD2TDFBBAVCNFSM6AAAAABXNZVAI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBVGA4TQOJTG4 . You are receiving this because you were mentioned.Message ID: @.***>
@mowliv Have you tried creating a simple example using just the Claude App?
No, I haven't.
On Thu, Mar 6, 2025 at 3:46 PM Dana K. Williams @.***> wrote:
@mowliv https://github.com/mowliv Have you tried creating a simple example using just the Claude App?
— Reply to this email directly, view it on GitHub https://github.com/designcomputer/mysql_mcp_server/issues/6#issuecomment-2705187064, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDDXTMTWJAW4QNGIY2XGLL2TDM3RAVCNFSM6AAAAABXNZVAI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBVGE4DOMBWGQ . You are receiving this because you were mentioned.Message ID: @.***> [image: designcomputer]designcomputer left a comment (designcomputer/mysql_mcp_server#6) https://github.com/designcomputer/mysql_mcp_server/issues/6#issuecomment-2705187064
@mowliv https://github.com/mowliv Have you tried creating a simple example using just the Claude App?
— Reply to this email directly, view it on GitHub https://github.com/designcomputer/mysql_mcp_server/issues/6#issuecomment-2705187064, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDDXTMTWJAW4QNGIY2XGLL2TDM3RAVCNFSM6AAAAABXNZVAI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBVGE4DOMBWGQ . You are receiving this because you were mentioned.Message ID: @.***>
@mowliv Please try that because that may help you find any problem with the mysql_mcp_server or MySQL server settings.
I tried wrapping the command in a bash script, where I export the necessary env variables. I then point the command to the bash script in cursor settings. This works with other MCP tools, but did not work here. Seems like its unable to pick up the env vars:
2025-03-10 22:46:43,301 - mysql_mcp_server - ERROR - Missing required database configuration. Please check environment variables: 2025-03-10 22:46:43,301 - mysql_mcp_server - ERROR - MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE are required
I configured using uvx my mcp.json file looks like
{
"mcpServers": {
"mysql-mcp-server": {
"command": "uvx",
"args": [
"--from",
"mysql-mcp-server",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "",
"MYSQL_PASSWORD": "",
"MYSQL_DATABASE": ""
}
}
}
}
https://github.com/smithery-ai/typescript-sdk/issues/129 any luck on cursor I still can't get it to work
Cursor + MAMP + macOSX Setup Working Guide
Problem:
Initially, my mysql command wasn't found:
mysql -h 127.0.0.1 -P 3306 -u root -proot -e "SELECT 1"
zsh: command not found: mysql
Fix:
I added the MAMP MySQL binary path to my shell configuration:
vim ~/.zshrc
# Add this line
export PATH="/Applications/MAMP/Library/bin:$PATH"
# Apply the changes
source ~/.zshrc
Success:
Now the command works:
mysql -h 127.0.0.1 -P 3306 -u root -proot -e "SELECT 1"
mysql: [Warning] Using a password on the command line interface can be insecure.
+---+
| 1 |
+---+
| 1 |
+---+
Next Step:
Ensure uvx is installed. Then I ran the following to start the MySQL MCP server:
MYSQL_HOST=127.0.0.1 \
MYSQL_PORT=3306 \
MYSQL_USER=root \
MYSQL_PASSWORD=your_pass \
MYSQL_DATABASE=your_db \
MYSQL_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock \
MYSQL_AUTH_PLUGIN=mysql_native_password \
MYSQL_CONNECT_TIMEOUT=30 \
MYSQL_USE_PURE=True \
MYSQL_RAISE_ON_WARNINGS=True \
uvx --from mysql-mcp-server mysql_mcp_server
Output:
Starting MySQL MCP server with config:
Host: 127.0.0.1
Port: 3306
User: root
Database: your_db
2025-04-22 14:42:44,096 - mysql_mcp_server - INFO - Starting MySQL MCP server...
2025-04-22 14:42:44,096 - mysql_mcp_server - INFO - Database config: 127.0.0.1/jazz_hr as root
Final Config:
This JSON config worked as expected:
{
"mcpServers": {
"MySQL MCP Server": {
"command": "uvx",
"type": "stdio",
"args": [
"--from",
"mysql-mcp-server",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "your_pass",
"MYSQL_DATABASE": "your_db",
"MYSQL_SOCKET": "/Applications/MAMP/tmp/mysql/mysql.sock",
"MYSQL_AUTH_PLUGIN": "mysql_native_password",
"MYSQL_CONNECT_TIMEOUT": "30",
"MYSQL_USE_PURE": "True",
"MYSQL_RAISE_ON_WARNINGS": "True"
}
}
}
}