mcp-aiven 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +173 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +84 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +15 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +35 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +42 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/aiven-api.d.ts +49982 -0
- package/dist/generated/aiven-api.d.ts.map +1 -0
- package/dist/generated/aiven-api.js +6 -0
- package/dist/generated/aiven-api.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/manifests/core.yaml +206 -0
- package/dist/manifests/integrations.yaml +72 -0
- package/dist/manifests/kafka.yaml +143 -0
- package/dist/manifests/pg.yaml +43 -0
- package/dist/prompts.d.ts +5 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +10 -0
- package/dist/prompts.js.map +1 -0
- package/dist/security.d.ts +5 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +52 -0
- package/dist/security.js.map +1 -0
- package/dist/shared/service-info.d.ts +5 -0
- package/dist/shared/service-info.d.ts.map +1 -0
- package/dist/shared/service-info.js +24 -0
- package/dist/shared/service-info.js.map +1 -0
- package/dist/tool-result-limit.d.ts +7 -0
- package/dist/tool-result-limit.d.ts.map +1 -0
- package/dist/tool-result-limit.js +44 -0
- package/dist/tool-result-limit.js.map +1 -0
- package/dist/tools/api-tool.d.ts +4 -0
- package/dist/tools/api-tool.d.ts.map +1 -0
- package/dist/tools/api-tool.js +80 -0
- package/dist/tools/api-tool.js.map +1 -0
- package/dist/tools/applications/handlers.d.ts +4 -0
- package/dist/tools/applications/handlers.d.ts.map +1 -0
- package/dist/tools/applications/handlers.js +345 -0
- package/dist/tools/applications/handlers.js.map +1 -0
- package/dist/tools/applications/index.d.ts +2 -0
- package/dist/tools/applications/index.d.ts.map +1 -0
- package/dist/tools/applications/index.js +2 -0
- package/dist/tools/applications/index.js.map +1 -0
- package/dist/tools/applications/schemas.d.ts +276 -0
- package/dist/tools/applications/schemas.d.ts.map +1 -0
- package/dist/tools/applications/schemas.js +204 -0
- package/dist/tools/applications/schemas.js.map +1 -0
- package/dist/tools/json-schema-to-zod.d.ts +4 -0
- package/dist/tools/json-schema-to-zod.d.ts.map +1 -0
- package/dist/tools/json-schema-to-zod.js +118 -0
- package/dist/tools/json-schema-to-zod.js.map +1 -0
- package/dist/tools/kafka/descriptions.d.ts +3 -0
- package/dist/tools/kafka/descriptions.d.ts.map +1 -0
- package/dist/tools/kafka/descriptions.js +43 -0
- package/dist/tools/kafka/descriptions.js.map +1 -0
- package/dist/tools/kafka/handlers.d.ts +4 -0
- package/dist/tools/kafka/handlers.d.ts.map +1 -0
- package/dist/tools/kafka/handlers.js +65 -0
- package/dist/tools/kafka/handlers.js.map +1 -0
- package/dist/tools/kafka/helpers.d.ts +4 -0
- package/dist/tools/kafka/helpers.d.ts.map +1 -0
- package/dist/tools/kafka/helpers.js +79 -0
- package/dist/tools/kafka/helpers.js.map +1 -0
- package/dist/tools/kafka/index.d.ts +2 -0
- package/dist/tools/kafka/index.d.ts.map +1 -0
- package/dist/tools/kafka/index.js +2 -0
- package/dist/tools/kafka/index.js.map +1 -0
- package/dist/tools/kafka/schemas.d.ts +43 -0
- package/dist/tools/kafka/schemas.d.ts.map +1 -0
- package/dist/tools/kafka/schemas.js +23 -0
- package/dist/tools/kafka/schemas.js.map +1 -0
- package/dist/tools/pg/connection.d.ts +5 -0
- package/dist/tools/pg/connection.d.ts.map +1 -0
- package/dist/tools/pg/connection.js +28 -0
- package/dist/tools/pg/connection.js.map +1 -0
- package/dist/tools/pg/descriptions.d.ts +4 -0
- package/dist/tools/pg/descriptions.d.ts.map +1 -0
- package/dist/tools/pg/descriptions.js +66 -0
- package/dist/tools/pg/descriptions.js.map +1 -0
- package/dist/tools/pg/handlers.d.ts +4 -0
- package/dist/tools/pg/handlers.d.ts.map +1 -0
- package/dist/tools/pg/handlers.js +91 -0
- package/dist/tools/pg/handlers.js.map +1 -0
- package/dist/tools/pg/index.d.ts +2 -0
- package/dist/tools/pg/index.d.ts.map +1 -0
- package/dist/tools/pg/index.js +2 -0
- package/dist/tools/pg/index.js.map +1 -0
- package/dist/tools/pg/query.d.ts +6 -0
- package/dist/tools/pg/query.d.ts.map +1 -0
- package/dist/tools/pg/query.js +120 -0
- package/dist/tools/pg/query.js.map +1 -0
- package/dist/tools/pg/schemas.d.ts +59 -0
- package/dist/tools/pg/schemas.d.ts.map +1 -0
- package/dist/tools/pg/schemas.js +69 -0
- package/dist/tools/pg/schemas.js.map +1 -0
- package/dist/tools/pg/validation.d.ts +10 -0
- package/dist/tools/pg/validation.d.ts.map +1 -0
- package/dist/tools/pg/validation.js +77 -0
- package/dist/tools/pg/validation.js.map +1 -0
- package/dist/tools/registry.d.ts +4 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +120 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/response-filter.d.ts +3 -0
- package/dist/tools/response-filter.d.ts.map +1 -0
- package/dist/tools/response-filter.js +19 -0
- package/dist/tools/response-filter.js.map +1 -0
- package/dist/transport.d.ts +14 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +111 -0
- package/dist/transport.js.map +1 -0
- package/dist/types.d.ts +127 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +81 -0
- package/dist/types.js.map +1 -0
- package/generator/schemas/api-schemas.json +2106 -0
- package/package.json +78 -0
- package/src/manifests/core.yaml +206 -0
- package/src/manifests/integrations.yaml +72 -0
- package/src/manifests/kafka.yaml +143 -0
- package/src/manifests/pg.yaml +43 -0
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-aiven",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "MCP server for Aiven cloud data platform - manage PostgreSQL, Kafka, and other services",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"mcp",
|
|
9
|
+
"aiven",
|
|
10
|
+
"postgresql",
|
|
11
|
+
"kafka",
|
|
12
|
+
"cloud",
|
|
13
|
+
"database",
|
|
14
|
+
"model-context-protocol"
|
|
15
|
+
],
|
|
16
|
+
"author": "Aiven",
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"src/manifests",
|
|
21
|
+
"generator/schemas",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/Aiven-Open/mcp-aiven.git"
|
|
28
|
+
},
|
|
29
|
+
"bugs": "https://github.com/Aiven-Open/mcp-aiven/issues",
|
|
30
|
+
"homepage": "https://github.com/Aiven-Open/mcp-aiven/blob/main/README.md",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
33
|
+
"express": "^5.2.1",
|
|
34
|
+
"express-rate-limit": "^8.3.2",
|
|
35
|
+
"libpg-query": "^17.7.3",
|
|
36
|
+
"openapi-fetch": "^0.17.0",
|
|
37
|
+
"pg": "^8.18.0",
|
|
38
|
+
"yaml": "^2.4.0",
|
|
39
|
+
"zod": "^3.23.8"
|
|
40
|
+
},
|
|
41
|
+
"bin": {
|
|
42
|
+
"mcp-aiven": "dist/index.js"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"generate": "tsx generator/src/cli.ts",
|
|
46
|
+
"build": "tsc && rm -rf dist/manifests && cp -r src/manifests dist/manifests",
|
|
47
|
+
"start": "node dist/index.js",
|
|
48
|
+
"dev": "tsx watch src/index.ts",
|
|
49
|
+
"test": "vitest",
|
|
50
|
+
"lint": "eslint .",
|
|
51
|
+
"lint:fix": "eslint . --fix",
|
|
52
|
+
"format": "prettier --write .",
|
|
53
|
+
"format:check": "prettier --check .",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"prepublishOnly": "pnpm i && pnpm generate:api-types && pnpm generate && pnpm build && pnpm test --run",
|
|
56
|
+
"generate:api-types": "openapi-typescript https://api.aiven.io/doc/openapi.json -o src/generated/aiven-api.ts"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@eslint/js": "^9.0.0",
|
|
60
|
+
"@types/express": "^5.0.6",
|
|
61
|
+
"@types/node": "^22.10.0",
|
|
62
|
+
"@types/pg": "^8.16.0",
|
|
63
|
+
"eslint": "^9.0.0",
|
|
64
|
+
"eslint-config-prettier": "^9.1.0",
|
|
65
|
+
"eslint-plugin-security": "^3.0.0",
|
|
66
|
+
"globals": "^15.0.0",
|
|
67
|
+
"lint-staged": "^15.0.0",
|
|
68
|
+
"openapi-typescript": "^7.13.0",
|
|
69
|
+
"prettier": "^3.2.0",
|
|
70
|
+
"tsx": "^4.19.2",
|
|
71
|
+
"typescript": "^5.7.2",
|
|
72
|
+
"typescript-eslint": "^8.0.0",
|
|
73
|
+
"vitest": "^2.0.0"
|
|
74
|
+
},
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": ">=18.0.0"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Core tools: projects, services, logs, events
|
|
2
|
+
tools:
|
|
3
|
+
- name: aiven_project_list
|
|
4
|
+
method: GET
|
|
5
|
+
path: /project
|
|
6
|
+
category: core
|
|
7
|
+
append_list_picker_hint: true
|
|
8
|
+
response_filter:
|
|
9
|
+
key: projects
|
|
10
|
+
fields: [project_name, default_cloud, organization_id, tags]
|
|
11
|
+
description: |
|
|
12
|
+
List all Aiven projects. ALWAYS call this first to get valid `project` names — never guess project names.
|
|
13
|
+
|
|
14
|
+
- name: aiven_project_get
|
|
15
|
+
method: GET
|
|
16
|
+
path: /project/{project}
|
|
17
|
+
category: core
|
|
18
|
+
|
|
19
|
+
- name: aiven_list_project_clouds
|
|
20
|
+
method: GET
|
|
21
|
+
path: /project/{project}/clouds
|
|
22
|
+
category: core
|
|
23
|
+
append_list_picker_hint: true
|
|
24
|
+
|
|
25
|
+
response_filter:
|
|
26
|
+
key: clouds
|
|
27
|
+
fields: [cloud_name, cloud_description, provider, geo_region]
|
|
28
|
+
|
|
29
|
+
- name: aiven_service_list
|
|
30
|
+
method: GET
|
|
31
|
+
path: /project/{project}/service
|
|
32
|
+
category: core
|
|
33
|
+
append_list_picker_hint: true
|
|
34
|
+
exclude_params: [include_secrets]
|
|
35
|
+
response_filter:
|
|
36
|
+
key: services
|
|
37
|
+
fields: [service_name, service_type]
|
|
38
|
+
description: |
|
|
39
|
+
List services in a project. `project` must be a valid Aiven project name from `aiven_project_list`.
|
|
40
|
+
|
|
41
|
+
- name: aiven_service_type_plans
|
|
42
|
+
method: GET
|
|
43
|
+
path: /project/{project}/service-types/{service_type}/plans
|
|
44
|
+
category: core
|
|
45
|
+
append_list_picker_hint: true
|
|
46
|
+
response_filter:
|
|
47
|
+
key: service_plans
|
|
48
|
+
fields: [service_plan]
|
|
49
|
+
description: |
|
|
50
|
+
List available plans for a service type. Requires `project` — use `aiven_project_list` first if unknown.
|
|
51
|
+
|
|
52
|
+
Each plan may include **`regions`** (and sometimes **`clouds`**) describing where that plan can run. Use those fields to show the user **which cloud names** (e.g. `do-fra`, `aws-eu-central-1`) are valid for their chosen plan before calling `aiven_service_create`.
|
|
53
|
+
|
|
54
|
+
**Pricing is not included in this response.** Prices vary by cloud region. Use `aiven_service_plan_pricing` to get pricing for a specific plan and cloud.
|
|
55
|
+
|
|
56
|
+
- name: aiven_service_plan_pricing
|
|
57
|
+
method: GET
|
|
58
|
+
path: /project/{project}/pricing/service-types/{service_type}/plans/{service_plan}/clouds/{cloud}
|
|
59
|
+
category: core
|
|
60
|
+
readOnly: true
|
|
61
|
+
append_list_picker_hint: true
|
|
62
|
+
description: |
|
|
63
|
+
Get pricing for a specific service plan in a specific cloud region. Returns hourly USD price.
|
|
64
|
+
|
|
65
|
+
Use `aiven_service_type_plans` to list available plans, and `aiven_list_project_clouds` to list available clouds.
|
|
66
|
+
|
|
67
|
+
- name: aiven_service_create
|
|
68
|
+
method: POST
|
|
69
|
+
path: /project/{project}/service
|
|
70
|
+
category: core
|
|
71
|
+
append_list_picker_hint: true
|
|
72
|
+
defaults:
|
|
73
|
+
project_vpc_id: null
|
|
74
|
+
response_filter:
|
|
75
|
+
key: service
|
|
76
|
+
fields: [service_name, service_type, state, plan, cloud_name]
|
|
77
|
+
description: |
|
|
78
|
+
Create a new Aiven service. Always call `aiven_service_type_plans` first, present plans to the user, and let them choose before creating. Do not pick a plan yourself.
|
|
79
|
+
|
|
80
|
+
**Cloud (`cloud`) — never guess or silently default.** After the user picks a plan, show valid cloud names from that plan’s **`regions` / `clouds`** in the `aiven_service_type_plans` response and **ask which cloud they want**. Do not invent a region (e.g. do not assume `do-fra`). If per-plan clouds are unclear, call `aiven_list_project_clouds` and still require an **explicit user choice** unless they told you to use a specific cloud or the project’s default.
|
|
81
|
+
|
|
82
|
+
For PostgreSQL, set `user_config: {"pg_version": "17"}`. After creation, tell the user the service is provisioning (takes a few minutes) and ask them to tell you when to check the status. Do NOT poll `aiven_service_get` in a loop.
|
|
83
|
+
|
|
84
|
+
**Read replica:** set `service_to_fork_from` to the primary and `user_config.pg_read_replica: true`.
|
|
85
|
+
|
|
86
|
+
- name: aiven_service_get
|
|
87
|
+
method: GET
|
|
88
|
+
path: /project/{project}/service/{service_name}
|
|
89
|
+
category: core
|
|
90
|
+
exclude_params: [include_secrets]
|
|
91
|
+
description: |
|
|
92
|
+
Get service information. `project` must be a valid Aiven project name from `aiven_project_list`.
|
|
93
|
+
If the service `state` is not `RUNNING`, return the status to the user and stop. Do NOT call this tool again in a loop — let the user decide when to re-check.
|
|
94
|
+
|
|
95
|
+
- name: aiven_service_update
|
|
96
|
+
method: PUT
|
|
97
|
+
path: /project/{project}/service/{service_name}
|
|
98
|
+
category: core
|
|
99
|
+
destructive: true
|
|
100
|
+
defaults:
|
|
101
|
+
project_vpc_id: null
|
|
102
|
+
description: |
|
|
103
|
+
Update an existing Aiven service.
|
|
104
|
+
|
|
105
|
+
Can change: plan, cloud region, user configuration, power state.
|
|
106
|
+
|
|
107
|
+
**Warning:** Plan changes may cause brief service downtime during migration. Confirm with the user before changing plans.
|
|
108
|
+
|
|
109
|
+
**Common user_config changes:**
|
|
110
|
+
|
|
111
|
+
Enable Kafka Connect on a Kafka service:
|
|
112
|
+
```
|
|
113
|
+
aiven_service_update(project="my-project", service_name="my-kafka",
|
|
114
|
+
user_config={"kafka_connect": true})
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Enable Schema Registry (Karapace) on a Kafka service:
|
|
118
|
+
```
|
|
119
|
+
aiven_service_update(project="my-project", service_name="my-kafka",
|
|
120
|
+
user_config={"schema_registry": true})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Enable tiered storage on a Kafka service:
|
|
124
|
+
```
|
|
125
|
+
aiven_service_update(project="my-project", service_name="my-kafka",
|
|
126
|
+
user_config={"tiered_storage": {"enabled": true}})
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Set PostgreSQL version:
|
|
130
|
+
```
|
|
131
|
+
aiven_service_update(project="my-project", service_name="my-pg",
|
|
132
|
+
user_config={"pg_version": "17"})
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- name: aiven_project_get_service_logs
|
|
136
|
+
method: POST
|
|
137
|
+
path: /project/{project}/service/{service_name}/logs
|
|
138
|
+
category: core
|
|
139
|
+
readOnly: true
|
|
140
|
+
|
|
141
|
+
- name: aiven_service_query_activity
|
|
142
|
+
method: POST
|
|
143
|
+
path: /project/{project}/service/{service_name}/query/activity
|
|
144
|
+
category: core
|
|
145
|
+
readOnly: true
|
|
146
|
+
|
|
147
|
+
- name: aiven_service_metrics_fetch
|
|
148
|
+
method: POST
|
|
149
|
+
path: /project/{project}/service/{service_name}/metrics
|
|
150
|
+
category: core
|
|
151
|
+
readOnly: true
|
|
152
|
+
|
|
153
|
+
description: |
|
|
154
|
+
Fetch metrics for **managed data services** (PostgreSQL, Kafka, OpenSearch, etc.) — i.e. not `service_type: application`.
|
|
155
|
+
|
|
156
|
+
**Do not use** for **application** services (custom apps deployed as an Aiven “application” service). For those, use **`aiven_service_application_metrics_get`** instead (GET `…/application/metrics`). If unsure, call `aiven_service_get` first and check `service_type`.
|
|
157
|
+
|
|
158
|
+
Use `period` to control the time window: `hour`, `day`, `week`, `month`, or `year`.
|
|
159
|
+
For Kafka services, optionally pass `kafka_topic_name` to get topic-level metrics.
|
|
160
|
+
|
|
161
|
+
**Display format:** Render ALL metrics as a single ASCII dashboard using box-drawing characters (┌─┐│└┘) and progress bars (█░). One section per metric group. Show every metric returned — do not summarize or omit. Do NOT use markdown tables or bullet points. Do NOT generate scripts. Render directly as text. Add a blank line between each metric row for readability.
|
|
162
|
+
|
|
163
|
+
# Not in public OpenAPI — schema is maintained here (see generator manual_schema).
|
|
164
|
+
- name: aiven_service_application_metrics_get
|
|
165
|
+
method: GET
|
|
166
|
+
path: /project/{project}/service/{service_name}/application/metrics
|
|
167
|
+
category: core
|
|
168
|
+
readOnly: true
|
|
169
|
+
manual_schema:
|
|
170
|
+
type: object
|
|
171
|
+
properties:
|
|
172
|
+
project:
|
|
173
|
+
type: string
|
|
174
|
+
service_name:
|
|
175
|
+
type: string
|
|
176
|
+
required:
|
|
177
|
+
- project
|
|
178
|
+
- service_name
|
|
179
|
+
manual_strict: true
|
|
180
|
+
description: |
|
|
181
|
+
**Preferred tool** when the user asks for **application** metrics, or the target is an **application** service (`service_type: application`).
|
|
182
|
+
|
|
183
|
+
Calls **`GET …/application/metrics`**. Do **not** use `aiven_service_metrics_fetch` for these — that tool targets **`POST …/metrics`** for managed data services only.
|
|
184
|
+
|
|
185
|
+
If the service type is unknown, call **`aiven_service_get`** first, then choose this tool if `service_type` is `application`.
|
|
186
|
+
|
|
187
|
+
- name: aiven_project_vpc_list
|
|
188
|
+
method: GET
|
|
189
|
+
path: /project/{project}/vpcs
|
|
190
|
+
category: core
|
|
191
|
+
readOnly: true
|
|
192
|
+
response_filter:
|
|
193
|
+
key: vpcs
|
|
194
|
+
fields: [project_vpc_id, cloud_name, state, network_cidr]
|
|
195
|
+
description: |
|
|
196
|
+
List VPCs for a project. Returns each VPC's ID, cloud, state, and network CIDR.
|
|
197
|
+
|
|
198
|
+
Use this when deploying an application service fails with "please specify project_vpc_id" (i.e. the project has multiple active VPCs). List them, show the user the options, and let them pick which VPC to deploy into.
|
|
199
|
+
|
|
200
|
+
VPCs with state `ACTIVE` are ready to use. Pass the chosen `project_vpc_id` to `aiven_application_deploy`.
|
|
201
|
+
|
|
202
|
+
- name: aiven_project_get_event_logs
|
|
203
|
+
method: GET
|
|
204
|
+
path: /project/{project}/events
|
|
205
|
+
category: core
|
|
206
|
+
append_list_picker_hint: true
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Service integration tools: CRUD for integrations between Aiven services and external endpoints
|
|
2
|
+
|
|
3
|
+
tools:
|
|
4
|
+
- name: aiven_service_integration_list
|
|
5
|
+
method: GET
|
|
6
|
+
path: /project/{project}/service/{service_name}/integration
|
|
7
|
+
category: integrations
|
|
8
|
+
readOnly: true
|
|
9
|
+
append_list_picker_hint: true
|
|
10
|
+
description: |
|
|
11
|
+
List all integrations for a specific service. Returns both integrations where this service is the source and where it is the destination.
|
|
12
|
+
|
|
13
|
+
Use this to see what metrics, logs, data pipeline, or replication integrations are active on a service.
|
|
14
|
+
|
|
15
|
+
- name: aiven_service_integration_create
|
|
16
|
+
method: POST
|
|
17
|
+
path: /project/{project}/integration
|
|
18
|
+
category: integrations
|
|
19
|
+
description: |
|
|
20
|
+
Create a service integration between two Aiven services, or between an Aiven service and an external integration endpoint.
|
|
21
|
+
|
|
22
|
+
**Before calling:** use `aiven_integration_types_list` to discover valid `integration_type` values and which source/destination service types each supports.
|
|
23
|
+
|
|
24
|
+
Provide `source_service`/`dest_service` for Aiven-to-Aiven integrations, or use `source_endpoint_id`/`dest_endpoint_id` for external endpoints.
|
|
25
|
+
|
|
26
|
+
- name: aiven_service_integration_get
|
|
27
|
+
method: GET
|
|
28
|
+
path: /project/{project}/integration/{integration_id}
|
|
29
|
+
category: integrations
|
|
30
|
+
readOnly: true
|
|
31
|
+
description: |
|
|
32
|
+
Get details for a specific service integration by ID. Returns the integration type, source and destination services, status, and configuration.
|
|
33
|
+
|
|
34
|
+
- name: aiven_service_integration_update
|
|
35
|
+
method: PUT
|
|
36
|
+
path: /project/{project}/integration/{integration_id}
|
|
37
|
+
category: integrations
|
|
38
|
+
description: |
|
|
39
|
+
Update the configuration of an existing service integration.
|
|
40
|
+
|
|
41
|
+
Only `user_config` can be updated — you cannot change the integration type, source, or destination after creation. To change those, delete and recreate the integration.
|
|
42
|
+
|
|
43
|
+
- name: aiven_service_integration_delete
|
|
44
|
+
method: DELETE
|
|
45
|
+
path: /project/{project}/integration/{integration_id}
|
|
46
|
+
category: integrations
|
|
47
|
+
description: |
|
|
48
|
+
Delete a service integration. This removes the connection between the source and destination services.
|
|
49
|
+
|
|
50
|
+
**Warning:** Deleting an integration may disrupt data flows (metrics, logs, replication). Confirm with the user before proceeding.
|
|
51
|
+
|
|
52
|
+
- name: aiven_integration_types_list
|
|
53
|
+
method: GET
|
|
54
|
+
path: /project/{project}/integration_types
|
|
55
|
+
category: integrations
|
|
56
|
+
readOnly: true
|
|
57
|
+
append_list_picker_hint: true
|
|
58
|
+
description: |
|
|
59
|
+
List all available service integration types for a project. Returns the integration type name along with the valid source and destination service types for each.
|
|
60
|
+
|
|
61
|
+
**Call this first** before creating an integration to understand which service types can be connected and in which direction.
|
|
62
|
+
|
|
63
|
+
- name: aiven_integration_endpoint_types_list
|
|
64
|
+
method: GET
|
|
65
|
+
path: /project/{project}/integration_endpoint_types
|
|
66
|
+
category: integrations
|
|
67
|
+
readOnly: true
|
|
68
|
+
append_list_picker_hint: true
|
|
69
|
+
description: |
|
|
70
|
+
List all available integration endpoint types for a project. Integration endpoints represent external services (e.g. Datadog, external Elasticsearch, Prometheus remote write, rsyslog, AWS CloudWatch, Google Cloud Logging).
|
|
71
|
+
|
|
72
|
+
Use this to discover what external endpoint types can be created, then use `aiven_service_integration_create` with the endpoint ID to wire an Aiven service to the external system.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Kafka tools: topics, connectors, schema registry
|
|
2
|
+
|
|
3
|
+
kafka_connect_plan_gate: &kafka_connect_plan_gate |
|
|
4
|
+
**Kafka Connect plan gate — call `aiven_service_get` first.** Read `service.plan`. On **free** Kafka plans (e.g. `free-0`), Kafka Connect is usually **not** included: Connect REST calls may return **403** (e.g. "Kafka Connect API disabled"). Do **not** call this tool when `service.plan` is `free-*` or the tier is known not to include Connect; tell the user to upgrade instead of hitting the API.
|
|
5
|
+
|
|
6
|
+
**Typically no Kafka Connect:** `free-*` (e.g. `free-0`).
|
|
7
|
+
|
|
8
|
+
**Typically includes Kafka Connect:** `startup-*` (e.g. `startup-2`, `startup-4`), `business-*`, `premium-*`.
|
|
9
|
+
|
|
10
|
+
On supported plans you may still need `user_config.kafka_connect: true`. A **403** saying Kafka Connect is **disabled** is usually a **plan / product** limit, not missing token permissions.
|
|
11
|
+
|
|
12
|
+
tools:
|
|
13
|
+
- name: aiven_kafka_topic_list
|
|
14
|
+
method: GET
|
|
15
|
+
path: /project/{project}/service/{service_name}/topic
|
|
16
|
+
category: kafka
|
|
17
|
+
append_list_picker_hint: true
|
|
18
|
+
|
|
19
|
+
- name: aiven_kafka_topic_create
|
|
20
|
+
method: POST
|
|
21
|
+
path: /project/{project}/service/{service_name}/topic
|
|
22
|
+
category: kafka
|
|
23
|
+
|
|
24
|
+
description: |
|
|
25
|
+
Create a Kafka topic.
|
|
26
|
+
|
|
27
|
+
**IMPORTANT:** Always include `partitions` and `replication` in the request. The API may accept them as optional but topics created without these fields may not work correctly.
|
|
28
|
+
|
|
29
|
+
Recommended defaults:
|
|
30
|
+
- `partitions`: 1 (or more depending on throughput needs)
|
|
31
|
+
- `replication`: 3 (must not exceed the number of brokers in the cluster)
|
|
32
|
+
|
|
33
|
+
After creation, do NOT immediately call `aiven_kafka_topic_get` or other tools on this topic. Tell the user the topic was created and will be available shortly.
|
|
34
|
+
|
|
35
|
+
- name: aiven_kafka_topic_get
|
|
36
|
+
method: GET
|
|
37
|
+
path: /project/{project}/service/{service_name}/topic/{topic_name}
|
|
38
|
+
category: kafka
|
|
39
|
+
|
|
40
|
+
- name: aiven_kafka_topic_update
|
|
41
|
+
method: PUT
|
|
42
|
+
path: /project/{project}/service/{service_name}/topic/{topic_name}
|
|
43
|
+
category: kafka
|
|
44
|
+
|
|
45
|
+
- name: aiven_kafka_topic_delete
|
|
46
|
+
method: DELETE
|
|
47
|
+
path: /project/{project}/service/{service_name}/topic/{topic_name}
|
|
48
|
+
category: kafka
|
|
49
|
+
|
|
50
|
+
- name: aiven_kafka_topic_message_list
|
|
51
|
+
method: POST
|
|
52
|
+
path: /project/{project}/service/{service_name}/kafka/rest/topics/{topic_name}/messages
|
|
53
|
+
category: kafka
|
|
54
|
+
readOnly: true
|
|
55
|
+
|
|
56
|
+
description: |
|
|
57
|
+
Consume messages from a Kafka topic.
|
|
58
|
+
|
|
59
|
+
**REQUIRED BEFORE CALLING THIS TOOL — follow these steps in order:**
|
|
60
|
+
1. Kafka REST API must be enabled. Call `aiven_service_update` with `user_config: {"kafka_rest": true}` if not already enabled.
|
|
61
|
+
2. Call `aiven_service_get` once to check if `components` contains `kafka_rest` with `state: "running"`. If not ready, tell the user to wait and ask them when to re-check. Do NOT poll in a loop.
|
|
62
|
+
|
|
63
|
+
**Format:** The `format` must match how messages were produced. Use `"binary"` for Debezium CDC or any schema-encoded messages (values are returned as base64). Use `"json"` only for plain JSON messages produced without a schema.
|
|
64
|
+
|
|
65
|
+
The `partitions` parameter is an object keyed by partition number (as a string), each with an `offset` value.
|
|
66
|
+
|
|
67
|
+
**Example:**
|
|
68
|
+
```
|
|
69
|
+
aiven_kafka_topic_message_list(
|
|
70
|
+
project="my-project",
|
|
71
|
+
service_name="my-kafka",
|
|
72
|
+
topic_name="my-topic",
|
|
73
|
+
partitions={"0": {"offset": 0}},
|
|
74
|
+
format="binary"
|
|
75
|
+
)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- name: aiven_kafka_topic_message_produce
|
|
79
|
+
method: POST
|
|
80
|
+
path: /project/{project}/service/{service_name}/kafka/rest/topics/{topic_name}/produce
|
|
81
|
+
category: kafka
|
|
82
|
+
|
|
83
|
+
description: |
|
|
84
|
+
Produce messages into a Kafka topic.
|
|
85
|
+
|
|
86
|
+
**REQUIRED BEFORE CALLING THIS TOOL — follow these steps in order:**
|
|
87
|
+
1. Kafka REST API must be enabled. Call `aiven_service_update` with `user_config: {"kafka_rest": true}` if not already enabled.
|
|
88
|
+
2. Call `aiven_service_get` once to check if `components` contains `kafka_rest` with `state: "running"`. If not ready, tell the user to wait and ask them when to re-check. Do NOT poll in a loop.
|
|
89
|
+
|
|
90
|
+
- name: aiven_kafka_connect_available_connectors
|
|
91
|
+
method: GET
|
|
92
|
+
path: /project/{project}/service/{service_name}/available-connectors
|
|
93
|
+
category: kafka
|
|
94
|
+
append_list_picker_hint: true
|
|
95
|
+
description: *kafka_connect_plan_gate
|
|
96
|
+
|
|
97
|
+
- name: aiven_kafka_connect_list
|
|
98
|
+
method: GET
|
|
99
|
+
path: /project/{project}/service/{service_name}/connectors
|
|
100
|
+
category: kafka
|
|
101
|
+
append_list_picker_hint: true
|
|
102
|
+
description: *kafka_connect_plan_gate
|
|
103
|
+
|
|
104
|
+
- name: aiven_kafka_connect_get_connector_status
|
|
105
|
+
method: GET
|
|
106
|
+
path: /project/{project}/service/{service_name}/connectors/{connector_name}/status
|
|
107
|
+
category: kafka
|
|
108
|
+
description: *kafka_connect_plan_gate
|
|
109
|
+
|
|
110
|
+
- name: aiven_kafka_connect_pause_connector
|
|
111
|
+
method: POST
|
|
112
|
+
path: /project/{project}/service/{service_name}/connectors/{connector_name}/pause
|
|
113
|
+
category: kafka
|
|
114
|
+
description: *kafka_connect_plan_gate
|
|
115
|
+
|
|
116
|
+
- name: aiven_kafka_connect_resume_connector
|
|
117
|
+
method: POST
|
|
118
|
+
path: /project/{project}/service/{service_name}/connectors/{connector_name}/resume
|
|
119
|
+
category: kafka
|
|
120
|
+
description: *kafka_connect_plan_gate
|
|
121
|
+
|
|
122
|
+
- name: aiven_kafka_connect_restart_connector
|
|
123
|
+
method: POST
|
|
124
|
+
path: /project/{project}/service/{service_name}/connectors/{connector_name}/restart
|
|
125
|
+
category: kafka
|
|
126
|
+
description: *kafka_connect_plan_gate
|
|
127
|
+
|
|
128
|
+
- name: aiven_kafka_connect_delete_connector
|
|
129
|
+
method: DELETE
|
|
130
|
+
path: /project/{project}/service/{service_name}/connectors/{connector_name}
|
|
131
|
+
category: kafka
|
|
132
|
+
description: *kafka_connect_plan_gate
|
|
133
|
+
|
|
134
|
+
- name: aiven_kafka_schema_registry_subjects
|
|
135
|
+
method: GET
|
|
136
|
+
path: /project/{project}/service/{service_name}/kafka/schema/subjects
|
|
137
|
+
category: kafka
|
|
138
|
+
append_list_picker_hint: true
|
|
139
|
+
|
|
140
|
+
- name: aiven_kafka_schema_registry_subject_version_get
|
|
141
|
+
method: GET
|
|
142
|
+
path: /project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions/{version_id}
|
|
143
|
+
category: kafka
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# PostgreSQL tools: extensions, query stats, connection pools
|
|
2
|
+
|
|
3
|
+
pg_connection_pool_plan_gate: &pg_connection_pool_plan_gate |
|
|
4
|
+
**PgBouncer connection pools** — `aiven_pg_bouncer_create`, `aiven_pg_bouncer_update`, and `aiven_pg_bouncer_delete` call Aiven’s `connection_pool` API.
|
|
5
|
+
|
|
6
|
+
**Plan gate — call `aiven_service_get` first.** Read `service.plan` (string). Do **not** call these tools if the plan does not support connection pooling; tell the user they need a higher tier instead of attempting the API.
|
|
7
|
+
|
|
8
|
+
**Plans that do _not_ include connection pooling:** `free-1-1gb`, `free-1-5gb`, any `free-*` plan, and **`hobbyist`**.
|
|
9
|
+
|
|
10
|
+
**Plans that support connection pooling:** `startup-*`, `business-*`, and `premium-*` (e.g. `startup-4`, `business-8`).
|
|
11
|
+
|
|
12
|
+
If the API returns **403** with a message about the service plan not including connection pooling, interpret that as a **plan limitation**, not necessarily a missing token permission.
|
|
13
|
+
|
|
14
|
+
tools:
|
|
15
|
+
- name: aiven_pg_service_available_extensions
|
|
16
|
+
method: GET
|
|
17
|
+
path: /project/{project}/service/{service_name}/pg/available-extensions
|
|
18
|
+
category: pg
|
|
19
|
+
append_list_picker_hint: true
|
|
20
|
+
|
|
21
|
+
- name: aiven_pg_service_query_statistics
|
|
22
|
+
method: POST
|
|
23
|
+
path: /project/{project}/service/{service_name}/pg/query/stats
|
|
24
|
+
category: pg
|
|
25
|
+
readOnly: true
|
|
26
|
+
|
|
27
|
+
- name: aiven_pg_bouncer_create
|
|
28
|
+
method: POST
|
|
29
|
+
path: /project/{project}/service/{service_name}/connection_pool
|
|
30
|
+
category: pg
|
|
31
|
+
description: *pg_connection_pool_plan_gate
|
|
32
|
+
|
|
33
|
+
- name: aiven_pg_bouncer_update
|
|
34
|
+
method: PUT
|
|
35
|
+
path: /project/{project}/service/{service_name}/connection_pool/{pool_name}
|
|
36
|
+
category: pg
|
|
37
|
+
description: *pg_connection_pool_plan_gate
|
|
38
|
+
|
|
39
|
+
- name: aiven_pg_bouncer_delete
|
|
40
|
+
method: DELETE
|
|
41
|
+
path: /project/{project}/service/{service_name}/connection_pool/{pool_name}
|
|
42
|
+
category: pg
|
|
43
|
+
description: *pg_connection_pool_plan_gate
|