Aiven MCP Server Setup Guide

Configuration for Claude Desktop
  1. Locate the Configuration File:

    • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the Following Configuration:

    {
      "mcpServers": {
      "mcp-aiven": {
      "command": "uv",
      "args": [
      "--directory",
      "$REPOSITORY_DIRECTORY",
      "run",
      "--with-editable",
      "$REPOSITORY_DIRECTORY",
      "--python",
      "3.13",
      "mcp-aiven"
      ],
      "env": {
      "AIVEN_BASE_URL": "https://api.aiven.io",
      "AIVEN_TOKEN": "$AIVEN_TOKEN"
      }
      }
      }
     }
     
  3. Update Environment Variables:

    • Set $REPOSITORY_DIRECTORY to the folder containing the repository.
    • Set AIVEN_TOKEN to your Aiven login token.
  4. Locate and Update the uv Command:

    • Replace the uv command entry with the absolute path to the uv executable.
    • On macOS, find this path using which uv.
  5. Restart Claude Desktop:

    • Restart the application to apply the changes.

Configuration for Cursor

  1. Navigate to Settings:

    • Go to Cursor -> Settings -> Cursor Settings
  2. Add a New MCP Server:

    • Select “MCP Servers”
    • Add the following server configuration:
      • Name: mcp-aiven
      • Type: command
      • Command:
        uv --directory $REPOSITORY_DIRECTORY run --with-editable $REPOSITORY_DIRECTORY --python 3.13 mcp-aiven
         
  3. Set Environment Variables:

    • Ensure $REPOSITORY_DIRECTORY, AIVEN_BASE_URL, AIVEN_PROJECT_NAME, and AIVEN_TOKEN are configured as needed.

Development Setup

  1. Create a .env File:

    • Add the following variables to a .env file in the root of the repository:
      AIVEN_BASE_URL=https://api.aiven.io
       AIVEN_TOKEN=$AIVEN_TOKEN
       
  2. Install Dependencies:

    • Run uv sync to install the necessary dependencies.
  3. Activate the Virtual Environment:

    • Execute source .venv/bin/activate.
  4. Start the MCP Server for Testing:

    • Run the command mcp dev mcp_aiven/mcp_server.py.

Environment Variables

  • Required Variables:
    • AIVEN_BASE_URL: The Aiven API URL.
    • AIVEN_TOKEN: The authentication token.
Share this post: