Skip to content

Commit 7a09c53

Browse files
Update MCP quickstart based on docs team tests (#314)
Co-authored-by: Paulo Borges <paulohtb6@gmail.com>
1 parent 8969d05 commit 7a09c53

File tree

2 files changed

+114
-17
lines changed

2 files changed

+114
-17
lines changed

modules/ai-agents/pages/mcp-server/quickstart.adoc

Lines changed: 112 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ This enables natural-language automation for internal workflows, using your own
1818
You'll need the following to complete this quickstart:
1919

2020
- xref:ROOT:get-started:rpk-install.adoc[Redpanda CLI (`rpk`)]
21-
- At least version 4.56.0 of Redpanda Connect
22-
+
23-
If you need to upgrade, see xref:get-started:upgrade/rpk-upgrade.adoc[].
2421
- link:https://docs.anthropic.com/en/docs/claude-code/setup[Claude Code^]
2522

2623
== Initialize an MCP server project
@@ -60,18 +57,27 @@ This command scaffolds your project with the necessary directories and template
6057
└── example-processor.yaml
6158
----
6259

60+
. Make sure your Redpanda Connect version is at least 4.66.1:
61+
+
62+
[,bash]
63+
----
64+
rpk connect --version
65+
----
66+
+
67+
If you need to upgrade, see xref:install:rpk.adoc#upgrade[Upgrade Redpanda Connect].
68+
6369
== Create a tool definition
6470

65-
Save the following YAML to a file named `resources/processors/bluesky.yaml`.
71+
In this step, you'll create a Redpanda Connect configuration that searches public link:https://bsky.app/[Bluesky^] posts using a customizable query. You'll define this configuration as a tool that Claude can discover and use.
6672

67-
This tool enables Claude to search public Bluesky posts using natural language.
73+
Save the following YAML to a file named `bluesky.yaml` and save it in the `resources/processors/` directory:
6874

6975
[source,yaml]
7076
----
7177
label: search-bluesky-posts <1>
7278
try: <2>
7379
- mutation: |
74-
root.limit = root.limit.number(25)
80+
root.limit = root.limit.number(10)
7581
root.limit = [ root.limit, 100 ].min()
7682
root.limit = [ root.limit, 1 ].max()
7783
meta query_string = "q=" + root.query.escape_url_query() + "&limit=%v".format(root.limit)
@@ -84,7 +90,7 @@ try: <2>
8490
format: json_array
8591
8692
meta:
87-
tags: [ example ] <3>
93+
tags: [ bluesky ] <3>
8894
mcp:
8995
enabled: true
9096
description: Search public Bluesky posts based on a query string. <4>
@@ -95,35 +101,42 @@ meta:
95101
description: A Lucene-style query string to search posts.
96102
- name: limit
97103
type: number
98-
description: Number of posts to return (1-100). Defaults to 25.
104+
description: Number of posts to return (1-100). Defaults to 10.
99105
----
100106

101107
This example defines a tool that searches public Bluesky posts based on a query string. Important parts of the configuration include:
102108

103109
<1> A unique label for identification. Claude uses this label to discover and call the tool.
104110
<2> A series of processors to build the HTTP request, handle the response, and format the output.
105-
<3> A unique tag (`example`) to control exposure. You can use tags to group related tools or isolate experiments.
111+
<3> A unique tag (`bluesky`) to control exposure. You can use tags to group related tools or isolate experiments.
106112
<4> A clear description for LLMs helps Claude understand what the tool does.
107113
<5> Structured properties for inputs like `query` and `limit`.
108114

109115
== Start the MCP server
110116

111-
Start the MCP server to expose the tool over HTTP:
117+
. Navigate to your MCP server project directory if you're not already there:
118+
+
119+
[,bash]
120+
----
121+
cd redpanda-connect-mcp
122+
----
112123

124+
. Start the MCP server to expose the tool over HTTP:
125+
+
113126
[source,bash]
114127
----
115-
rpk connect mcp-server --address localhost:4195 --tag example
128+
rpk connect mcp-server --address localhost:4195 --tag bluesky
116129
----
117-
130+
+
118131
You should see output like this:
119-
132+
+
120133
[.no-copy]
121134
----
122135
time=2025-06-27T15:20:27.976+01:00 level=INFO msg="Registering processor tool" label=search-bluesky-posts
123136
time=2025-06-27T15:20:27.978+01:00 level=INFO msg="Successfully loaded Redpanda license" expires_at=2035-06-25T15:20:27+01:00 license_org="" license_type="open source"
124137
----
125-
126-
This command creates an MCP server listening on `localhost:4195`, and makes your tool discoverable to AI agents.
138+
+
139+
This command creates an MCP server listening on `localhost:4195`, and makes your tool discoverable to AI agents. Leave this terminal open while you interact with Claude Code.
127140

128141
:tip-caption: Limit exposure
129142

@@ -140,9 +153,10 @@ Only tools with the specified `--tag` are exposed. This helps you:
140153

141154
== Connect Claude Code to your MCP server
142155

143-
144156
To connect Claude Code to your MCP server, you need to expose a live event stream that Claude can consume. This is done using the link:https://www.npmjs.com/package/mcp-remote[`mcp-remote` utility^], which bridges your local service to Claude's MCP interface. `mcp-remote` is a lightweight bridge that turns any streaming HTTP endpoint into a source of MCP-compatible messages.
145157

158+
. Open a new terminal window.
159+
146160
. To install `mcp-remote`, run:
147161
+
148162
[,bash]
@@ -176,7 +190,6 @@ Tools for local (1 tools)
176190

177191
. Press *Esc* until you return to the main prompt.
178192

179-
180193
== Write a prompt that uses the tool
181194

182195
To use the `search-bluesky-posts` tool in Claude, write a prompt that includes a natural language request.
@@ -254,6 +267,88 @@ To disconnect or stop the MCP server, press kbd:[Ctrl+C] in the terminal where t
254267

255268
You can also close the terminal window or kill the process using standard OS commands (such as `kill <pid>` on Linux/macOS).
256269

270+
== Troubleshoot
271+
272+
This section covers issues you might encounter when setting up and using the MCP server.
273+
274+
=== JSON schema errors
275+
276+
This error indicates you're using an outdated version of Redpanda Connect with an incompatible JSON schema format:
277+
278+
[source,json]
279+
----
280+
{
281+
"type": "error",
282+
"error": {
283+
"type": "invalid_request_error",
284+
"message": "tools.17.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use."
285+
},
286+
"request_id": "req_011CTWPsqnC26DJVUhxnQnn6"
287+
}
288+
----
289+
290+
291+
*Solution*: Upgrade to at least version 4.66.1 of Redpanda Connect.
292+
293+
[source,bash]
294+
----
295+
rpk connect --version
296+
----
297+
298+
If you need to upgrade, see xref:install:rpk.adoc#upgrade[Upgrade Redpanda Connect].
299+
300+
=== Tool not found or not exposed
301+
302+
If Claude Code doesn't show your tool in the tools list, or shows "No tools available":
303+
304+
. Ensure your YAML files are in the correct directory structure. The expected structure is:
305+
+
306+
- Processors: `resources/processors/`
307+
- Inputs: `resources/inputs/`
308+
- Outputs: `resources/outputs/`
309+
- Caches: `resources/caches/`
310+
311+
. Verify MCP metadata:
312+
+
313+
- Confirm your tool has the `meta.mcp.enabled: true` property
314+
- Check that the `meta.tags` array includes the tag you specified when starting the server
315+
+
316+
.Example correct structure
317+
[source,yaml]
318+
----
319+
label: my-tool
320+
# ... processor configuration ...
321+
meta:
322+
tags: [ bluesky ] # Must match --tag argument
323+
mcp:
324+
enabled: true # Required for exposure
325+
description: Tool description
326+
----
327+
328+
=== Connection issues
329+
330+
If Claude Code can't connect to your MCP server:
331+
332+
- Server not running:
333+
+
334+
** Verify the MCP server is still running in your terminal.
335+
** Check that you see the "Registering processor tool" log messages.
336+
** Ensure the server is listening on the expected address (`localhost:4195` by default).
337+
338+
- If port 4195 is already in use, specify a different port:
339+
+
340+
[source,bash]
341+
----
342+
rpk connect mcp-server --address localhost:4196 --tag bluesky
343+
----
344+
+
345+
Then update your `mcp-remote` connection:
346+
+
347+
[source,bash]
348+
----
349+
claude mcp add local -- npx mcp-remote http://localhost:4196/sse
350+
----
351+
257352
== Next steps
258353

259354
Try adding more tools under the same `example` tag to expand Claude Code's capabilities. See xref:ai-agents:mcp-server/developer-guide.adoc[].

modules/configuration/pages/about.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ rate_limit_resources:
144144
interval: 1m
145145
----
146146

147+
ifndef::env-cloud[]
147148
=== Pipelines (streams mode)
148149

149150
When running in xref:guides:streams_mode/about.adoc[streams mode] with the Streams API, labels serve as pipeline names. This enables you to create and reference pipelines by their label through the API.
@@ -158,6 +159,7 @@ curl -X POST http://localhost:4195/streams/data-processor \
158159
# Reference a pipeline by its label
159160
curl http://localhost:4195/streams/data-processor
160161
----
162+
endif::[]
161163

162164
=== Component labeling for clarity
163165

0 commit comments

Comments
 (0)