datasource-mcp
Provides tools for executing SQL queries against a MySQL database, returning results as JSON.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datasource-mcpShow me the top 10 customers by total spending"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
datasource-mcp
MySQL datasource MCP server for AI clients (Cursor, Claude Desktop, etc.).
Install
pip install datasource-mcp
# or
uvx datasource-mcpRelated MCP server: mcp-db-server
Cursor / MCP Client Config
{
"mcpServers": {
"datasource-mcp": {
"command": "datasource-mcp",
"env": {
"DB_HOST": "127.0.0.1",
"DB_PORT": "3306",
"DB_USER": "root",
"DB_PASSWORD": "your_password",
"DB_NAME": "your_database"
}
}
}
}Environment Variables
Variable | Default | Description |
|
| MySQL host |
|
| MySQL port |
|
| MySQL user |
|
| MySQL password |
|
| Database name |
|
| Connection timeout (seconds) |
Tools
db_exe
Execute SQL and return a JSON string:
{"success": true, "row_count": 1, "truncated": false, "rows": [...]}Local Development
uv sync
uv run datasource-mcp
# or
uv run python -m datasource_mcpThis server cannot be installed
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/wangguoxi0814/datasource-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server