Skip to content

Commit f875af4

Browse files
authored
Add rpk connect mcp-server commands (#1360)
1 parent 0630114 commit f875af4

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

modules/ROOT/nav.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@
351351
**** xref:reference:rpk/rpk-connect/rpk-connect-test.adoc[]
352352
**** xref:reference:rpk/rpk-connect/rpk-connect-uninstall.adoc[]
353353
**** xref:reference:rpk/rpk-connect/rpk-connect-upgrade.adoc[]
354+
**** xref:reference:rpk/rpk-connect/rpk-connect-mcp-server.adoc[]
355+
***** xref:reference:rpk/rpk-connect/rpk-connect-mcp-server-init.adoc[]
356+
***** xref:reference:rpk/rpk-connect/rpk-connect-mcp-server-lint.adoc[]
354357
*** xref:reference:rpk/rpk-container/rpk-container.adoc[]
355358
**** xref:reference:rpk/rpk-container/rpk-container.adoc[]
356359
**** xref:reference:rpk/rpk-container/rpk-container-purge.adoc[]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
= rpk connect mcp-server init
2+
:description: Create the folder structure of an MCP server.
3+
4+
Creates the folder structure required for an MCP server project.
5+
6+
[.no-copy]
7+
----
8+
├── o11y
9+
│ ├── metrics.yaml
10+
│ └── tracer.yaml
11+
└── resources
12+
├── caches
13+
│ └── example-cache.yaml
14+
├── inputs
15+
│ └── example-input.yaml
16+
├── outputs
17+
│ └── example-output.yaml
18+
└── processors
19+
└── example-processor.yaml
20+
----
21+
22+
The `resources` directory is where you define your tools such as inputs, outputs, and processors. Each tool is defined in its own YAML file. By default, the `example-` files are provided as templates. The `o11y` directory contains configuration for observability, including metrics and tracing.
23+
24+
Files that already exist are overwritten.
25+
26+
== Usage
27+
28+
rpk connect mcp-server init [OPTIONS]
29+
30+
== Options
31+
32+
[options="header"]
33+
|===
34+
| Option | Description
35+
| --help, -h | Show help for the command.
36+
|===
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
= rpk connect mcp-server lint
2+
:description: Parse Redpanda Connect configs and report any linting errors.
3+
4+
Parse Redpanda Connect configs and report any linting errors. Exits with a status code 1 if any linting errors are detected in a directory.
5+
6+
== Usage
7+
8+
[,bash]
9+
----
10+
rpk connect mcp-server lint [command options]
11+
----
12+
13+
== Examples
14+
15+
[,bash]
16+
----
17+
rpk connect mcp-server lint .
18+
rpk connect mcp-server lint ./foo
19+
----
20+
21+
== Flags
22+
23+
[cols="1m,1a,2a"]
24+
|===
25+
|*Value* |*Type* |*Description*
26+
27+
|--deprecated |- |Print linting errors for the presence of deprecated fields. (default: false)
28+
|--labels |- |Print linting errors when components do not have labels. (default: false)
29+
|--skip-env-var-check |- |Do not produce lint errors when environment interpolations exist without defaults within configs but aren't defined. (default: false)
30+
|--verbose |- |Print the lint result for each target file. (default: false)
31+
|--secrets env: [ --secrets env: ] |- |Attempt to load secrets from a provided URN. If more than one entry is specified they will be attempted in order until a value is found. Environment variable lookups are specified with the URN env:, which by default is the only entry. In order to disable all secret lookups specify a single entry of `none:`. (default: "env:")
32+
|--env-file value, -e value [ --env-file value, -e value ] |- |Import environment variables from a dotenv file.
33+
|--help, -h |- |Show help for the command.
34+
|===
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
= rpk connect mcp-server
2+
:description: Execute an MCP server against a suite of Redpanda Connect resources.
3+
4+
Executes an MCP server against a suite of Redpanda Connect resources. Each resource is exposed as a tool for AI interaction.
5+
6+
== Usage
7+
8+
rpk connect mcp-server [command options]
9+
10+
Each resource will be exposed as a tool that AI can interact with:
11+
12+
rpk connect mcp-server ./repo
13+
14+
== Subcommands
15+
16+
* xref:rpk/rpk-connect/rpk-connect-mcp-server-init.adoc[init]: Create the basic folder structure of an MCP server.
17+
* xref:rpk/rpk-connect/rpk-connect-mcp-server-lint.adoc[lint]: Parse Redpanda Connect configs and report any linting errors.
18+
* help, h: Shows a list of commands or help for one command.
19+
20+
== Options
21+
22+
[cols="1m,2a"]
23+
|===
24+
| Option | Description
25+
| --address | An optional address to bind the MCP server to instead of running in stdio mode.
26+
| --tag meta.tags | Optionally limit the resources that this command runs by providing one or more regular expressions. Resources that do not contain a match within the field meta.tags for each tag regular expression specified will be ignored.
27+
| --secrets env: | Attempt to load secrets from a provided URN. If more than one entry is specified they will be attempted in order until a value is found. Environment variable lookups are specified with the URN env:, which by default is the only entry. In order to disable all secret lookups specify a single entry of `none:`. (default: "env:")
28+
| --env-file, -e | Import environment variables from a dotenv file.
29+
| --redpanda-license | Provide an explicit Redpanda License, which enables enterprise functionality. By default licenses found at the path /etc/redpanda/redpanda.license are applied.
30+
| --help, -h | Show help for the command.
31+
|===

0 commit comments

Comments
 (0)