SQL MCP Server
Enables seamless interaction with MySQL, PostgreSQL, and SQLite databases through the Model Context Protocol. Supports executing SQL queries and inserting data across multiple database types with flexible connection string configuration.
README
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.