Skip to main content

Manage Aiven services using MCP

Use the Aiven Model Context Protocol (MCP) server to create and manage Aiven services from AI assistants, such as Cursor and Claude Code.

Prerequisites

  • An Aiven account
  • An organization with MCP access enabled
  • An MCP-compatible client, such as Cursor, Claude Code, Claude Desktop, or Visual Studio Code

MCP server URL

Use the following server URL when configuring your client:

https://mcp.aiven.live/mcp

Configure your MCP client

Add to Cursor

To add the server manually:

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

  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.

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.

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.

Security and responsibility

warning

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.

Supported tools

Service management

Create, update, and delete Aiven services across all supported service types. Browse available plans and pricing, view service metrics and logs, and manage service configurations and cloud regions.

PostgreSQL®

Create and manage PostgreSQL databases, execute read and write SQL queries, and manage PgBouncer connection pools. Get AI-powered query optimization recommendations, view query performance statistics, and list available extensions.

Apache Kafka®

Create and manage Kafka topics, produce and consume messages, and configure Kafka Connect connectors. Browse Schema Registry subjects and manage connector lifecycle operations including pause, resume, and restart.

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.