@redpanda-data/docs-extensions-and-macros 4.12.6 → 4.13.1

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.
Files changed (77) hide show
  1. package/README.adoc +33 -1064
  2. package/bin/doc-tools-mcp.js +720 -0
  3. package/bin/doc-tools.js +1050 -50
  4. package/bin/mcp-tools/antora.js +153 -0
  5. package/bin/mcp-tools/cache.js +89 -0
  6. package/bin/mcp-tools/cloud-regions.js +127 -0
  7. package/bin/mcp-tools/content-review.js +196 -0
  8. package/bin/mcp-tools/crd-docs.js +153 -0
  9. package/bin/mcp-tools/frontmatter.js +138 -0
  10. package/bin/mcp-tools/generated-docs-review.js +887 -0
  11. package/bin/mcp-tools/helm-docs.js +152 -0
  12. package/bin/mcp-tools/index.js +245 -0
  13. package/bin/mcp-tools/job-queue.js +468 -0
  14. package/bin/mcp-tools/mcp-validation.js +266 -0
  15. package/bin/mcp-tools/metrics-docs.js +146 -0
  16. package/bin/mcp-tools/openapi.js +174 -0
  17. package/bin/mcp-tools/prompt-discovery.js +283 -0
  18. package/bin/mcp-tools/property-docs.js +157 -0
  19. package/bin/mcp-tools/rpcn-docs.js +113 -0
  20. package/bin/mcp-tools/rpk-docs.js +141 -0
  21. package/bin/mcp-tools/telemetry.js +211 -0
  22. package/bin/mcp-tools/utils.js +131 -0
  23. package/bin/mcp-tools/versions.js +168 -0
  24. package/cli-utils/convert-doc-links.js +1 -1
  25. package/cli-utils/github-token.js +58 -0
  26. package/cli-utils/self-managed-docs-branch.js +2 -2
  27. package/cli-utils/setup-mcp.js +313 -0
  28. package/docker-compose/25.1/transactions.md +1 -1
  29. package/docker-compose/transactions.md +1 -1
  30. package/extensions/DEVELOPMENT.adoc +464 -0
  31. package/extensions/README.adoc +124 -0
  32. package/extensions/REFERENCE.adoc +768 -0
  33. package/extensions/USER_GUIDE.adoc +339 -0
  34. package/extensions/generate-rp-connect-info.js +3 -4
  35. package/extensions/version-fetcher/get-latest-console-version.js +38 -27
  36. package/extensions/version-fetcher/get-latest-redpanda-version.js +65 -54
  37. package/extensions/version-fetcher/retry-util.js +88 -0
  38. package/extensions/version-fetcher/set-latest-version.js +6 -3
  39. package/macros/DEVELOPMENT.adoc +377 -0
  40. package/macros/README.adoc +105 -0
  41. package/macros/REFERENCE.adoc +222 -0
  42. package/macros/USER_GUIDE.adoc +220 -0
  43. package/macros/rp-connect-components.js +6 -6
  44. package/mcp/CLI_INTERFACE.adoc +384 -0
  45. package/mcp/COSTS.adoc +167 -0
  46. package/mcp/DEVELOPMENT.adoc +726 -0
  47. package/mcp/README.adoc +172 -0
  48. package/mcp/USER_GUIDE.adoc +1392 -0
  49. package/mcp/WRITER_EXTENSION_GUIDE.adoc +814 -0
  50. package/mcp/prompts/README.adoc +183 -0
  51. package/mcp/prompts/property-docs-guide.md +283 -0
  52. package/mcp/prompts/review-for-style.md +128 -0
  53. package/mcp/prompts/rpcn-connector-docs-guide.md +126 -0
  54. package/mcp/prompts/write-new-guide.md +222 -0
  55. package/mcp/team-standards/style-guide.md +321 -0
  56. package/mcp/templates/README.adoc +212 -0
  57. package/mcp/templates/prompt-review-template.md +80 -0
  58. package/mcp/templates/prompt-write-template.md +110 -0
  59. package/mcp/templates/resource-template.md +76 -0
  60. package/package.json +16 -5
  61. package/tools/bundle-openapi.js +20 -10
  62. package/tools/cloud-regions/generate-cloud-regions.js +1 -1
  63. package/tools/fetch-from-github.js +18 -4
  64. package/tools/gen-rpk-ascii.py +3 -1
  65. package/tools/generate-cli-docs.js +325 -0
  66. package/tools/get-console-version.js +4 -2
  67. package/tools/get-redpanda-version.js +4 -2
  68. package/tools/metrics/metrics.py +19 -7
  69. package/tools/property-extractor/Makefile +7 -1
  70. package/tools/property-extractor/cloud_config.py +4 -4
  71. package/tools/property-extractor/constant_resolver.py +11 -11
  72. package/tools/property-extractor/property_extractor.py +18 -16
  73. package/tools/property-extractor/topic_property_extractor.py +2 -2
  74. package/tools/property-extractor/transformers.py +7 -7
  75. package/tools/property-extractor/type_definition_extractor.py +4 -4
  76. package/tools/redpanda-connect/README.adoc +1 -1
  77. package/tools/redpanda-connect/generate-rpcn-connector-docs.js +5 -3
