MCP ExplorerExplorer

Alibabacloud Apsaradb For Mongodb Mcp Server

@aliyunon a year ago
3 MIT
FreeCommunity
AI Systems

Overview

What is Alibabacloud Apsaradb For Mongodb Mcp Server

AlibabaCloud MongoDB MCP Server is a middleware that enables seamless integration between OpenAPI and MongoDB databases, providing a standardized interface for operations and resource management.

Use cases

This server can be utilized for various tasks such as creating MongoDB instances, managing network configurations, querying instance attributes, and listing databases. It is particularly useful for developers and organizations looking to manage MongoDB deployments in Alibaba Cloud efficiently.

How to use

To use the MCP server, clone the GitHub repository, configure the client with specific parameters like command, arguments, and environment variables, including access keys and the MongoDB connection string. The server can then be run to facilitate interactions with MongoDB databases.

Key features

Key features include tools for creating and managing MongoDB instances, querying detailed instance information, listing databases, and retrieving resource availability. It also integrates with Alibaba Cloud’s services such as VPC and ensures compatibility with various MongoDB operations.

Where to use

This MCP Server is intended for use in cloud environments where MongoDB is deployed on Alibaba Cloud. It’s particularly suited for developers and system administrators looking to enhance their database management capabilities through an API-driven approach.

Content

AlibabaCloud MongoDB MCP Server

AlibabaCloud MongoDB MCP Server serves as a universal interface between OpenAPI and MongoDB databases.

Configuration

Download from Github

git clone https://github.com/aliyun/alibabacloud-mongodb-mcp-server.git

Add the following configuration to the MCP client configuration file:

{
  "mcpServers": {
    "alibabacloud-mongodb": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/alibabacloud-mongodb-mcp-server/src/alibabacloud_mongodb_mcp_server",
        "run",
        "server.py"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
        "MONGODB_CONNECTION_STRING": "mongodb://username:password@ip:port/auth_db"
      },
      "transportType": "sse"
    }
  }
}

Components

Tools

  • create_db_instance: Create a MongoDB instance.
  • allocate_public_network_address: Allocate a public network address for the instance.
  • describe_replica_set_role: Query connection string and role information of a MongoDB instance.
  • describe_db_instance_attribute: Query detailed information about a specific MongoDB instance.
  • describe_db_instances: Queries all MongoDB instances in a region.
  • describe_vpcs: Query VPC list.
  • describe_vswitches: Query VSwitch list.
  • describe_available_resource: Query available resource(instance class) for MongoDB instances.
  • describe_available_zones: Query available zones for MongoDB instances.
  • list_databases: Query the size of all databases in a MongoDB instance.
  • get_top_reusable_space_collections: Get the top N collections with the most reusable space in MongoDB

Resources

None

Environment Variables

MCP Server requires the following environment variables to connect to AlibabaCloud OpenAPI or MongoDB instance:

  • ALIBABA_CLOUD_ACCESS_KEY_ID: (Required) Access key id for AlibabaCloud account.
  • ALIBABA_CLOUD_ACCESS_KEY_SECRET: (Required) Access key secret for AlibabaCloud account.
  • MONGODB_CONNECTION_STRING: (Optional) Connection string of specified MongoDB instance

Dependencies

  • Python 3.10 or higher
  • Required packages:
    • mcp >= 1.0.0
    • pymongo >= 4.12.1
    • python-dotenv >= 1.1.0
    • requests >= 2.32.3
    • alibabacloud-dds20151201 >= 9.0.0
    • alibabacloud-vpc20160428 >= 6.11.5

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers