google-adk-with-mongo-db-mcp-server

OneWhistle/google-adk-with-mongo-db-mcp-server

3.1

If you are the rightful owner of google-adk-with-mongo-db-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Model Context Protocol (MCP) server is designed to facilitate seamless integration and interaction with MongoDB using Google's AI Development Kit (ADK). It provides a robust framework for managing and querying MongoDB databases efficiently.

Google ADK MongoDB MCP Server

This project provides a MongoDB assistant using Google's ADK (AI Development Kit) with the MongoDB MCP (Model Context Protocol) server.

Setup

  1. Install dependencies:

    uv sync
    
  2. Configure MongoDB Connection:

    Create a .env file in the project root with your MongoDB connection string:

    GOOGLE_GENAI_USE_VERTEXAI=FALSE
    GOOGLE_API_KEY=
    
    # Get this from your MongoDB Atlas cluster connection string
    # Go to: https://cloud.mongodb.com → Clusters → Connect → Connect your application
    MDB_MCP_CONNECTION_STRING=mongodb+srv://username:password@cluster.mongodb.net/database
    

    Alternative: Using API Keys (if preferred):

    # Get these from https://cloud.mongodb.com/v2#/account/apiKeys
    MDB_MCP_API_CLIENT_ID=your_api_client_id
    MDB_MCP_API_CLIENT_SECRET=your_api_client_secret
    
  3. Run the agent:

    adk web
    

What was fixed

The implementation was updated to use the connection string approach which is simpler and more reliable than API keys. The MongoDB MCP server supports two authentication methods:

  1. Connection String (recommended): Direct MongoDB connection string
  2. API Keys: MongoDB Atlas API keys with MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET

The connection string approach is preferred as it's more straightforward and doesn't require API key setup in Atlas.