SQL Server for MySQL, PostgreSQL, and SQLite
A server for making queries to MySQL, PostgreSQL, and SQLite databases.
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 install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Installation
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.jsonor 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 inspector
The 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 install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Installation
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.jsonor 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 inspector
The Inspector will provide a URL to access debugging tools in your browser.
Related Servers
Nodit MCP Server
Provides structured, context-ready blockchain data across multiple networks through Nodit's Web3 infrastructure.
LoL Data MCP Server
Provides real-time, structured access to League of Legends game data, including champions, items, abilities, game mechanics, and patch information.
Weaviate MCP Client
An MCP client for connecting to and interacting with a Weaviate vector database.
SQL Server Express
An MCP server for interacting with Microsoft SQL Server Express databases.
Billy MCP Client
Access live U.S. congressional data from the Congress.gov API.
TalkHub Store
Integrates with Supabase to allow AI assistants to access and manage store data.
CData Avalara AvaTax
A read-only MCP server for querying live Avalara AvaTax data. Powered by the CData JDBC Driver.
Ashare-MCP
A stock market data service for querying A-share market data from Sina and Tencent Finance.
PawSQL MCP Server
A SQL optimization service providing performance analysis and optimization suggestions through an API.
Supermarket Database
A dockerized PostgreSQL database project for a supermarket data schema, with MCP integration for Claude Desktop.