Skip to content

Commit fee6bcc

Browse files
committed
feat: aiven mcp
1 parent ea40947 commit fee6bcc

8 files changed

Lines changed: 283 additions & 2 deletions

File tree

docs/get-started.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {ButtonSecondary} from "@site/src/components/Buttons";
88
import Card from "@site/src/components/Card";
99
import Overview from "@site/static/images/content/platform/platform-overview.png";
1010
import GridContainer from "@site/src/components/GridContainer";
11+
import AI from "@site/static/images/logos/star-ai.svg";
1112
import K8sIcon from "@site/static/images/logos/kubernetes.svg";
1213
import Tabs from '@theme/Tabs';
1314
import TabItem from '@theme/TabItem';
@@ -292,6 +293,17 @@ Create a service using the Aiven CLI or API.
292293
/>
293294
</GridContainer>
294295

296+
Create and manage services using AI assistants.
297+
298+
<GridContainer columns={2}>
299+
<Card
300+
to="/docs/tools/mcp"
301+
iconComponent={AI}
302+
title="Aiven MCP server"
303+
description="Create and manage services using AI assistants like Claude and Cursor."
304+
/>
305+
</GridContainer>
306+
295307
### Step 6: Earn credits by referring others to Aiven
296308

297309
Invite colleagues and friends to sign up to Aiven.

docs/products/kafka/get-started/get-started-kafka.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,15 @@ Produce data manually to test application integrations or custom workloads.
7070
- Use this approach for development, automation, or advanced testing scenarios.
7171

7272
**Next step:** [Generate sample data manually with Docker](/docs/products/kafka/howto/generate-sample-data-manually).
73+
74+
## Create and manage Kafka using AI assistants
75+
76+
Use the [Aiven MCP server](/docs/tools/mcp) to create Kafka services, manage
77+
topics, produce and consume messages, and configure connectors from MCP-compatible
78+
clients such as Cursor, Claude Code, and VS Code.
79+
80+
- Configure the Aiven MCP server in your AI assistant.
81+
- Describe the service or operation you want in natural language.
82+
- The assistant creates and manages Kafka resources through the Aiven API.
83+
84+
**Next step:** [Set up the Aiven MCP server](/docs/tools/mcp).

