-
Notifications
You must be signed in to change notification settings - Fork 14
Claude Desktop Extension build script #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the "Integrations" page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (9)
dxt/README.md (1)
24-49: Add copy-out instructions and note about verify behaviorTwo small doc gaps to streamline usage:
- Show a docker cp example to retrieve the artifact from the container.
- Note that dxt verify may return non-zero for self-signed certificates (expected).
Proposed patch:
### Automated Build (Recommended) For automated building using the provided build script: **Production mode (default):** ```shell docker run --rm -it -v "$(pwd)"/dxt:/workspace -w /workspace node:20-slim bash -c "./build.sh" # or explicitly: docker run --rm -it -v "$(pwd)"/dxt:/workspace -w /workspace node:20-slim bash -c "./build.sh prod"Development mode:
docker run --rm -it -v "$(pwd)"/dxt:/workspace -w /workspace node:20-slim bash -c "./build.sh dev"Build Modes
- Production (
prod): Usesmanifest.jsonand connects to the officialhttps://mcp.blockscout.com/mcp/server. Createsblockscout-mcp.dxt.- Development (
dev): Usesmanifest-dev.jsonwith configurable URL and createsblockscout-mcp-dev.dxt. Users can configure the Blockscout MCP server URL during installation in Claude Desktop.This will automatically handle all the steps below and create the extension at
dxt/_build/blockscout-mcp[--dev].dxt.
+
+Retrieving the artifact to your host:
+
+bash +# If you ran an interactive shell, you can copy the file out with: +docker cp <container_id>:/workspace/_build/blockscout-mcp.dxt . +# or for dev builds: +docker cp <container_id>:/workspace/_build/blockscout-mcp-dev.dxt . +
+
+Note:dxt verifymay return a non-zero exit code when using self-signed certificates. This is expected; the build script handles it and continues.</blockquote></details> <details> <summary>dxt/build.sh (6)</summary><blockquote> `9-10`: **Harden shell options** Use stronger shell options to fail fast on unset vars and pipeline errors. ```diff -set -e # Exit on any error +set -euo pipefail # Exit on error, unset var, or pipeline failure
22-26: Make apt non-interactive and minimal; clean apt cachePrevents interactive prompts and keeps the container lean.
# Step 1: Install system dependencies echo "📦 Installing system dependencies..." -apt-get update -qq -apt-get install -y openssl +export DEBIAN_FRONTEND=noninteractive +apt-get update -qq +apt-get install -y --no-install-recommends openssl ca-certificates +rm -rf /var/lib/apt/lists/*
28-30: Pin DXT CLI for reproducible builds (optional)Helps avoid breakages from upstream changes.
-echo "🔧 Installing DXT CLI..." -npm install -g @anthropic-ai/dxt +echo "🔧 Installing DXT CLI..." +# Optionally pin to a known-good version for reproducibility, e.g.: +# npm install -g @anthropic-ai/dxt@<known-good-version> +npm install -g @anthropic-ai/dxt
46-48: Copy prod manifest explicitly as manifest.json for consistencyKeeps behavior symmetric with dev branch and avoids relying on the filename.
else echo " Using production manifest (manifest.json)" - cp manifest.json _build/ + cp manifest.json _build/manifest.json fi
78-81: Don’t let dxt info terminate the script if it failsVery rare, but guard to preserve the success flow.
echo "" echo "ℹ️ Extension info:" -dxt info "$DXT_FILENAME" +dxt info "$DXT_FILENAME" || true
81-92: Optional: print checksum and clearer copy guidanceMakes artifact integrity and transfer easier for users.
echo "" echo "🎉 Extension built successfully!" echo "📄 Output: dxt/_build/$DXT_FILENAME" echo "🔧 Mode: $MODE" if [[ "$MODE" == "dev" ]]; then echo "⚙️ Note: Dev mode requires manual configuration of Blockscout MCP server URL" fi echo "" echo "To use this extension:" echo "1. Copy the .dxt file from the container to your host system" -echo "2. Install it in Claude Desktop" +echo " Example: docker cp \$(hostname):/workspace/_build/$DXT_FILENAME ." +echo "2. (Optional) Verify checksum: sha256sum $DXT_FILENAME" +echo "3. Install it in Claude Desktop"dxt/manifest-dev.json (2)
24-31: Confirm mcp-remote flags are correct for your versionDouble-check that the mcp-remote version you install supports "--transport http-only" and "--allow-http". If flag names changed upstream, adjust accordingly.
35-41: Add URI format to user_config for better UXExplicitly marking the value as a URI can improve validation in clients that honor the schema.
"user_config": { "blockscout_url": { "type": "string", "title": "Blockscout MCP Server URL", "description": "The URL of the Blockscout MCP server to connect to (e.g., http://127.0.0.1:8000/mcp/ for local development)", - "default": "http://127.0.0.1:8000/mcp/", + "default": "http://127.0.0.1:8000/mcp/", + "format": "uri", "required": true } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
README.md(1 hunks)dxt/README.md(1 hunks)dxt/build.sh(1 hunks)dxt/manifest-dev.json(1 hunks)dxt/manifest.json(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-07-22T00:12:19.870Z
Learnt from: CR
PR: blockscout/mcp-server#0
File: .cursor/rules/130-version-management.mdc:0-0
Timestamp: 2025-07-22T00:12:19.870Z
Learning: Applies to blockscout_mcp_server/__init__.py : When updating the version of the MCP server, update the `__version__` variable in `blockscout_mcp_server/__init__.py`.
Applied to files:
dxt/manifest.json
📚 Learning: 2025-07-22T00:11:07.554Z
Learnt from: CR
PR: blockscout/mcp-server#0
File: .cursor/rules/000-role-and-task.mdc:0-0
Timestamp: 2025-07-22T00:11:07.554Z
Learning: Applies to **/*.py : The MCP server must wrap Blockscout APIs and expose blockchain data (balances, tokens, NFTs, contract metadata) via the Model Context Protocol (MCP).
Applied to files:
dxt/manifest.jsonREADME.mddxt/manifest-dev.json
📚 Learning: 2025-07-22T00:12:19.870Z
Learnt from: CR
PR: blockscout/mcp-server#0
File: .cursor/rules/130-version-management.mdc:0-0
Timestamp: 2025-07-22T00:12:19.870Z
Learning: Use the exact same version string in both `pyproject.toml` and `blockscout_mcp_server/__init__.py`.
Applied to files:
dxt/manifest.json
📚 Learning: 2025-07-22T00:11:07.554Z
Learnt from: CR
PR: blockscout/mcp-server#0
File: .cursor/rules/000-role-and-task.mdc:0-0
Timestamp: 2025-07-22T00:11:07.554Z
Learning: Applies to {Dockerfile,docker-compose.yml} : The MCP server must be able to run locally or through Docker.
Applied to files:
README.md
🔇 Additional comments (2)
dxt/manifest.json (1)
5-5: Version bump looks goodManifest version updated to 0.2.0; no issues spotted with the rest of the config.
README.md (1)
260-260: Docker run examples are correct and clearer nowUsing python -m blockscout_mcp_server inside the container for HTTP/REST modes is appropriate and matches the image’s contents.
Also applies to: 266-266, 274-274
Closes #200
Summary by CodeRabbit
New Features
Documentation
Chores