mcp-mongodb-mysql
用于mysql和mongodb的mcp
claude mcp add --transport stdio yaoxiaolinglong-mcp-mongodb-mysql-server node build/index.js
How to use
This MCP server provides a unified interface to interact with both MySQL and MongoDB databases via the Model Context Protocol. It exposes a set of built-in tools that let AI models connect to databases, run queries, and manage collections entirely through MCP tool calls. The available tools are organized into two groups: MySQL tools and MongoDB tools. MySQL tools include connecting to a database, executing selects, inserts/updates/deletes, listing tables, describing tables, and creating or altering table structures. MongoDB tools include connecting to a database, listing collections, finding documents with filters, and basic collection-level operations. To use these tools, you invoke use_mcp_tool with the appropriate server_name (mysql-mongodb), tool_name, and arguments as shown in the README examples.
How to install
Prerequisites:
- Node.js installed on your machine
- Git installed
- Access to your MCP environment (e.g., Cursor IDE or Smithery workflow)
Manual installation steps:
- Clone the repository and install dependencies
git clone https://github.com/yaoxiaolinglong/mcp-mongodb-mysql-server.git
cd mcp-mongodb-mysql-server
npm install
- Build the project (if required by the setup)
npm run build
- Run the server locally (example)
node build/index.js
- In your MCP environment, register the server as an MCP source named mysql-mongodb with the command configured accordingly (see mcp_config below).
Optional Smithery installation (automatic):
npx -y @smithery/cli install @yaoxiaolinglong/mcp-mongodb-mysql-server --client claude
- Configure database connections via environment variables or a .env file as described in the repository docs.
Additional notes
Tips:
- Ensure your environment variables (DATABASE_URL / MONGODB_URI) are correctly set to allow the server to connect to both MySQL and MongoDB.
- When using the connect tools, prefer the URL-based configuration for simplicity, but you can fall back to workspace paths or explicit credentials if needed.
- If you run into connection issues, check that your database ports are accessible from the host running the MCP server and that user credentials have the necessary privileges.
- The server name used in tools is mysql-mongodb; ensure consistency across your MCP tool calls.
- When upgrading, re-build the project to ensure latest changes (npm run build) before restarting the MCP server.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.