adk-generator-mcp-server

dhruvilp/adk-generator-mcp-server

3.2

If you are the rightful owner of adk-generator-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 henry@mcphub.com.

The Model Context Protocol (MCP) Server is a specialized server designed to facilitate communication and data exchange between machine learning models and various applications or services.

ADK Agent Code Generator MCP

Run OpenSearch Locally

docker run -it -p 9200:9200 -p 9600:9600 -e OPENSEARCH_INITIAL_ADMIN_PASSWORD=STRONG_PASSWORD -e "discovery.type=single-node"  --name opensearch-node opensearchproject/opensearch:latest

Run the MCP Server


uv sync

uv pip install -e .

python scripts/seed_opensearch.py

start-server

#or

python -m adk_mcp_server

Extra Deps


source /Users/dhruvilpatel/Documents/adk-generator-mcp-server/.venv/bin/activate && pip install --force-reinstall numpy==1.26.4

Addding MCP Server


"adkmcpserver": {
    "command": "python",
    "args": [
        "-m",
        "/../Documents/adk-generator-mcp-server"
    ]
}


Configure with Roo Code Extension

  1. Install the Roo Code extension:
    • Open VS Code.
    • Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
    • Search for "Roo Code" and install the extension.
  2. Configure the MCP server:
    • Open the Roo Code settings (Ctrl+Shift+P or Cmd+Shift+P and type "Roo Code: Open Settings").
    • Locate the mcp_settings.json file.
    • Add a new entry for the ADK MCP Server in the servers section. Use a relative path instead of an absolute path.
    • The configuration should look like this:
"adkmcpserver_stdio": {
    "command": "python",
    "args": [
        "-m",
        "adk_mcp_server"
    ]
},
"adkmcpserver_sse": {
    "command": "python",
    "args": [
        "-m",
        "adk_mcp_server"
    ],
    "stream": true
}
  1. Set environment variables:
    • Make sure you have a .env file in the root of your project directory.
    • Add the GEMINI_API_KEY and OPENSEARCH_PASSWORD to the .env file.
GEMINI_API_KEY=YOUR_GEMINI_API_KEY
OPENSEARCH_PASSWORD=YOUR_OPENSEARCH_PASSWORD
  1. Install dependencies:
    • Run uv sync to create the virtual environment.
    • Run uv pip install -e . to install the project dependencies.
  2. Seed OpenSearch:
    • Run python scripts/seed_opensearch.py to seed the OpenSearch index with data.
  3. Run the MCP server:
    • Run python -m adk_mcp_server to start the server.

Test with MCP Inspector

  1. Install the MCP Inspector tool:
    • If you don't have it already, install the MCP Inspector tool globally using npm:
npm install -g @modelcontextprotocol/inspector
  1. Run the MCP Inspector tool:
    • Run the MCP Inspector tool with the URL of your MCP server:
mcp-inspector --url http://localhost:8000/mcp
*   Replace `http://localhost:8000/mcp` with the actual URL of your MCP server.

3. Interact with the MCP Inspector tool: * The MCP Inspector tool will provide a web interface that you can use to interact with your MCP server. * You can use the tool to send requests to your MCP server and inspect the responses.

Troubleshooting: Roo Code MCP Server Config Not Recognizing Python or Server File Location

If Roo Code is unable to locate the Python executable or the server file, you may need to specify the full paths to these files in the MCP server config.

  1. Specify the full path to the Python executable:

    • Replace "python" with the full path to your Python executable (e.g., "/usr/bin/python3" or "/Users/your_username/.venv/bin/python").
  2. Specify the full path to the server file:

    • Replace "adk_mcp_server" with the full path to the adk_mcp_server module. To find the module path, you can run python -m adk_mcp_server and look at the traceback. It will show you the full path to the __main__.py file, and you should use the directory containing that file. (e.g., "/Users/your_username/Documents/adk-generator-mcp-server/adk_mcp_server").
  3. Example configuration with full paths:

"adkmcpserver": {
    "command": "/usr/bin/python3",
    "args": [
        "-m",
        "adk_mcp_server"
    ],
    "cwd": "/Users/your_username/Documents/adk-generator-mcp-server"
}