@@ -0,0 +1,1392 @@
1
+ = Redpanda Doc Tools MCP Server
2
+ :toc:
3
+ :toclevels: 3
4
+
5
+ An MCP (Model Context Protocol) server that provides writer-friendly documentation tools to Claude Code. This allows technical writers to manage documentation through natural conversation without needing to know CLI commands or syntax.
6
+
7
+ == Features
8
+
9
+ * Writer-friendly: Natural language interface, no CLI knowledge needed
10
+ * *Version information*: Get latest Redpanda and Console versions with Docker tags
11
+ * *Documentation generation*: Generate property, metrics, and RPK docs for any version
12
+ * *Background jobs*: Long-running tasks can run in background with progress updates
13
+ * *10-minute timeout*: Extended timeout for large documentation generation tasks
14
+ * *Progress streaming*: Real-time progress updates via MCP notifications
15
+ * *Context-aware*: Automatically works in any Redpanda repo based on your current directory
16
+ * *Antora intelligence*: Understands component/module structure
17
+ * *Helpful errors*: Clear error messages with suggestions
18
+ * *No API key needed*: Uses your existing Claude Code authentication
19
+
20
+ == Quickstart
21
+
22
+ === Install dependencies
23
+
24
+ From this repository:
25
+
26
+ [,bash]
27
+ ----
28
+ npm install
29
+ ----
30
+
31
+ === Run setup command
32
+
33
+ Use the built-in setup command (works on macOS, Linux, and Windows):
34
+
35
+ [,bash]
36
+ ----
37
+ npx doc-tools setup-mcp
38
+ ----
39
+
40
+ This automatically:
41
+
42
+ * Detects your operating system
43
+ * Finds your Claude Code/Desktop config location
44
+ * Creates or updates the configuration
45
+ * Creates a backup of existing config
46
+ * Validates everything is correct
47
+
48
+ *Check status:*
49
+
50
+ [,bash]
51
+ ----
52
+ npx doc-tools setup-mcp --status
53
+ ----
54
+
55
+ *Options:*
56
+
57
+ [,bash]
58
+ ----
59
+ # Force update even if already configured
60
+ npx doc-tools setup-mcp --force
61
+
62
+ # Target specific application
63
+ npx doc-tools setup-mcp --target code # Claude Code
64
+ npx doc-tools setup-mcp --target desktop # Claude Desktop
65
+ ----
66
+
67
+ === Restart Claude Code
68
+
69
+ After setup completes, restart Claude Code to load the MCP server.
70
+
71
+ === Start using it!
72
+
73
+ Navigate to any Redpanda repository and start chatting:
74
+
75
+ [,bash]
76
+ ----
77
+ cd ~/repos/docs
78
+ claude
79
+ ----
80
+
81
+ Then in Claude Code:
82
+
83
+ ----
84
+ You: "Show me the Antora structure of this repo"
85
+ Claude: *uses get_antora_structure MCP tool*
86
+
87
+ You: "Generate property docs for v25.3.1"
88
+ Claude: *uses run_doc_tools_command MCP tool*
89
+ *shows generated documentation*
90
+ ----
91
+
92
+ == Choosing the right model
93
+
94
+ The Claude model you use affects both performance and costs. Start Claude Code with the appropriate model for your work:
95
+
96
+ [source,bash]
97
+ ----
98
+ # Haiku - Fast and cheap (best for simple tasks)
99
+ claude --model haiku
100
+
101
+ # Sonnet - Balanced (default, recommended for most work)
102
+ claude --model sonnet
103
+
104
+ # Opus - Most capable (use for complex reasoning)
105
+ claude --model opus
106
+ ----
107
+
108
+ === Recommendations by task type
109
+
110
+ *Use Haiku for:*
111
+
112
+ * Generating documentation from structured data (properties, metrics, RPK commands)
113
+ * Simple content reviews (terminology or style only)
114
+ * Quick lookups and simple operations
115
+
116
+ *Use Sonnet for:*
117
+
118
+ * Comprehensive content reviews
119
+ * Complex documentation tasks requiring reasoning
120
+ * Most day-to-day documentation work (this is the default)
121
+
122
+ *Use Opus for:*
123
+
124
+ * Extremely complex reasoning tasks
125
+ * Currently not needed for most documentation tasks
126
+
127
+ TIP: See xref:COSTS.adoc[] for detailed cost information and optimization tips.
128
+
129
+ == Available tools
130
+
131
+ The MCP server provides *writer-friendly tools* designed for natural language interaction:
132
+
133
+ === Version information tools
134
+
135
+ *get_redpanda_version*:: Get the latest Redpanda version information
136
+ +
137
+ * Returns version number, Docker tag, and release notes URL
138
+ * Optional: Get beta/RC versions with `beta: true`
139
+ * Writers use this to find out what version to document
140
+
141
+ *get_console_version*:: Get the latest Redpanda Console version information
142
+ +
143
+ * Returns version number, Docker tag, and release notes URL
144
+ * Helps writers stay current with Console releases
145
+
146
+ === Documentation generation tools
147
+
148
+ *generate_property_docs*:: Generate Redpanda configuration property documentation
149
+ +
150
+ * Input: Version (for example, "25.3.1", "v25.3.1", or "latest")
151
+ * Optional: Generate AsciiDoc partials with `generate_partials: true`
152
+ * Returns: Files generated, property count, summary
153
+ * Writers use this when updating docs for a new Redpanda release
154
+
155
+ *generate_metrics_docs*:: Generate Redpanda metrics documentation
156
+ +
157
+ * Input: Version (for example, "25.3.1")
158
+ * Creates the public metrics reference page
159
+ * Returns: Files generated, metrics count, summary
160
+ * Writers use this when updating metrics docs for a new release
161
+
162
+ *generate_rpk_docs*:: Generate RPK command-line documentation
163
+ +
164
+ * Input: Version (for example, "25.3.1")
165
+ * Creates AsciiDoc files for all rpk commands
166
+ * Returns: Commands documented, files generated
167
+ * Writers use this when updating CLI docs for a new release
168
+
169
+ *generate_rpcn_connector_docs*:: Generate Redpanda Connect connector documentation
170
+ +
171
+ * Input: Branch (optional, defaults to "main")
172
+ * Creates component documentation for all connectors from the Redpanda Connect repository
173
+ * Returns: Branch used, connectors documented, files generated
174
+ * Writers use this when updating connector reference docs
175
+
176
+ === Quality review tools
177
+
178
+ *review_generated_docs*:: Review generated documentation for quality issues
179
+ +
180
+ * Input: Type (for example, "property-docs", "connector-docs") and version
181
+ * Analyzes generated documentation for common quality issues
182
+ * Checks for consistency, completeness, and documentation standards
183
+ * Returns: Review report with issues found, suggestions, and quality score
184
+ * Writers use this after generating documentation to ensure quality before committing
185
+
186
+ === Structure and discovery tools
187
+
188
+ *get_antora_structure*:: Analyze and understand the Antora component/module structure
189
+ +
190
+ * Shows all components, versions, and modules
191
+ * Lists available directories (pages, partials, examples, etc.)
192
+ * Detects if doc-tools is available
193
+ * Helps writers understand the documentation layout
194
+
195
+ === Advanced tools
196
+
197
+ *run_doc_tools_command*:: Execute raw `npx doc-tools <command>`
198
+ +
199
+ * Advanced: Only use if none of the specific tools above fit your needs
200
+ * Requires knowledge of doc-tools CLI syntax
201
+ * Only works in repos that have doc-tools installed
202
+
203
+ === Contextual guides (prompts)
204
+
205
+ *property-docs-guide*:: Comprehensive guide for updating Redpanda property documentation
206
+ +
207
+ * Explains the auto-generation system and override workflow
208
+ * Provides rules for property descriptions (no cloud conditionals, no enterprise includes)
209
+ * Lists common scenarios and validation steps
210
+ * Claude automatically retrieves this when working with property documentation
211
+ * Ensures correct workflow: update property-overrides.json, not generated .adoc files
212
+
213
+ *rpcn-connector-docs-guide*:: Comprehensive guide for updating Redpanda Connect connector reference documentation
214
+ +
215
+ * Explains the override system with `$ref` syntax for DRY (Don't Repeat Yourself) principles
216
+ * Describes repository structure and how autogenerated content works with overrides
217
+ * Provides workflow for improving connector documentation
218
+ * Claude automatically retrieves this when working with connector documentation
219
+ * Ensures correct workflow: update docs-data/overrides.json, use $ref for deduplication
220
+
221
+ === Background job management
222
+
223
+ Long-running documentation generation tasks support background execution with progress updates:
224
+
225
+ *get_job_status*:: Check the status and progress of a background job
226
+ +
227
+ * Returns job status, progress percentage, and progress message
228
+ * Use the job ID returned when creating a background job
229
+ * Job statuses: `pending`, `running`, `completed`, `failed`
230
+
231
+ *list_jobs*:: List all background jobs with optional filtering
232
+ +
233
+ * Returns list of recent jobs with their status
234
+ * Optional filters: status (pending/running/completed/failed), tool name
235
+ * Jobs are automatically cleaned up after 1 hour
236
+
237
+ *How to use background jobs:*
238
+
239
+ Add `background: true` to any long-running generation tool:
240
+
241
+ [,bash]
242
+ ----
243
+ # Synchronous (default) - waits for completion
244
+ generate_property_docs(version: "v25.3.1", generate_partials: true)
245
+
246
+ # Background - returns job ID immediately
247
+ generate_property_docs(version: "v25.3.1", generate_partials: true, background: true)
248
+
249
+ # Check job status
250
+ get_job_status(job_id: "abc-123-def-456")
251
+
252
+ # List all jobs
253
+ list_jobs(status: "running")
254
+ ----
255
+
256
+ *Progress updates:*
257
+
258
+ Background jobs send real-time progress notifications via MCP protocol, so Claude Code can show you:
259
+
260
+ * Current progress percentage (0-100%)
261
+ * Current operation being performed
262
+ * Estimated time remaining (when available)
263
+
264
+ *Timeout:*
265
+
266
+ All commands have a 10-minute timeout (increased from 5 minutes) to handle large documentation generation tasks.
267
+
268
+ == Available prompts
269
+
270
+ The MCP server provides *AI consistency prompts* that help Claude follow your team's documentation standards automatically. These prompts are pre-configured instructions that guide Claude's responses for common documentation tasks.
271
+
272
+ === Documentation review prompts
273
+
274
+ *review-for-style*:: Review documentation content for style guide compliance
275
+ +
276
+ * Checks: Style guide compliance, terminology consistency, voice/tone, AsciiDoc formatting
277
+ * Input: Content to review (can be file path or raw text)
278
+ * Output: Detailed feedback with critical issues, suggestions, and actionable recommendations
279
+ * Use when: Reviewing any documentation before publishing
280
+
281
+ *check-terminology*:: Validate terminology usage against approved team terminology
282
+ +
283
+ * Checks: Incorrect terms, deprecated terms (whitelist/blacklist, master/slave), inconsistent usage
284
+ * Input: Content to check
285
+ * Output: Critical issues with corrections, inconsistencies found, missing glossary links
286
+ * Use when: Ensuring consistent terminology across documentation
287
+
288
+ *improve-clarity*:: Refactor existing documentation for clarity and readability
289
+ +
290
+ * Applies: Style guide principles, simplifies complex explanations, improves structure
291
+ * Input: Content to improve
292
+ * Output: Refactored content with explanations of changes made
293
+ * Use when: Content is technically correct but difficult to understand
294
+
295
+ === Content creation prompts
296
+
297
+ *write-new-guide*:: Generate a new tutorial or guide following team standards
298
+ +
299
+ * Applies: Team templates, approved terminology, voice/tone guidelines, AsciiDoc formatting
300
+ * Input: Topic (what to write about), optional audience (beginners, experienced devs, operators)
301
+ * Output: Complete guide following team standards
302
+ * Use when: Starting a new tutorial, how-to, or getting started guide
303
+
304
+ === Workflow guide prompts
305
+
306
+ *property-docs-guide*:: Comprehensive guide for updating Redpanda property documentation
307
+ +
308
+ * Explains: Auto-generation system, override workflow, validation steps
309
+ * Rules: Never edit generated `.adoc` files, always update `property-overrides.json`
310
+ * Use when: Claude is helping with property documentation
311
+ * Claude automatically retrieves this prompt when working with properties
312
+
313
+ *rpcn-connector-docs-guide*:: Guide for updating Redpanda Connect connector documentation
314
+ +
315
+ * Explains: Override system with `$ref` syntax for DRY principles, repository structure
316
+ * Rules: Update `docs-data/overrides.json`, use `$ref` for deduplication
317
+ * Use when: Claude is helping with connector documentation
318
+ * Claude automatically retrieves this prompt when working with connectors
319
+
320
+ === How to use prompts
321
+
322
+ Prompts work through natural conversation with Claude Code:
323
+
324
+ *Explicit prompt usage:*
325
+
326
+ ----
327
+ You: "Use the review-for-style prompt with this content: [paste content]"
328
+ Claude: *retrieves and applies the review-for-style prompt*
329
+ *provides structured feedback following the prompt instructions*
330
+ ----
331
+
332
+ *Implicit prompt usage:*
333
+
334
+ ----
335
+ You: "Review this tutorial for our style guide"
336
+ Claude: *automatically uses review-for-style prompt*
337
+ *provides feedback based on your team standards*
338
+ ----
339
+
340
+ *Listing available prompts:*
341
+
342
+ ----
343
+ You: "List available prompts"
344
+ Claude: *shows all prompts with descriptions*
345
+ ----
346
+
347
+ You can also preview prompts using the CLI:
348
+
349
+ [,bash]
350
+ ----
351
+ # Preview a review prompt
352
+ npx doc-tools preview-prompt review-for-style --content "Test content"
353
+
354
+ # Preview a write prompt
355
+ npx doc-tools preview-prompt write-new-guide --topic "Deploy cluster"
356
+
357
+ # List all prompts with versions
358
+ npx doc-tools mcp-version
359
+ ----
360
+
361
+ == Available resources
362
+
363
+ Resources are reference materials that Claude can read to understand your team's standards.
364
+
365
+ === Style guide
366
+
367
+ *redpanda://style-guide*:: Redpanda Documentation Style Guide (v1.0.0)
368
+ +
369
+ * Complete style guide based on Google Developer Documentation Style Guide
370
+ * Includes: Redpanda-specific guidelines, voice and tone, AsciiDoc formatting rules
371
+ * Contains: Terminology quick reference, formatting examples, common patterns
372
+ * Claude automatically references this when reviewing or writing documentation
373
+
374
+ === How to use resources
375
+
376
+ Resources are automatically loaded by prompts, but you can also reference them explicitly:
377
+
378
+ *Explicit reference:*
379
+
380
+ ----
381
+ You: "Read the redpanda://style-guide resource and tell me the rules for code blocks"
382
+ Claude: *reads the style guide resource*
383
+ *explains the code block formatting rules*
384
+ ----
385
+
386
+ *Listing available resources:*
387
+
388
+ ----
389
+ You: "List available resources"
390
+ Claude: *shows all resources with descriptions and versions*
391
+ ----
392
+
393
+ === Design philosophy
394
+
395
+ These tools are designed to be *conversational*:
396
+
397
+ * Writers use natural language: "What's the latest Redpanda version?"
398
+ * Claude understands and calls the appropriate tool
399
+ * No need to remember CLI commands or flags
400
+ * Clear, structured responses with helpful error messages
401
+
402
+ Claude Code's built-in tools handle everything else:
403
+
404
+ * *File operations* (Read, Write, Edit)
405
+ * *Search* (Glob for files, Grep for content)
406
+ * *Git operations* (Bash tool)
407
+
408
+ == JSON response structures
409
+
410
+ === get_antora_structure
411
+
412
+ Returns comprehensive information about the Antora documentation structure:
413
+
414
+ [,json]
415
+ ----
416
+ {
417
+ "repoRoot": "/absolute/path/to/repo",
418
+ "repoInfo": {
419
+ "root": "/absolute/path/to/repo",
420
+ "detected": true,
421
+ "type": "git" // or "npm" or null
422
+ },
423
+ "playbook": {
424
+ // Parsed playbook YAML content (if found)
425
+ "site": { /* ... */ },
426
+ "content": { /* ... */ }
427
+ },
428
+ "playbookPath": "/absolute/path/to/local-antora-playbook.yml",
429
+ "components": [
430
+ {
431
+ "name": "redpanda",
432
+ "version": "25.3",
433
+ "title": "Redpanda Documentation",
434
+ "path": "/absolute/path/to/component",
435
+ "modules": [
436
+ {
437
+ "name": "ROOT",
438
+ "path": "/absolute/path/to/component/modules/ROOT",
439
+ "pages": true,
440
+ "partials": true,
441
+ "examples": false,
442
+ "attachments": false,
443
+ "images": true
444
+ }
445
+ ]
446
+ }
447
+ ],
448
+ "hasDocTools": true // Whether doc-tools is available
449
+ }
450
+ ----
451
+
452
+ *Field descriptions:*
453
+
454
+ repoRoot:: Absolute path to repository root
455
+ repoInfo.detected:: Whether a repository was detected (vs using current directory)
456
+ repoInfo.type:: Repository type (`"git"`, `"npm"`, or `null`)
457
+ playbook:: Parsed YAML content of the Antora playbook (if found)
458
+ playbookPath:: Full path to the playbook file used
459
+ components[]:: Array of Antora components found
460
+ * `name`: Component name from antora.yml
461
+ * `version`: Component version
462
+ * `title`: Component display title
463
+ * `path`: Absolute path to component directory
464
+ * `modules[]`: Array of modules in this component
465
+ ** Boolean flags indicate which directories exist in each module
466
+
467
+ === run_doc_tools_command
468
+
469
+ ==== Success response
470
+
471
+ [,json]
472
+ ----
473
+ {
474
+ "success": true,
475
+ "output": "Generated property docs for v25.3.1\n✓ Created 42 documentation files",
476
+ "command": "npx doc-tools generate property-docs --tag v25.3.1",
477
+ "repoRoot": "/absolute/path/to/repo"
478
+ }
479
+ ----
480
+
481
+ *Field descriptions:*
482
+
483
+ success:: Always `true` for successful executions
484
+ output:: Combined stdout from the command
485
+ command:: The full command that was executed
486
+ repoRoot:: Repository root where command was executed
487
+
488
+ ==== Error response: Command validation failed
489
+
490
+ [,json]
491
+ ----
492
+ {
493
+ "success": false,
494
+ "error": "Invalid command: shell metacharacters not allowed. Use simple doc-tools commands only.",
495
+ "suggestion": "Use simple doc-tools commands like: \"generate property-docs --tag v25.3.1\""
496
+ }
497
+ ----
498
+
499
+ ==== Error response: doc-tools not found
500
+
501
+ [,json]
502
+ ----
503
+ {
504
+ "success": false,
505
+ "error": "doc-tools not found in this repository. This command only works in repos with doc-tools installed.",
506
+ "suggestion": "Navigate to the docs-extensions-and-macros repository or a repo that has doc-tools as a dependency.",
507
+ "repoInfo": {
508
+ "root": "/current/directory",
509
+ "detected": false,
510
+ "type": null
511
+ }
512
+ }
513
+ ----
514
+
515
+ ==== Error response: Command execution failed
516
+
517
+ [,json]
518
+ ----
519
+ {
520
+ "success": false,
521
+ "error": "Command failed with exit code 1",
522
+ "stdout": "Processing files...\nFound 10 properties",
523
+ "stderr": "Error: Tag v25.3.1 not found",
524
+ "exitCode": 1,
525
+ "command": "npx doc-tools generate property-docs --tag v25.3.1",
526
+ "repoRoot": "/absolute/path/to/repo"
527
+ }
528
+ ----
529
+
530
+ *Field descriptions:*
531
+
532
+ success:: Always `false` for errors
533
+ error:: Human-readable error message
534
+ stdout:: Standard output from the command (if any)
535
+ stderr:: Standard error from the command (if any)
536
+ exitCode:: Exit code from the command
537
+ suggestion:: Helpful suggestion for resolving the error (when applicable)
538
+
539
+ === Error response - Unknown tool
540
+
541
+ [,json]
542
+ ----
543
+ {
544
+ "success": false,
545
+ "error": "Unknown tool: invalid_tool_name",
546
+ "availableTools": ["get_antora_structure", "run_doc_tools_command"]
547
+ }
548
+ ----
549
+
550
+ === Error response - Internal error
551
+
552
+ [,json]
553
+ ----
554
+ {
555
+ "success": false,
556
+ "error": "Detailed error message",
557
+ "stack": "Error stack trace..." // Only in development mode
558
+ }
559
+ ----
560
+
561
+ NOTE: Stack traces are only included when `NODE_ENV=development` for security reasons.
562
+
563
+ === get_redpanda_version
564
+
565
+ ==== Success response
566
+
567
+ [,json]
568
+ ----
569
+ {
570
+ "success": true,
571
+ "version": "v25.3.1",
572
+ "docker_tag": "docker.redpanda.com/redpandadata/redpanda:v25.3.1",
573
+ "is_beta": false,
574
+ "notes_url": "https://github.com/redpanda-data/redpanda/releases/tag/v25.3.1"
575
+ }
576
+ ----
577
+
578
+ *Field descriptions:*
579
+
580
+ success:: Always `true` for successful requests
581
+ version:: Latest Redpanda version (with 'v' prefix)
582
+ docker_tag:: Full Docker image tag for this version
583
+ is_beta:: Whether this is a beta/RC version
584
+ notes_url:: GitHub release notes URL
585
+
586
+ ==== Beta version response
587
+
588
+ [,json]
589
+ ----
590
+ {
591
+ "success": true,
592
+ "version": "v25.4.1-rc1",
593
+ "docker_tag": "docker.redpanda.com/redpandadata/redpanda-unstable:v25.4.1-rc1",
594
+ "is_beta": true,
595
+ "notes_url": "https://github.com/redpanda-data/redpanda/releases/tag/v25.4.1-rc1"
596
+ }
597
+ ----
598
+
599
+ ==== Error response
600
+
601
+ [,json]
602
+ ----
603
+ {
604
+ "success": false,
605
+ "error": "Network error: Failed to fetch version information",
606
+ "suggestion": "Make sure you have network access to fetch version information from GitHub"
607
+ }
608
+ ----
609
+
610
+ === get_console_version
611
+
612
+ ==== Success response
613
+
614
+ [,json]
615
+ ----
616
+ {
617
+ "success": true,
618
+ "version": "v2.7.2",
619
+ "docker_tag": "docker.redpanda.com/redpandadata/console:v2.7.2",
620
+ "notes_url": "https://github.com/redpanda-data/console/releases/tag/v2.7.2"
621
+ }
622
+ ----
623
+
624
+ *Field descriptions:*
625
+
626
+ success:: Always `true` for successful requests
627
+ version:: Latest Console version (with 'v' prefix)
628
+ docker_tag:: Full Docker image tag for Console
629
+ notes_url:: GitHub release notes URL
630
+
631
+ ==== Error response
632
+
633
+ [,json]
634
+ ----
635
+ {
636
+ "success": false,
637
+ "error": "Network error: Failed to fetch version information",
638
+ "suggestion": "Make sure you have network access to fetch version information from GitHub"
639
+ }
640
+ ----
641
+
642
+ === generate_property_docs
643
+
644
+ ==== Success response: (JSON only)
645
+
646
+ [,json]
647
+ ----
648
+ {
649
+ "success": true,
650
+ "version": "v25.3.1",
651
+ "files_generated": [
652
+ "modules/reference/partials/properties.json"
653
+ ],
654
+ "property_count": 342,
655
+ "output": "Generated 342 properties\nSaved to modules/reference/partials/properties.json",
656
+ "summary": "Generated property documentation for Redpanda v25.3.1"
657
+ }
658
+ ----
659
+
660
+ ==== Success response: (with AsciiDoc partials)
661
+
662
+ [,json]
663
+ ----
664
+ {
665
+ "success": true,
666
+ "version": "v25.3.1",
667
+ "files_generated": [
668
+ "modules/reference/partials/cluster-properties.adoc",
669
+ "modules/reference/partials/broker-properties.adoc",
670
+ "modules/reference/partials/tunable-properties.adoc",
671
+ "modules/reference/partials/topic-properties.adoc",
672
+ "modules/reference/partials/properties.json"
673
+ ],
674
+ "property_count": 342,
675
+ "output": "Generated 342 properties...",
676
+ "summary": "Generated property documentation for Redpanda v25.3.1"
677
+ }
678
+ ----
679
+
680
+ *Field descriptions:*
681
+
682
+ success:: Always `true` for successful generation
683
+ version:: Redpanda version used (normalized with 'v' prefix)
684
+ files_generated:: Array of files created
685
+ property_count:: Number of properties documented (if parseable from output)
686
+ output:: Raw output from the generation command
687
+ summary:: Human-readable summary
688
+
689
+ ==== Error response: Missing version
690
+
691
+ [,json]
692
+ ----
693
+ {
694
+ "success": false,
695
+ "error": "Version is required",
696
+ "suggestion": "Provide a version like \"25.3.1\", \"v25.3.1\", or \"latest\""
697
+ }
698
+ ----
699
+
700
+ ==== Error response: doc-tools not found
701
+
702
+ [,json]
703
+ ----
704
+ {
705
+ "success": false,
706
+ "error": "doc-tools not found in this repository",
707
+ "suggestion": "Navigate to the docs-extensions-and-macros repository"
708
+ }
709
+ ----
710
+
711
+ ==== Error response: Generation failed
712
+
713
+ [,json]
714
+ ----
715
+ {
716
+ "success": false,
717
+ "error": "Command failed with exit code 1",
718
+ "stdout": "Processing files...\nFound 0 properties",
719
+ "stderr": "Error: Tag v25.3.1 not found in Redpanda repository",
720
+ "exitCode": 1,
721
+ "suggestion": "Check that the version exists in the Redpanda repository"
722
+ }
723
+ ----
724
+
725
+ === generate_metrics_docs
726
+
727
+ ==== Success response
728
+
729
+ [,json]
730
+ ----
731
+ {
732
+ "success": true,
733
+ "version": "v25.3.1",
734
+ "files_generated": [
735
+ "modules/reference/pages/public-metrics-reference.adoc"
736
+ ],
737
+ "metrics_count": 156,
738
+ "output": "Generated 156 metrics...",
739
+ "summary": "Generated metrics documentation for Redpanda v25.3.1"
740
+ }
741
+ ----
742
+
743
+ *Field descriptions:*
744
+
745
+ success:: Always `true` for successful generation
746
+ version:: Redpanda version used (normalized with 'v' prefix)
747
+ files_generated:: Array of files created
748
+ metrics_count:: Number of metrics documented (if parseable)
749
+ output:: Raw output from the generation command
750
+ summary:: Human-readable summary
751
+
752
+ ==== Error responses
753
+
754
+ Same error response structure as `generate_property_docs` (missing version, doc-tools not found, generation failed).
755
+
756
+ === generate_rpk_docs
757
+
758
+ ==== Success response
759
+
760
+ [,json]
761
+ ----
762
+ {
763
+ "success": true,
764
+ "version": "v25.3.1",
765
+ "commands_documented": 87,
766
+ "files_generated": ["autogenerated/v25.3.1/rpk/*.adoc"],
767
+ "output": "Generated 87 commands...",
768
+ "summary": "Generated RPK documentation for Redpanda v25.3.1"
769
+ }
770
+ ----
771
+
772
+ *Field descriptions:*
773
+
774
+ success:: Always `true` for successful generation
775
+ version:: Redpanda version used (normalized with 'v' prefix)
776
+ commands_documented:: Number of RPK commands documented
777
+ files_generated:: Array indicating where files were created
778
+ output:: Raw output from the generation command
779
+ summary:: Human-readable summary
780
+
781
+ ==== Error responses
782
+
783
+ Same error response structure as `generate_property_docs` (missing version, doc-tools not found, generation failed).
784
+
785
+ === generate_rpcn_connector_docs
786
+
787
+ ==== Success response
788
+
789
+ [,json]
790
+ ----
791
+ {
792
+ "success": true,
793
+ "branch": "main",
794
+ "connectors_documented": 245,
795
+ "files_generated": ["modules/reference/pages/redpanda-connect/components/"],
796
+ "output": "Generated 245 connectors...",
797
+ "summary": "Generated Redpanda Connect connector documentation from branch main"
798
+ }
799
+ ----
800
+
801
+ *Field descriptions:*
802
+
803
+ success:: Always `true` for successful generation
804
+ branch:: Branch used to generate documentation (defaults to "main")
805
+ connectors_documented:: Number of connectors documented (if parseable, otherwise `null`)
806
+ files_generated:: Array indicating where files were created
807
+ output:: Raw output from the generation command
808
+ summary:: Human-readable summary
809
+
810
+ ==== Error responses
811
+
812
+ Same error response structure as `generate_property_docs` (doc-tools not found, generation failed).
813
+
814
+ === review_generated_docs
815
+
816
+ ==== Success response
817
+
818
+ [,json]
819
+ ----
820
+ {
821
+ "success": true,
822
+ "doc_type": "property-docs",
823
+ "version": "v25.3.1",
824
+ "report_file": "review-properties-25.3.1-2025-11-24.adoc",
825
+ "issues_found": {
826
+ "missing_descriptions": 3,
827
+ "formatting_issues": 5,
828
+ "inconsistencies": 2
829
+ },
830
+ "quality_score": 92,
831
+ "summary": "Review completed for property documentation v25.3.1. Found 10 issues across 342 properties."
832
+ }
833
+ ----
834
+
835
+ *Field descriptions:*
836
+
837
+ success:: Always `true` for successful review
838
+ doc_type:: Type of documentation reviewed ("property-docs", "connector-docs", etc.)
839
+ version:: Version of the documentation reviewed
840
+ report_file:: Path to the generated review report file
841
+ issues_found:: Object containing counts of different issue types
842
+ quality_score:: Overall quality score (0-100)
843
+ summary:: Human-readable summary of the review
844
+
845
+ ==== Error responses
846
+
847
+ Same error response structure as `generate_property_docs` (missing required parameters, doc-tools not found).
848
+
849
+ == Usage examples
850
+
851
+ === Example 1: Get version information
852
+
853
+ ----
854
+ You: What's the latest Redpanda version?
855
+ Claude: *uses get_redpanda_version MCP tool*
856
+
857
+ The latest Redpanda version is v25.3.1, released on January 15, 2024.
858
+
859
+ Docker tag: docker.redpanda.com/redpandadata/redpanda:v25.3.1
860
+ Release notes: https://github.com/redpanda-data/redpanda/releases/tag/v25.3.1
861
+ ----
862
+
863
+ ----
864
+ You: What about the latest beta version?
865
+ Claude: *uses get_redpanda_version with beta: true*
866
+
867
+ The latest beta version is v25.4.1-rc1.
868
+
869
+ Docker tag: docker.redpanda.com/redpandadata/redpanda-unstable:v25.4.1-rc1
870
+ ----
871
+
872
+ === Example 2: Generate property documentation
873
+
874
+ ----
875
+ You: Generate property docs for version 25.3.1
876
+ Claude: *uses generate_property_docs MCP tool*
877
+
878
+ ✓ Generated property documentation for Redpanda v25.3.1
879
+
880
+ Files created:
881
+ - modules/reference/partials/properties.json
882
+
883
+ Documented 342 properties from Redpanda v25.3.1
884
+ ----
885
+
886
+ ----
887
+ You: Now generate the AsciiDoc partials too
888
+ Claude: *uses generate_property_docs with generate_partials: true*
889
+
890
+ ✓ Generated property documentation for Redpanda v25.3.1
891
+
892
+ Files created:
893
+ - modules/reference/partials/cluster-properties.adoc
894
+ - modules/reference/partials/broker-properties.adoc
895
+ - modules/reference/partials/tunable-properties.adoc
896
+ - modules/reference/partials/topic-properties.adoc
897
+ - modules/reference/partials/properties.json
898
+
899
+ Documented 342 properties
900
+ ----
901
+
902
+ === Example 3: Complete documentation update workflow
903
+
904
+ ----
905
+ You: I need to update the docs for Redpanda 25.3.1. Can you:
906
+ 1. Get the latest version to confirm
907
+ 2. Generate property docs
908
+ 3. Generate metrics docs
909
+ 4. Generate RPK docs
910
+ 5. Show me what files changed
911
+
912
+ Claude: *uses get_redpanda_version*
913
+ Confirmed: Latest version is v25.3.1
914
+
915
+ *uses generate_property_docs*
916
+ ✓ Generated 342 properties
917
+
918
+ *uses generate_metrics_docs*
919
+ ✓ Generated 156 metrics
920
+
921
+ *uses generate_rpk_docs*
922
+ ✓ Generated 87 RPK commands
923
+
924
+ *uses Bash tool to run git status*
925
+ Changes:
926
+ - modules/reference/partials/properties.json
927
+ - modules/reference/pages/public-metrics-reference.adoc
928
+ - autogenerated/v25.3.1/rpk/*.adoc
929
+
930
+ Would you like me to review the changes or commit them?
931
+ ----
932
+
933
+ === Example 4: Console version information
934
+
935
+ ----
936
+ You: What's the latest Redpanda Console version and Docker tag?
937
+ Claude: *uses get_console_version MCP tool*
938
+
939
+ The latest Redpanda Console version is v2.7.2.
940
+
941
+ Docker tag: docker.redpanda.com/redpandadata/console:v2.7.2
942
+ Release notes: https://github.com/redpanda-data/console/releases/tag/v2.7.2
943
+ ----
944
+
945
+ === Example 5: Understanding documentation structure
946
+
947
+ ----
948
+ You: Show me the Antora structure of this repo
949
+ Claude: *uses get_antora_structure MCP tool*
950
+
951
+ This repository has the following Antora structure:
952
+
953
+ Components:
954
+ - redpanda (version: 25.3)
955
+ - Modules:
956
+ - ROOT (pages, partials, images)
957
+ - reference (pages, partials)
958
+ - deployment (pages, examples)
959
+
960
+ The repository has doc-tools installed, so you can generate documentation.
961
+ ----
962
+
963
+ === Example 6: Error handling
964
+
965
+ ----
966
+ You: Generate property docs for version 99.9.9
967
+ Claude: *uses generate_property_docs MCP tool*
968
+
969
+ ❌ Generation failed: Tag v99.9.9 not found in Redpanda repository
970
+
971
+ Suggestion: Check that the version exists in the Redpanda repository. You can find available versions at:
972
+ https://github.com/redpanda-data/redpanda/releases
973
+ ----
974
+
975
+ === Example 7: Property documentation updates (with prompt)
976
+
977
+ ----
978
+ You: Improve the description for cleanup.policy property to explain what each value does
979
+
980
+ Claude: *retrieves property-docs-guide prompt*
981
+ *reads property-overrides.json*
982
+ *updates the description field with enhanced explanation*
983
+ *uses generate_property_docs MCP tool with generate_partials: true*
984
+
985
+ ✓ Updated property-overrides.json with enhanced description for cleanup.policy
986
+ ✓ Generated property documentation for Redpanda v25.3.1
987
+
988
+ Files updated:
989
+ - docs-data/property-overrides.json
990
+ - modules/reference/partials/properties/topic-properties.adoc
991
+
992
+ The description now explains:
993
+ - `delete` - Deletes data according to retention limits
994
+ - `compact` - Keeps latest value per key
995
+ - `compact,delete` - Compaction + time-based deletion
996
+ ----
997
+
998
+ This example shows how the prompt automatically provides context about the property documentation workflow, ensuring Claude follows the correct process (update overrides, not generated files).
999
+
1000
+ === Example 8: Review documentation for style compliance
1001
+
1002
+ ----
1003
+ You: Review this tutorial for style guide compliance:
1004
+
1005
+ [Content of tutorial pasted here]
1006
+
1007
+ Claude: *uses review-for-style prompt*
1008
+ *analyzes content against team style guide*
1009
+
1010
+ Style Review for Tutorial
1011
+ ==========================================
1012
+
1013
+ Critical Issues (3):
1014
+
1015
+ 1. **Deprecated Terminology**
1016
+ - Location: Prerequisites section
1017
+ - Found: "whitelist the following IPs"
1018
+ - Should be: "allowlist the following IPs"
1019
+ - Reason: "whitelist" is deprecated terminology
1020
+
1021
+ 2. **Inconsistent Heading Format**
1022
+ - Location: Section 3
1023
+ - Found: "step 1: configure broker"
1024
+ - Should be: "Step 1: Configure broker"
1025
+ - Reason: Headings must use title case
1026
+
1027
+ 3. **Missing Glossary Link**
1028
+ - Location: Introduction, first mention of "partition"
1029
+ - Should use: `glossterm:partition,partitions[]`
1030
+ - Reason: First mention of technical terms should link to glossary
1031
+
1032
+ Suggestions (5):
1033
+ - Voice could be more active in section 2
1034
+ - Code example in section 4 missing expected output
1035
+ [...]
1036
+
1037
+ Overall: Good structure, clear explanations. Fix critical issues before publishing.
1038
+ ----
1039
+
1040
+ === Example 9: Check terminology in existing content
1041
+
1042
+ ----
1043
+ You: Check the terminology in this doc for any deprecated or incorrect terms
1044
+
1045
+ Claude: *uses check-terminology prompt*
1046
+
1047
+ Terminology Review
1048
+ ==========================================
1049
+
1050
+ Critical Issues (2):
1051
+
1052
+ **Location**: Configuration section, step 3
1053
+ **Found**: "SSL encryption"
1054
+ **Should be**: "TLS encryption"
1055
+ **Reason**: SSL is deprecated. TLS is the current standard.
1056
+
1057
+ **Location**: Architecture diagram
1058
+ **Found**: "master node"
1059
+ **Should be**: "leader node"
1060
+ **Reason**: master/slave terminology is deprecated. Use leader/replica.
1061
+
1062
+ Summary:
1063
+ - Total issues found: 2
1064
+ - Critical fixes needed: 2
1065
+ - Overall terminology health: Good (once fixed)
1066
+ ----
1067
+
1068
+ === Example 10: Write a new guide with team standards
1069
+
1070
+ ----
1071
+ You: Write a getting started guide for deploying a 3-node Redpanda cluster
1072
+
1073
+ Claude: *uses write-new-guide prompt*
1074
+ *applies team templates and standards*
1075
+
1076
+ = Deploy a Three-Node Redpanda Cluster
1077
+ :description: Learn how to deploy a production-ready Redpanda cluster with three nodes
1078
+ :page-aliases: deployment:deploy-three-node.adoc
1079
+
1080
+ This guide walks you through deploying a three-node glossterm:cluster[] for production use.
1081
+
1082
+ == Prerequisites
1083
+
1084
+ Before you begin, ensure you have:
1085
+
1086
+ * Three servers or VMs with supported operating systems
1087
+ * At least 2 GB RAM per server
1088
+ * Network connectivity between all nodes
1089
+
1090
+ [Additional sections following team structure...]
1091
+
1092
+ ✓ Generated guide following team standards:
1093
+ - Uses approved terminology with glossary links
1094
+ - Follows team voice/tone guidelines
1095
+ - Includes proper AsciiDoc metadata
1096
+ - Uses team-standard structure for tutorials
1097
+ ----
1098
+
1099
+ === Example 11: Improve clarity of complex explanation
1100
+
1101
+ ----
1102
+ You: This explanation of compaction is too complex. Can you simplify it?
1103
+
1104
+ [Paste complex explanation]
1105
+
1106
+ Claude: *uses improve-clarity prompt*
1107
+
1108
+ Here's a clearer version:
1109
+
1110
+ **Original** (complex, nested concepts):
1111
+ "Log compaction ensures the retention of the most recent update for each record key
1112
+ within the log of data, while simultaneously removing older updates to the same key
1113
+ in a manner that preserves the temporal ordering of messages..."
1114
+
1115
+ **Improved** (clear, progressive):
1116
+ Log compaction keeps only the latest value for each key in a topic:
1117
+
1118
+ 1. For each message key, Redpanda keeps the most recent message
1119
+ 2. Older messages with the same key are deleted
1120
+ 3. Message order is preserved
1121
+
1122
+ This reduces storage while maintaining the current state of your data.
1123
+
1124
+ **Changes made:**
1125
+ - Simplified sentence structure
1126
+ - Broke complex sentence into numbered steps
1127
+ - Added concrete example
1128
+ - Kept technical accuracy while improving readability
1129
+ ----
1130
+
1131
+ == How it works
1132
+
1133
+ === Context detection
1134
+
1135
+ The MCP server automatically:
1136
+
1137
+ . Detects the repository root from your current working directory
1138
+ . Looks for Antora structure (components, modules)
1139
+ . Checks if `doc-tools` is available
1140
+ . All operations happen relative to the detected repo
1141
+
1142
+ === Multi-repo support
1143
+
1144
+ You can use the *same MCP server* across all your repos:
1145
+
1146
+ [,bash]
1147
+ ----
1148
+ # In docs-extensions-and-macros
1149
+ cd ~/repos/docs-extensions-and-macros
1150
+ claude # MCP server works here
1151
+
1152
+ # In main docs repo
1153
+ cd ~/repos/docs
1154
+ claude # Same MCP server, different context
1155
+
1156
+ # In cloud docs
1157
+ cd ~/repos/cloud-docs
1158
+ claude # Still works!
1159
+ ----
1160
+
1161
+ === Tool execution
1162
+
1163
+ When you ask Claude to do something:
1164
+
1165
+ . Claude decides which tools to use
1166
+ . Claude calls the MCP server with tool requests
1167
+ . The server executes in your current repo context
1168
+ . Results are returned to Claude
1169
+ . Claude shows you what happened
1170
+
1171
+ == Configuration
1172
+
1173
+ === Configuration locations
1174
+
1175
+ The `setup-mcp` command uses the official `claude mcp add` CLI command, which automatically configures the MCP server in the correct location:
1176
+
1177
+ *Claude Code:*
1178
+
1179
+ * *All platforms*: `~/.claude.json` (user configuration file with `mcpServers` section)
1180
+ * This works across macOS, Linux, and Windows
1181
+
1182
+ *Claude Desktop:*
1183
+
1184
+ * *macOS*: `~/Library/Application Support/Claude/claude_desktop_config.json`
1185
+ * *Linux*: `~/.config/Claude/claude_desktop_config.json`
1186
+ * *Windows*: `%APPDATA%\Claude\claude_desktop_config.json`
1187
+
1188
+ === Manual configuration (advanced)
1189
+
1190
+ If you need to configure manually, use the `claude mcp add` command directly:
1191
+
1192
+ *For local development:*
1193
+
1194
+ [,bash]
1195
+ ----
1196
+ claude mcp add --transport stdio --scope user redpanda-docs-tool-assistant -- \
1197
+ node /absolute/path/to/docs-extensions-and-macros/bin/doc-tools-mcp.js
1198
+ ----
1199
+
1200
+ *For published package:*
1201
+
1202
+ [,bash]
1203
+ ----
1204
+ claude mcp add --transport stdio --scope user redpanda-docs-tool-assistant -- \
1205
+ npx -y doc-tools-mcp
1206
+ ----
1207
+
1208
+ This adds the MCP server configuration to `~/.claude.json`.
1209
+
1210
+ NOTE: We recommend using `npx doc-tools setup-mcp` instead, as it automatically detects your environment and uses the appropriate configuration!
1211
+
1212
+ == Troubleshooting
1213
+
1214
+ === MCP server not showing up
1215
+
1216
+ . Run `npx doc-tools setup-mcp --status` to verify configuration
1217
+ . Check your config file: `~/.claude.json` (look for the `mcpServers` section)
1218
+ . Verify the configuration includes `"type": "stdio"` field
1219
+ . For local mode: Verify the path to `doc-tools-mcp.js` is correct and absolute
1220
+ . For npx mode: Ensure the package is installed globally or locally
1221
+ . Restart Claude Code completely (exit and start a new session)
1222
+ . Check Claude Code logs for errors
1223
+ . Try running `claude mcp list` to see if the server appears
1224
+ . If still not working, try removing and re-adding with `claude mcp add` (see Manual Configuration)
1225
+
1226
+ === "doc-tools not found" error
1227
+
1228
+ This means you're in a repo that doesn't have doc-tools. The `run_doc_tools_command` tool only works in repos that have doc-tools installed.
1229
+
1230
+ Solution: Navigate to the docs-extensions-and-macros repo or another repo that has doc-tools.
1231
+
1232
+ === Tools not working
1233
+
1234
+ . Make sure you're in a git repository
1235
+ . Check that you have the required permissions
1236
+ . For doc-tools commands, ensure dependencies are installed (`npm install`)
1237
+
1238
+ === Understanding repository structure
1239
+
1240
+ * Use `get_antora_structure` MCP tool to understand the Antora layout
1241
+ * Then use Claude's built-in Glob/Grep tools to find specific files
1242
+ * Claude's Read/Write/Edit tools handle all file operations
1243
+
1244
+ == Security
1245
+
1246
+ === Command injection protection
1247
+
1248
+ The MCP server includes protection against command injection attacks:
1249
+
1250
+ * *Input validation*: All commands are validated before execution
1251
+ * *Shell metacharacter blocking*: Characters like `;`, `|`, `&`, `$`, ``` ` ```, `<`, `>`, `()` are blocked
1252
+ * *Path traversal prevention*: Sequences like `..` and `~` are rejected
1253
+ * *Type checking*: Commands must be non-empty strings
1254
+
1255
+ Safe commands:
1256
+
1257
+ [,bash]
1258
+ ----
1259
+ generate property-docs --tag v25.3.1 ✓
1260
+ generate metrics-docs --branch main ✓
1261
+ help ✓
1262
+ ----
1263
+
1264
+ Blocked commands:
1265
+
1266
+ [,bash]
1267
+ ----
1268
+ generate property-docs; rm -rf / ✗ (semicolon)
1269
+ generate property-docs | malicious ✗ (pipe)
1270
+ generate ../../../etc/passwd ✗ (path traversal)
1271
+ ----
1272
+
1273
+ === General security
1274
+
1275
+ * The MCP server is read-only for analysis (get_antora_structure)
1276
+ * Only runs commands you explicitly request (run_doc_tools_command)
1277
+ * Commands are restricted to `npx doc-tools` only
1278
+ * All operations are local to your machine
1279
+ * File modifications are handled by Claude's built-in tools (which you control)
1280
+ * 10-minute timeout on all commands
1281
+ * 50MB output buffer limit
1282
+
1283
+ == Advanced usage
1284
+
1285
+ === Using with multiple Claude Code instances
1286
+
1287
+ You can run Claude Code in different directories simultaneously, and each will use the same MCP server but operate in its own repo context.
1288
+
1289
+ === Combining with other MCP servers
1290
+
1291
+ You can have multiple MCP servers configured. Claude will use the appropriate tools from each server as needed.
1292
+
1293
+ === Scripting workflows
1294
+
1295
+ Since this integrates with Claude Code, you can create complex multi-step workflows through conversation:
1296
+
1297
+ ----
1298
+ You: I need to:
1299
+ 1. Generate property docs for v25.3.1
1300
+ 2. Review the changes
1301
+ 3. Create a branch called 'props-v25.3.1'
1302
+ 4. Commit with an appropriate message
1303
+ 5. Give me a summary for the PR description
1304
+
1305
+ Can you do all of that?
1306
+
1307
+ Claude: *executes each step sequentially*
1308
+ *asks for confirmation at key points*
1309
+ *provides final summary*
1310
+ ----
1311
+
1312
+ == Status messages
1313
+
1314
+ The MCP server logs to stderr (not stdout) so it doesn't interfere with the protocol:
1315
+
1316
+ * Server startup message
1317
+ * Working directory
1318
+ * Repository root detected
1319
+
1320
+ These appear in Claude Code's logs but won't clutter your chat.
1321
+
1322
+ == Best practices
1323
+
1324
+ . *Start with structure*: Use `get_antora_structure` MCP tool to understand the repo layout
1325
+ . *Let Claude work naturally*: It will use its built-in tools (Read, Write, Edit, Bash, Glob, Grep) automatically
1326
+ . *Run automation explicitly*: Use `run_doc_tools_command` for generating docs
1327
+ . *Trust the tools*: Claude knows when to use MCP tools vs built-in tools
1328
+ . *Be specific about goals*: Tell Claude what you want to achieve, not how to do it
1329
+
1330
+ == Updates
1331
+
1332
+ To update the MCP server:
1333
+
1334
+ [,bash]
1335
+ ----
1336
+ cd /path/to/docs-extensions-and-macros
1337
+ git pull
1338
+ npm install
1339
+ ----
1340
+
1341
+ Then restart Claude Code.
1342
+
1343
+ == Getting help
1344
+
1345
+ If you encounter issues:
1346
+
1347
+ . Check Claude Code logs
1348
+ . Verify your MCP server configuration
1349
+ . Test with simple commands first (for example, "Show me the Antora structure")
1350
+ . Check that you're in a git repository
1351
+ . Open an issue in the repository
1352
+
1353
+ == Learning more
1354
+
1355
+ * https://modelcontextprotocol.io/[MCP Documentation]
1356
+ * https://docs.anthropic.com/claude[Claude Code Documentation]
1357
+ * https://docs.antora.org/[Antora Documentation]
1358
+
1359
+ == What's next
1360
+
1361
+ With the MCP server set up, you can use natural language to:
1362
+
1363
+ === Version information
1364
+
1365
+ * "What's the latest Redpanda version?"
1366
+ * "Get me the Redpanda Docker tag"
1367
+ * "What's the latest Console version?"
1368
+ * "Show me the beta version"
1369
+
1370
+ === Documentation generation
1371
+
1372
+ * "Generate property docs for 25.3.1"
1373
+ * "Generate property docs with AsciiDoc partials"
1374
+ * "Generate metrics docs for the latest version"
1375
+ * "Generate RPK command docs for 25.3.1"
1376
+ * "Update all docs for the latest version"
1377
+
1378
+ === Understanding your repo
1379
+
1380
+ * "Show me the Antora structure"
1381
+ * "What modules do we have?"
1382
+ * "Is doc-tools available here?"
1383
+
1384
+ === Complete workflows
1385
+
1386
+ * "Update docs for 25.3.1 and show me what changed"
1387
+ * "Generate all docs for latest version and create a PR"
1388
+ * "Get the latest version info and update the Docker compose file"
1389
+
1390
+ *No CLI commands to remember. No flags to look up. Just talk naturally!*
1391
+
1392
+ The MCP server provides writer-friendly tools, Claude provides the intelligence. You focus on the content!