add Mcp tutorial#2953
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR introduces a complete MCP (Model Context Protocol) tutorial for the Membrane API Gateway. It includes configuration examples, documentation with Claude Desktop integration steps, cross-platform launcher and Docker scripts, and traffic generation utilities for testing and demonstration purposes. ChangesMCP Tutorial Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/ok-to-test |
|
This pull request needs "/ok-to-test" from an authorized committer. |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@distribution/tutorials/ai/mcp/generate-traffic.cmd`:
- Line 11: The SET command is unquoted and can break if %~1 contains special
characters; update the assignment of the ROUNDS variable by quoting the SET
value — replace the line using the symbol "set ROUNDS=%~1" with a quoted form
such as "set \"ROUNDS=%~1\"" (i.e., use set "ROUNDS=%~1") so the variable is
assigned safely without introducing stray spaces or parsing issues.
In `@distribution/tutorials/ai/mcp/membrane.cmd`:
- Around line 1-24: The batch script uses LF-only line endings which can break
Windows .cmd parsing; convert this file to CRLF line endings and commit the
change so Windows users can run labels like :search_up and :found and the call
to "%MEMBRANE_HOME%\scripts\run-membrane.cmd" reliably; optionally add/update a
.gitattributes entry to enforce CRLF for *.cmd to prevent regressions.
In `@distribution/tutorials/ai/mcp/README.md`:
- Around line 15-32: The example JSON in the README currently overwrites
unrelated top-level keys by including "preferences"; update the snippet so it
only shows the "mcpServers" object (retain the "membrane" entry and its
"command" and "args") and add a short note telling readers to merge this
"mcpServers" object into their existing config rather than replacing the whole
file to avoid resetting user settings; remove the "preferences" block entirely
from the example.
In `@distribution/tutorials/ai/mcp/run-docker.cmd`:
- Around line 1-15: The batch script run-docker.cmd currently uses LF-only line
endings; convert the file to use CRLF (Windows-style) line endings so the
Windows cmd parser correctly executes the script—preserve all existing content
and lines (variables like DIR, IMAGE, CLEANUP_CMD and the docker create/cp/start
commands) but save the file with CRLF endings.
- Around line 7-14: The script assumes the variable CID (set by the docker
create for /f loop) is always populated; add a guard immediately after that loop
to check if CID is empty or undefined and, if so, print a clear error to stderr
and exit with a non-zero status so subsequent docker cp/docker start/CLEANUP_CMD
are not run; ensure the CLEANUP_CMD and later uses reference the validated CID
variable (and avoid running them when CID is empty).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fd46088d-cbc3-421a-bf5a-2cb4228e6800
📒 Files selected for processing (10)
distribution/tutorials/README.mddistribution/tutorials/ai/mcp/10-MCP-Server.yamldistribution/tutorials/ai/mcp/20-MCP-Server-Protected.yamldistribution/tutorials/ai/mcp/README.mddistribution/tutorials/ai/mcp/generate-traffic.cmddistribution/tutorials/ai/mcp/generate-traffic.shdistribution/tutorials/ai/mcp/membrane.cmddistribution/tutorials/ai/mcp/membrane.shdistribution/tutorials/ai/mcp/run-docker.cmddistribution/tutorials/ai/mcp/run-docker.sh
Summary by CodeRabbit
Documentation
New Features