MCP-MongoDB-MySQL-Server logo

MCP-MongoDB-MySQL-Server

by yaoxiaolinglong

This is a Model Context Protocol server that provides MySQL and MongoDB database operations. It enables AI models to interact with MySQL and MongoDB databases through a standardized interface.

View on GitHub

Last updated: N/A

What is MCP-MongoDB-MySQL-Server?

A Model Context Protocol server that provides MySQL and MongoDB database operations, enabling AI models to interact with these databases through a standardized interface.

How to use MCP-MongoDB-MySQL-Server?

Install via Smithery or manually by cloning the project, building it, and adding the server in Cursor IDE settings. Configure database connections using .env files or direct connection via tools. Use available tools for MySQL and MongoDB operations.

Key features of MCP-MongoDB-MySQL-Server

  • Multiple connection methods (URL, workspace, direct parameters)

  • Support for both MySQL and MongoDB databases

  • Secure connection handling with automatic cleanup

  • Prepared statement support for MySQL query parameters

  • Schema management tools for both databases

  • Comprehensive error handling and validation

  • TypeScript support

  • Automatic workspace detection

Use cases of MCP-MongoDB-MySQL-Server

  • Connecting AI models to MySQL databases for data retrieval and manipulation

  • Connecting AI models to MongoDB databases for data retrieval and manipulation

  • Building applications that require both relational and NoSQL database support

  • Automating database tasks using AI agents

FAQ from MCP-MongoDB-MySQL-Server

How do I configure the MySQL database connection?

You can configure the MySQL database connection in three ways: using a database URL in the .env file, using individual parameters in the .env file, or through direct connection via tool.

How do I configure the MongoDB database connection?

You can configure the MongoDB database connection in two ways: using a MongoDB URL in the .env file, or through direct connection via tool.

What MySQL tools are available?

Available MySQL tools include connect_db, query, execute, list_tables, describe_table, create_table, and add_column.

What MongoDB tools are available?

Available MongoDB tools include connect_mongodb, mongodb_list_collections, mongodb_find, mongodb_insert, mongodb_update, mongodb_delete, and mongodb_create_collection.

How does this server handle security?

The server uses prepared statements in MySQL to prevent SQL injection, supports secure password handling through environment variables, validates queries and operations before execution, and automatically closes connections when done.

MCP-MongoDB-MySQL-Server - MCP Server | MCP Directory