docs/products/postgresql/get-started.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ Start using Aiven for PostgreSQL® by creating a service, connecting to it, and
3030
- A [personal token](https://docs.aiven.io/docs/platform/howto/create_authentication_token.html)
3131
- [psql](https://www.postgresql.org/download/) command line tool installed
3232

33+
</TabItem>
34+
<TabItem value="mcp" label="MCP">
35+
36+
- An MCP-compatible client such as Cursor, Claude Code, Claude Desktop, or VS Code
37+
- The [Aiven MCP server](/docs/tools/mcp) configured in your client
38+
3339
</TabItem>
3440
</Tabs>
3541

@@ -62,6 +68,17 @@ The following example files are also available in the
6268

6369
<TerraformApply />
6470

71+
</TabItem>
72+
<TabItem value="mcp" label="MCP">
73+
74+
Open your AI assistant and describe the service you want to create. For example:
75+
76+
> Create an Aiven for PostgreSQL service named `my-pg` in the `google-europe-west1`
77+
> region using the `hobbyist` plan.
78+
79+
The assistant uses the Aiven MCP server to create the service. For setup instructions,
80+
see [Aiven MCP server](/docs/tools/mcp).
81+
6582
</TabItem>
6683
</Tabs>
6784

docs/tools.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,16 @@ You can interact with the Aiven platform with various interfaces and tools that
4141
title="SQL query optimizer"
4242
description="Use AI to optimize your queries."
4343
/>
44+
<Card
45+
to="/docs/tools/mcp"
46+
iconComponent={AI}
47+
title="Aiven MCP server"
48+
description="Manage Aiven services from AI-powered coding assistants."
49+
/>
4450
<Card
4551
to="/docs/tools/mcp-server"
4652
iconName="dataflow02"
47-
title="MCP server"
53+
title="Documentation MCP server"
4854
description="Access Aiven documentation from MCP-compatible clients."
4955
/>
5056
</GridContainer>

docs/tools/mcp-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Connect to Aiven documentation using MCP
3-
sidebar_label: MCP server
3+
sidebar_label: Documentation MCP server
44
---
55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';

docs/tools/mcp.md

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
---
2+
title: Manage Aiven services using MCP
3+
sidebar_label: Aiven MCP server
4+
---
5+
6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
import CodeBlock from '@theme/CodeBlock';
9+
10+
{/* Update mcpUrl to change the MCP server URL across all code samples on this page. */}
11+
export const mcpUrl = "https://aiven.io/mcp";
12+
export const cursorDeepLink = `cursor://anysphere.cursor-deeplink/mcp/install?name=aiven-mcp&config=${typeof btoa !== "undefined" ? btoa(JSON.stringify({url: mcpUrl})) : ""}`;
13+
14+
The Aiven MCP server lets you manage Aiven services directly from
15+
MCP-compatible AI assistants such as Cursor, Claude Code, Claude Desktop,
16+
and GitHub Copilot. Create and configure PostgreSQL® databases, Apache Kafka®
17+
clusters, and other Aiven services using natural language.
18+
19+
## Prerequisites
20+
21+
- An [Aiven account](https://console.aiven.io/signup)
22+
- An organization with MCP access enabled
23+
- An MCP-compatible client (Cursor, Claude Code, Claude Desktop, VS Code, or similar)
24+
25+
## MCP server URL
26+
27+
Use the following server URL when configuring your client:
28+
29+
<CodeBlock language="text">{mcpUrl}</CodeBlock>
30+
31+
## Configure your MCP client
32+
33+
<Tabs groupId="mcp-clients">
34+
<TabItem value="cursor" label="Cursor" default>
35+
36+
<a
37+
href={cursorDeepLink}
38+
style={{display: 'inline-flex', alignItems: 'center', gap: '10px', padding: '10px 20px', backgroundColor: '#2d2d2d', color: 'white', borderRadius: '8px', textDecoration: 'none', fontSize: '16px', fontWeight: 500, border: 'none', lineHeight: '20px'}}
39+
>
40+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" style={{display: 'block', flex: 'none'}}>
41+
<path d="M21 7.5L12 2L3 7.5M21 7.5L12 13M21 7.5V16.5L12 22M3 7.5L12 13M3 7.5V16.5L12 22M12 13V22" stroke="currentColor" strokeWidth="2" strokeLinejoin="round" strokeLinecap="round"/>
42+
</svg>
43+
<span>Add to Cursor</span>
44+
</a>
45+
46+
<br /><br />
47+
48+
Alternatively, add it manually:
49+
50+
1. In your project root, create or edit `.cursor/mcp.json`.
51+
1. Add the following configuration:
52+
53+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {type: "http", url: mcpUrl}}}, null, 2)}</CodeBlock>
54+
55+
1. Save the file.
56+
1. Restart Cursor.
57+
1. Open **Settings** > **Tools & MCP**.
58+
1. Select **aiven** and click **Connect**.
59+
60+
</TabItem>
61+
<TabItem value="claude-code" label="Claude Code">
62+
63+
1. Open a terminal.
64+
1. Run the following command:
65+
66+
<CodeBlock language="bash">{`claude mcp add --transport http aiven ${mcpUrl}`}</CodeBlock>
67+
68+
1. Run `/mcp` in Claude Code to verify the server is registered.
69+
1. On first use, a browser window opens where you sign in to Aiven and select your organization.
70+
71+
For more information, see the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/tutorials/set-up-mcp).
72+
73+
</TabItem>
74+
<TabItem value="claude-desktop" label="Claude Desktop">
75+
76+
1. Open the Claude Desktop configuration file. If it does not exist, create it:
77+
78+
- **macOS:**
79+
`~/Library/Application Support/Claude/claude_desktop_config.json`
80+
81+
- **Windows:**
82+
`%APPDATA%\Claude\claude_desktop_config.json`
83+
84+
1. Add the following to the configuration file:
85+
86+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {type: "http", url: mcpUrl}}}, null, 2)}</CodeBlock>
87+
88+
1. Save the file and restart Claude Desktop.
89+
90+
For more information, see the [Claude Desktop MCP documentation](https://modelcontextprotocol.io/quickstart/user).
91+
92+
</TabItem>
93+
<TabItem value="vscode" label="VS Code">
94+
95+
:::note
96+
Requires Visual Studio Code 1.102 or later with the GitHub Copilot extension installed
97+
and enabled.
98+
:::
99+
100+
1. Open your workspace in Visual Studio Code.
101+
1. In the workspace root, create a `.vscode` directory if it does not exist.
102+
1. In the `.vscode` directory, create or edit `mcp.json`.
103+
1. Add the following configuration:
104+
105+
<CodeBlock language="json">{JSON.stringify({servers: {aiven: {type: "http", url: mcpUrl}}}, null, 2)}</CodeBlock>
106+
107+
1. Save the file.
108+
1. Reload Visual Studio Code.
109+
1. Open the Command Palette and run **MCP: List Servers**.
110+
1. Confirm that **aiven** appears in the list.
111+
112+
For more information, see the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).
113+
114+
</TabItem>
115+
<TabItem value="other" label="Other clients">
116+
117+
1. Open your MCP client configuration.
118+
1. Add the Aiven MCP server using the following URL:
119+
120+
<CodeBlock language="text">{mcpUrl}</CodeBlock>
121+
122+
Most clients accept a configuration similar to:
123+
124+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {url: mcpUrl}}}, null, 2)}</CodeBlock>
125+
126+
1. Save the file and restart your client.
127+
128+
Some clients require specifying the transport type, for example `"type": "http"`. Refer
129+
to your client documentation if the configuration fails.
130+
131+
</TabItem>
132+
</Tabs>
133+
134+
## Verify the connection
135+
136+
<Tabs groupId="mcp-clients">
137+
<TabItem value="cursor" label="Cursor" default>
138+
139+
1. Open Cursor Chat (**Cmd+L** on macOS, **Ctrl+L** on Windows/Linux).
140+
1. Try a prompt such as:
141+
142+
> List my Aiven projects.
143+
144+
1. If prompted to allow tool execution, click **Allow**.
145+
1. To confirm the server is registered, go to **Settings** > **Tools & MCP** and
146+
check that **aiven** appears with a connected status.
147+
148+
</TabItem>
149+
<TabItem value="claude-code" label="Claude Code">
150+
151+
1. Run `/mcp` in Claude Code to verify the server is registered.
152+
1. Try a prompt such as:
153+
154+
> List my Aiven projects.
155+
156+
1. If prompted to allow tool execution, confirm.
157+
158+
</TabItem>
159+
<TabItem value="claude-desktop" label="Claude Desktop">
160+
161+
1. Open a new conversation.
162+
1. Verify that the MCP tools icon appears in the input area.
163+
1. Try a prompt such as:
164+
165+
> List my Aiven projects.
166+
167+
1. If prompted to allow tool execution, click **Allow**.
168+
169+
</TabItem>
170+
<TabItem value="vscode" label="VS Code">
171+
172+
1. Open Copilot Chat in Visual Studio Code.
173+
1. Open the Command Palette and run **MCP: List Servers**.
174+
1. Confirm that **aiven** appears in the list.
175+
1. Try a prompt such as:
176+
177+
> List my Aiven projects.
178+
179+
1. If prompted to allow tool execution, click **Allow**.
180+
181+
</TabItem>
182+
<TabItem value="other" label="Other clients">
183+
184+
1. Open your AI assistant.
185+
1. Try a prompt such as:
186+
187+
> List my Aiven projects.
188+
189+
1. If prompted to allow tool execution, confirm.
190+
1. Verify that the response includes information about your Aiven projects.
191+
192+
</TabItem>
193+
</Tabs>
194+
195+
## Authentication
196+
197+
The Aiven MCP server uses OAuth 2.0 with PKCE for authentication. When you
198+
first use the server, it opens a browser window where you sign in to Aiven and
199+
select your organization. The server manages token refresh automatically.
200+
201+
## Supported tools
202+
203+
### Service management
204+
205+
Create, update, and delete Aiven services across all supported service types.
206+
Browse available plans and pricing, view service metrics and logs, and manage
207+
service configurations and cloud regions.
208+
209+
### PostgreSQL®
210+
211+
Create and manage PostgreSQL databases, execute read and write SQL queries,
212+
and manage PgBouncer connection pools. Get AI-powered query optimization
213+
recommendations, view query performance statistics, and list available extensions.
214+
215+
### Apache Kafka®
216+
217+
Create and manage Kafka topics, produce and consume messages, and configure
218+
Kafka Connect connectors. Browse Schema Registry subjects and manage
219+
connector lifecycle operations including pause, resume, and restart.
220+
221+
## Read-only mode
222+
223+
To restrict the server to read-only operations, set the `AIVEN_READ_ONLY`
224+
environment variable to `true` in your MCP client configuration:
225+
226+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {type: "http", url: mcpUrl, env: {AIVEN_READ_ONLY: "true"}}}}, null, 2)}</CodeBlock>
227+
228+
In read-only mode, the server only allows operations that read data, such as
229+
listing services, viewing metrics, and running SELECT queries. Write
230+
operations like creating services or modifying data are blocked.

sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ const sidebars: SidebarsConfig = {
524524
],
525525
},
526526
'tools/query-optimizer',
527+
'tools/mcp',
527528
'tools/mcp-server',
528529
'tools/doc-diff-llms',
529530
],

static/images/logos/cursor.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)