Aiven MCP — Claude Code MCP server: setup
Connects an AI assistant to Aiven services such as PostgreSQL, Apache Kafka, and applications. Use it to inspect or manage resources from chat.
claude mcp add --env AIVEN_TOKEN=<AIVEN_TOKEN> --env AIVEN_READ_ONLY=<AIVEN_READ_ONLY> --env AIVEN_SERVICES_SCOPE=<AIVEN_SERVICES_SCOPE> --env AIVEN_ALLOW_SECRETS=<AIVEN_ALLOW_SECRETS> --transport stdio aiven-mcp -- npx -y mcp-aivenWhat Aiven MCP does
Aiven MCP lets an AI assistant operate on services in the Aiven cloud platform. It covers PostgreSQL, Apache Kafka, applications, and service discovery, with actions limited by the permissions of the authenticated Aiven account. The server can create, change, or remove services and data.
You can use Aiven’s hosted endpoint at https://mcp.aiven.live/mcp, or run the server locally with npx -y mcp-aiven. The local stdio setup needs Node.js 18+ and an Aiven API token in AIVEN_TOKEN. Without that variable, the local server will not start.
The hosted mode can expose read-only tools, restrict tools by services_scope, and allow selected write operations through an allowlist. It can also return live service credentials when secret access is enabled, so review agent actions before using it with sensitive resources.
What it helps with
- provision a PostgreSQL service in Aiven
- manage Apache Kafka topics
- deploy applications through Aiven
- inspect Aiven projects and services
- limit an agent to selected write actions
Example prompts for the agent
- Create a PostgreSQL service in my Aiven project and show its connection details.
- List the Apache Kafka topics in this service and create a new topic.
- Use read-only mode and show the Aiven services available to me.
How to install Aiven MCP
1Platform CLI
claude mcp add --env AIVEN_TOKEN=<AIVEN_TOKEN> --env AIVEN_READ_ONLY=<AIVEN_READ_ONLY> --env AIVEN_SERVICES_SCOPE=<AIVEN_SERVICES_SCOPE> --env AIVEN_ALLOW_SECRETS=<AIVEN_ALLOW_SECRETS> --transport stdio aiven-mcp -- npx -y mcp-aivenReplace <…> with your own values
2Platform CLI: remote server
claude mcp add --transport http mcp 'https://mcp.aiven.live/mcp?read_only={read_only}&services_scope={services_scope}&allow_secrets={allow_secrets}'1Platform CLI
codex mcp add aiven-mcp --env AIVEN_TOKEN=<AIVEN_TOKEN> --env AIVEN_READ_ONLY=<AIVEN_READ_ONLY> --env AIVEN_SERVICES_SCOPE=<AIVEN_SERVICES_SCOPE> --env AIVEN_ALLOW_SECRETS=<AIVEN_ALLOW_SECRETS> -- npx -y mcp-aivenReplace <…> with your own values
2Platform CLI: remote server
codex mcp add aiven-mcp --url 'https://mcp.aiven.live/mcp?read_only={read_only}&services_scope={services_scope}&allow_secrets={allow_secrets}'1Config file
{
"mcpServers": {
"aiven-mcp": {
"command": "npx",
"args": [
"-y",
"mcp-aiven"
],
"env": {
"AIVEN_TOKEN": "<AIVEN_TOKEN>",
"AIVEN_READ_ONLY": "<AIVEN_READ_ONLY>",
"AIVEN_SERVICES_SCOPE": "<AIVEN_SERVICES_SCOPE>",
"AIVEN_ALLOW_SECRETS": "<AIVEN_ALLOW_SECRETS>"
}
}
}
}Replace <…> with your own values
2Config file
{
"mcpServers": {
"aiven-mcp": {
"url": "https://mcp.aiven.live/mcp?read_only={read_only}&services_scope={services_scope}&allow_secrets={allow_secrets}"
}
}
}1Config file
{
"servers": {
"aiven-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-aiven"
],
"env": {
"AIVEN_TOKEN": "<AIVEN_TOKEN>",
"AIVEN_READ_ONLY": "<AIVEN_READ_ONLY>",
"AIVEN_SERVICES_SCOPE": "<AIVEN_SERVICES_SCOPE>",
"AIVEN_ALLOW_SECRETS": "<AIVEN_ALLOW_SECRETS>"
}
}
}
}Replace <…> with your own values
2Config file
{
"servers": {
"aiven-mcp": {
"type": "http",
"url": "https://mcp.aiven.live/mcp?read_only={read_only}&services_scope={services_scope}&allow_secrets={allow_secrets}"
}
}
}1Platform CLI
gemini mcp add -e AIVEN_TOKEN=<AIVEN_TOKEN> -e AIVEN_READ_ONLY=<AIVEN_READ_ONLY> -e AIVEN_SERVICES_SCOPE=<AIVEN_SERVICES_SCOPE> -e AIVEN_ALLOW_SECRETS=<AIVEN_ALLOW_SECRETS> aiven-mcp npx -y mcp-aivenReplace <…> with your own values
2Platform CLI: remote server
gemini mcp add -t http aiven-mcp 'https://mcp.aiven.live/mcp?read_only={read_only}&services_scope={services_scope}&allow_secrets={allow_secrets}'Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Aiven MCP
How do I install Aiven MCP in Claude Code?
For a local connection, run `claude mcp add --env AIVEN_TOKEN=<AIVEN_TOKEN> --env AIVEN_READ_ONLY=<AIVEN_READ_ONLY> --env AIVEN_SERVICES_SCOPE=<AIVEN_SERVICES_SCOPE> --env AIVEN_ALLOW_SECRETS=<AIVEN_ALLOW_SECRETS> --transport stdio aiven-mcp -- npx -y mcp-aiven`.
What does Aiven MCP do?
It connects an AI assistant to Aiven and provides tools for PostgreSQL, Apache Kafka, applications, and other Aiven services. The assistant can perform actions allowed for the authenticated account.
How can I restrict Aiven MCP actions?
Set read_only=true to remove write tools. Use write_allowlist for selected write exceptions and services_scope to limit the exposed service categories.