Skip to main content

Aiven MCP

Aiven offers two Model Context Protocol (MCP) servers for use with AI assistants:

  • Aiven MCP server: Create and manage Aiven services directly from AI assistants such as Cursor and Claude Code. Use this to create services like PostgreSQL® and Apache Kafka®, deploy apps, run queries, and manage your resources.
  • Documentation MCP server: Access Aiven documentation from MCP-compatible clients. Use this to get answers about Aiven features and troubleshooting from within your AI assistant.

Aiven MCP server

Use the Aiven MCP server to create and manage Aiven services from AI assistants, such as Cursor and Claude Code. You can create, update, and delete Aiven services across all supported service types. It also supports browsing available plans and pricing, viewing service metrics and logs, and managing service configurations and cloud regions. Supported services and features include:

  • PostgreSQL®: Create and manage databases, execute SQL queries, manage PgBouncer connection pools, get AI-powered query optimization recommendations, view query performance statistics, and list available extensions.
  • Apache Kafka®: Create and manage topics, produce and consume messages, configure Kafka Connect connectors, browse Schema Registry subjects, and manage connector lifecycle operations including pause, resume, and restart.

To restrict the server to non-destructive operations, you can enable read-only mode.

Authentication

The Aiven MCP server uses OAuth 2.0 with Proof Key for Code Exchange (PKCE) for authentication. The first time you use the server, your browser opens so you can sign in to Aiven and select your organization. The server refreshes tokens automatically.

Prerequisites

  • An Aiven account
  • An MCP-compatible client, such as Cursor, Claude Code, Claude Desktop, or Visual Studio Code (VS Code)

Configure your MCP client

Add to Cursor

To add the server manually:

  1. In your project root, create or edit the .cursor/mcp.json file.

  2. Add the following configuration:

    {
    "mcpServers": {
    "aiven": {
    "type": "http",
    "url": "https://mcp.aiven.live/mcp"
    }
    }
    }
  3. Save the file.

  4. Restart Cursor.

  5. Open Settings > Tools & MCP.

  6. Select aiven and click Connect.

For more information, see the Cursor MCP documentation.

Verify the connection

  1. Open Cursor Chat with Cmd+L on macOS or Ctrl+L on Windows/Linux.

  2. Try a prompt such as:

    List my Aiven projects.

  3. If prompted to allow tool execution, click Allow.

  4. To confirm the server is registered, go to Settings > Tools & MCP and check that aiven appears with a connected status.

Security and responsibility

important

MCP tools can perform destructive operations on your Aiven services, including creating, modifying, and deleting services, databases, topics, and data. AI agents can run operations from natural language prompts that are easy to misinterpret. Using the Aiven MCP server can result in damage to or loss of data. Whether to enable MCP access is your organization's decision. Evaluate the risks before you grant AI agents access to your resources.

Under the shared responsibility model, security and compliance for MCP usage are shared between Aiven and your organization. Aiven secures the platform and API. You are responsible for the following:

  • Deciding whether to enable MCP in your organization and evaluating the associated risks.
  • Controlling access by scoping API tokens to the minimum permissions needed (principle of least privilege) and rotating them regularly.
  • Reviewing AI agent actions before they run, especially for write or delete operations on production resources.
  • Configuring MCP servers securely, including choosing read-only mode where appropriate to restrict the server to non-destructive operations.

Read-only mode

To restrict the server to read-only operations, set the AIVEN_READ_ONLY environment variable to true in your MCP client configuration:

{
"mcpServers": {
"aiven": {
"type": "http",
"url": "https://mcp.aiven.live/mcp",
"env": {
"AIVEN_READ_ONLY": "true"
}
}
}
}

In read-only mode, the server only allows operations that read data, such as listing services, viewing metrics, and running SELECT queries. The server blocks write operations, such as creating services or modifying data.

Documentation MCP server

The Aiven documentation MCP server lets you access Aiven documentation from MCP-compatible clients. The server is hosted by Kapa and retrieves content from the latest published documentation.

Prerequisites

  • An MCP-compatible client
  • A Google account for authentication (required by some clients)

MCP server URL

Use the following server URL when configuring your client:

https://aiven-docs.mcp.kapa.ai

Configure your MCP client

  1. In your project root, create or edit the .cursor/mcp.json file.

  2. Add the following configuration:

    {
    "mcpServers": {
    "aiven-docs": {
    "type": "http",
    "url": "https://aiven-docs.mcp.kapa.ai"
    }
    }
    }
  3. Save the file.

  4. Restart Cursor.

  5. Open Settings > Tools & MCP.

  6. Select aiven-docs and click Connect.

  7. Sign in with your Google account when prompted.

For more information, see the Cursor MCP documentation.

Verify the connection

After connecting the MCP server:

  1. Open your AI client, such as Copilot Chat in VS Code or Chat in Cursor.

  2. Ask a question about Aiven documentation, such as:

    • How do I create a topic in Aiven for Apache Kafka®?
    • How do I migrate snapshot data to Aiven for OpenSearch®?
  3. If prompted to allow tool execution, click Allow.

  4. Confirm that the response includes references to Aiven documentation.

If the response includes references to Aiven documentation, the MCP server is connected.