mcp-sql-server
SQL Server for MySQL, PostgreSQL, and SQLite
Documentation
SQL MCP Server for MySQL, PostgreSQL, and SQLite Databases
This is a powerful MCP (Model Context Protocol) server designed for seamless interaction with SQL databases, including MySQL, PostgreSQL, and SQLite. It simplifies how to connect to database MySQL and other SQL types, making it an ideal solution for developers looking for an efficient mcp mysql database integration.
Whether you're building a new application or integrating with existing systems, this server provides the tools you need for managing your data.
Features
This mcp mysql tutorial will guide you through its core functionalities.
Tools
- `execute_sql_query` - Execute SQL queries on a specified database. This tool is essential for running direct commands and is perfect for a mcp mysql github project or any environment where direct SQL execution is needed.
- Parameters:
- `dbType`: Type of the database (mysql, postgresql or sqlite).
- `connectionString`: Connection string for the database (file path for sqlite).
- `query`: SQL query to execute.
- Parameters:
- `insert_data` - Insert data into a specified table.
- Parameters:
- `dbType`: Type of the database (mysql, postgresql or sqlite).
- `connectionString`: Connection string for the database (file path for sqlite).
- `tableName`: Name of the table to insert into.
- `data`: JSON object representing the data to insert (key-value pairs).
- Parameters:
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchInstallation
To use this mcp mysql server with your editor, you will generally need to configure it to recognize the server. The core principle involves providing the editor with the command to run the compiled server, typically located at `build/index.js`.
Configuration Examples:
Claude Desktop:
- MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%/Claude/claude_desktop_config.json`
{
"mcpServers": {
"sql": {
"command": "/path/to/sql/build/index.js"
}
}
}Other MCP-compatible editors:
The exact configuration method may vary, but here are some common locations for configuration files:
- Roo Code: `%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json`
- Cursor: `%HOMEPATH%\.cursor` (look for a relevant configuration file within this directory, e.g., `mcp_settings.json` or similar). This setup allows seamless mcp mysql cursor integration.
Consult your editor's official documentation for detailed instructions on adding custom MCP servers.
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Features
Tools
- `execute_sql_query` - Execute SQL queries on a specified database.
- Parameters:
- `dbType`: Type of the database (mysql, postgresql or sqlite).
- `connectionString`: Connection string for the database (file path for sqlite).
- `query`: SQL query to execute.
- Parameters:
- `insert_data` - Insert data into a specified table.
- Parameters:
- `dbType`: Type of the database (mysql, postgresql or sqlite).
- `connectionString`: Connection string for the database (file path for sqlite).
- `tableName`: Name of the table to insert into.
- `data`: JSON object representing the data to insert (key-value pairs).
- Parameters:
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchInstallation
To use this MCP server with your editor, you will generally need to configure it to recognize the server. The core principle involves providing the editor with the command to run the compiled server, typically located at `build/index.js`.
Configuration Examples:
Claude Desktop:
- MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%/Claude/claude_desktop_config.json`
{
"mcpServers": {
"sql": {
"command": "/path/to/sql/build/index.js"
}
}
}Other MCP-compatible editors:
The exact configuration method may vary, but here are some common locations for configuration files:
- Roo Code: `%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json`
- Cursor: `%HOMEPATH%\.cursor` (look for a relevant configuration file within this directory, e.g., `mcp_settings.json` or similar)
Consult your editor's official documentation for detailed instructions on adding custom MCP servers.
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Frequently asked questions
What is mcp-sql-server?
mcp-sql-server is SQL Server for MySQL, PostgreSQL, and SQLite
How do I install mcp-sql-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-sql-server open source?
Yes — it is hosted on GitHub at https://github.com/VlaadislavKr/mcp-sql-server and has 3 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP