Skip to content

Commit a460aff

Browse files
feat: aiven mcp (#1426)
Co-authored-by: Harshini Rangaswamy <harshini.rangaswamy@aiven.io>
1 parent ab7c4f6 commit a460aff

File tree

9 files changed

+335
-2
lines changed

9 files changed

+335
-2
lines changed

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: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
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+
import {cursorDeepLink, mcpUrl} from '@site/src/components/mcpAivenLiveConstants';
10+
11+
Use the Aiven Model Context Protocol (MCP) server to create and manage Aiven services from
12+
AI assistants, such as Cursor and Claude Code.
13+
14+
## Prerequisites
15+
16+
- An [Aiven account](https://console.aiven.io/signup)
17+
- An organization with MCP access enabled
18+
- An MCP-compatible client, such as Cursor, Claude Code, Claude Desktop, or
19+
Visual Studio Code
20+
21+
## MCP server URL
22+
23+
Use the following server URL when configuring your client:
24+
25+
<CodeBlock language="text">{mcpUrl}</CodeBlock>
26+
27+
## Configure your MCP client
28+
29+
<Tabs groupId="mcp-clients">
30+
<TabItem value="cursor" label="Cursor" default>
31+
32+
<!-- vale off -->
33+
<a
34+
href={cursorDeepLink}
35+
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'}}
36+
>
37+
<svg
38+
xmlns="http://www.w3.org/2000/svg"
39+
width="20"
40+
height="20"
41+
viewBox="0 0 24 24"
42+
fill="none"
43+
aria-hidden="true"
44+
focusable="false"
45+
style={{display: 'block', flex: 'none'}}
46+
>
47+
<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"/>
48+
</svg>
49+
<span>Add to Cursor</span>
50+
</a>
51+
<!-- vale on -->
52+
53+
<br /><br />
54+
55+
To add the server manually:
56+
57+
1. In your project root, create or edit `.cursor/mcp.json`.
58+
1. Add the following configuration:
59+
60+
<!-- vale off -->
61+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {type: "http", url: mcpUrl}}}, null, 2)}</CodeBlock>
62+
<!-- vale on -->
63+
64+
1. Save the file.
65+
1. Restart Cursor.
66+
1. Open **Settings** > **Tools & MCP**.
67+
1. Select **aiven** and click **Connect**.
68+
69+
</TabItem>
70+
<TabItem value="claude-code" label="Claude Code">
71+
72+
1. Open a terminal.
73+
1. Run the following command:
74+
75+
<CodeBlock language="bash">{`claude mcp add --transport http aiven ${mcpUrl}`}</CodeBlock>
76+
77+
1. Run `/mcp` in Claude Code to verify the server is registered.
78+
1. The first time you use the server, your browser opens.
79+
1. Sign in to Aiven and select your organization.
80+
81+
For more information, see the [Claude Code MCP documentation](https://docs.anthropic.com/en/docs/claude-code/tutorials/set-up-mcp).
82+
83+
</TabItem>
84+
<TabItem value="claude-desktop" label="Claude Desktop">
85+
86+
1. Open the Claude Desktop configuration file. If it does not exist, create it:
87+
88+
- **macOS:**
89+
`~/Library/Application Support/Claude/claude_desktop_config.json`
90+
91+
- **Windows:**
92+
`%APPDATA%\Claude\claude_desktop_config.json`
93+
94+
1. Add the following configuration to the file:
95+
96+
<!-- vale off -->
97+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {type: "http", url: mcpUrl}}}, null, 2)}</CodeBlock>
98+
<!-- vale on -->
99+
100+
1. Save the file and restart Claude Desktop.
101+
102+
For more information, see the [Claude Desktop MCP documentation](https://modelcontextprotocol.io/quickstart/user).
103+
104+
</TabItem>
105+
<TabItem value="vscode" label="VS Code">
106+
107+
:::note
108+
Requires Visual Studio Code 1.102 or later with the GitHub Copilot extension installed
109+
and enabled.
110+
:::
111+
112+
1. Open your workspace in Visual Studio Code.
113+
1. In the workspace root, create a `.vscode` directory if it does not exist.
114+
1. In the `.vscode` directory, create or edit `mcp.json`.
115+
1. Add the following configuration:
116+
117+
<!-- vale off -->
118+
<CodeBlock language="json">{JSON.stringify({servers: {aiven: {type: "http", url: mcpUrl}}}, null, 2)}</CodeBlock>
119+
<!-- vale on -->
120+
121+
1. Save the file.
122+
1. Reload Visual Studio Code.
123+
1. Open the Command Palette and run **MCP: List Servers**.
124+
1. Confirm that **aiven** appears in the list.
125+
126+
For more information, see the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).
127+
128+
</TabItem>
129+
<TabItem value="other" label="Other clients">
130+
131+
1. Open your MCP client configuration.
132+
1. Add the Aiven MCP server using the following URL:
133+
134+
<CodeBlock language="text">{mcpUrl}</CodeBlock>
135+
136+
Most clients use a configuration similar to:
137+
138+
<!-- vale off -->
139+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {url: mcpUrl}}}, null, 2)}</CodeBlock>
140+
<!-- vale on -->
141+
142+
1. Save the file and restart your client.
143+
144+
Some clients require a transport type, such as `"type": "http"`. If the configuration
145+
fails, see your client documentation.
146+
147+
</TabItem>
148+
</Tabs>
149+
150+
## Verify the connection
151+
152+
<Tabs groupId="mcp-clients">
153+
<TabItem value="cursor" label="Cursor" default>
154+
155+
1. Open Cursor Chat with **Cmd+L** on macOS or **Ctrl+L** on Windows/Linux.
156+
1. Try a prompt such as:
157+
158+
> List my Aiven projects.
159+
160+
1. If prompted to allow tool execution, click **Allow**.
161+
1. To confirm the server is registered, go to **Settings** > **Tools & MCP** and
162+
check that **aiven** appears with a connected status.
163+
164+
</TabItem>
165+
<TabItem value="claude-code" label="Claude Code">
166+
167+
1. Run `/mcp` in Claude Code to verify the server is registered.
168+
1. Try a prompt such as:
169+
170+
> List my Aiven projects.
171+
172+
1. If your client prompts you to allow tool execution, approve the request.
173+
174+
</TabItem>
175+
<TabItem value="claude-desktop" label="Claude Desktop">
176+
177+
1. Open a new conversation.
178+
1. Verify that the MCP tools icon appears in the input area.
179+
1. Try a prompt such as:
180+
181+
> List my Aiven projects.
182+
183+
1. If prompted to allow tool execution, click **Allow**.
184+
185+
</TabItem>
186+
<TabItem value="vscode" label="VS Code">
187+
188+
1. Open Copilot Chat in Visual Studio Code.
189+
1. Open the Command Palette and run **MCP: List Servers**.
190+
1. Confirm that **aiven** appears in the list.
191+
1. Try a prompt such as:
192+
193+
> List my Aiven projects.
194+
195+
1. If prompted to allow tool execution, click **Allow**.
196+
197+
</TabItem>
198+
<TabItem value="other" label="Other clients">
199+
200+
1. Open your AI assistant.
201+
1. Try a prompt such as:
202+
203+
> List my Aiven projects.
204+
205+
1. If your client prompts you to allow tool execution, approve the request.
206+
1. Verify that the response includes information about your Aiven projects.
207+
208+
</TabItem>
209+
</Tabs>
210+
211+
## Authentication
212+
213+
The Aiven MCP server uses OAuth 2.0 with Proof Key for Code Exchange (PKCE) for
214+
authentication. The first time you use the server, your browser opens so you can sign in
215+
to Aiven and select your organization. The server refreshes tokens automatically.
216+
217+
## Security and responsibility
218+
219+
:::warning
220+
MCP tools can perform destructive operations on your Aiven services, including
221+
creating, modifying, and deleting services, databases, topics, and data. AI agents can
222+
run operations from natural language prompts that are easy to misinterpret. Using the
223+
Aiven MCP server can result in damage to or loss of data. Whether to enable MCP access
224+
is your organization's decision. Evaluate the risks before you grant AI agents access
225+
to your resources.
226+
:::
227+
228+
Under the [shared responsibility model](https://aiven.io/responsibility-matrix),
229+
security and compliance for MCP usage are shared between Aiven and your organization.
230+
Aiven secures the platform and API. You are responsible for the following:
231+
232+
- **Deciding whether to enable MCP** in your organization and evaluating the
233+
associated risks.
234+
- **Controlling access** by scoping API tokens to the minimum permissions needed
235+
(principle of least privilege) and rotating them regularly.
236+
- **Reviewing AI agent actions** before they run, especially for write or delete
237+
operations on production resources.
238+
- **Configuring MCP servers securely**, including choosing
239+
[read-only mode](/docs/tools/mcp#read-only-mode) where appropriate to
240+
restrict the server to non-destructive operations.
241+
242+
## Supported tools
243+
244+
### Service management
245+
246+
Create, update, and delete Aiven services across all supported service types.
247+
Browse available plans and pricing, view service metrics and logs, and manage
248+
service configurations and cloud regions.
249+
250+
### PostgreSQL®
251+
252+
Create and manage PostgreSQL databases, execute read and write SQL queries,
253+
and manage PgBouncer connection pools. Get AI-powered query optimization
254+
recommendations, view query performance statistics, and list available extensions.
255+
256+
### Apache Kafka®
257+
258+
Create and manage Kafka topics, produce and consume messages, and configure
259+
Kafka Connect connectors. Browse Schema Registry subjects and manage
260+
connector lifecycle operations including pause, resume, and restart.
261+
262+
## Read-only mode
263+
264+
To restrict the server to read-only operations, set the `AIVEN_READ_ONLY`
265+
environment variable to `true` in your MCP client configuration:
266+
267+
<!-- vale off -->
268+
<CodeBlock language="json">{JSON.stringify({mcpServers: {aiven: {type: "http", url: mcpUrl, env: {AIVEN_READ_ONLY: "true"}}}}, null, 2)}</CodeBlock>
269+
<!-- vale on -->
270+
271+
In read-only mode, the server only allows operations that read data, such as
272+
listing services, viewing metrics, and running SELECT queries. The server blocks
273+
write operations, such as creating services or modifying data.

sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ const sidebars: SidebarsConfig = {
381381
],
382382
},
383383
'tools/query-optimizer',
384+
'tools/mcp',
384385
'tools/mcp-server',
385386
'tools/doc-diff-llms',
386387
],
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* MCP server URL and Cursor install deep link for `docs/tools/mcp.md`.
3+
* Change `mcpUrl` here to update every sample on that page.
4+
*/
5+
export const mcpUrl = 'https://mcp.aiven.live/mcp';
6+
7+
export const cursorDeepLink = `cursor://anysphere.cursor-deeplink/mcp/install?name=aiven-mcp&config=${
8+
typeof btoa !== 'undefined' ? btoa(JSON.stringify({url: mcpUrl})) : ''
9+
}`;

static/images/logos/cursor.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)