Model Context Protocol server for Aiven
A Model Context Protocol (MCP) server for Aiven.
This provides access to the Aiven for PostgreSQL, Kafka, ClickHouse, Valkey and OpenSearch services running in Aiven and the wider Aiven ecosystem of native connectors. Enabling LLMs to build full stack solutions for all use-cases.
list_projects
list_services
get_service_details
Open the Claude Desktop configuration file located at:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the following:
{
"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"
}
}
}
}
Update the environment variables:
$REPOSITORY_DIRECTORY
to point to the folder cointaining the repositoryAIVEN_TOKEN
to the Aiven login token.Locate the command entry for uv
and replace it with the absolute path to the uv
executable. This ensures that the correct version of uv
is used when starting the server. On a mac, you can find this path using which uv
.
Restart Claude Desktop to apply the changes.
Navigate to Cursor -> Settings -> Cursor Settings
Select "MCP Servers"
Add a new server with
mcp-aiven
command
uv --directory $REPOSITORY_DIRECTORY run --with-editable $REPOSITORY_DIRECTORY --python 3.13 mcp-aiven
Where $REPOSITORY_DIRECTORY
is the path to the repository. You might need to add the AIVEN_BASE_URL
, AIVEN_PROJECT_NAME
and AIVEN_TOKEN
as variables
.env
file in the root of the repository.AIVEN_BASE_URL=https://api.aiven.io
AIVEN_TOKEN=$AIVEN_TOKEN
Run uv sync
to install the dependencies. To install uv
follow the instructions here. Then do source .venv/bin/activate
.
For easy testing, you can run mcp dev mcp_aiven/mcp_server.py
to start the MCP server.
The following environment variables are used to configure the Aiven connection:
AIVEN_BASE_URL
: The Aiven API urlAIVEN_TOKEN
: The authentication tokenThis section outlines key developer responsibilities and security considerations when working with Model Context Protocols (MCPs) and AI Agents within this system. Self-Managed MCPs:
AI Agent Security:
API Token Best Practices:
Key Takeaways: