-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat: Add CodeBuddy MCP integration #310
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
Open
binbinao
wants to merge
5
commits into
obra:main
Choose a base branch
from
binbinao:feat/codebuddy-mcp-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
99da4b3
feat: Add CodeBuddy MCP server support
binbinao c038137
chore: Update gitignore to exclude local test files
binbinao b029872
docs: Update INSTALL.md to point to binbinao fork
binbinao c38da86
feat: add superpowers skills guide and relocate skills core to skills…
binbinao 681a064
revert: move skills-core.js back to lib/
binbinao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,269 @@ | ||
| # Superpowers Installation Guide for CodeBuddy | ||
|
|
||
| ## Quick Install (One-Command) | ||
|
|
||
| Tell CodeBuddy in Craft mode: | ||
|
|
||
| ``` | ||
| Fetch and follow instructions from https://raw.githubusercontent.com/binbinao/superpowers/refs/heads/main/.codebuddy/INSTALL.md | ||
| ``` | ||
|
|
||
| Or run these commands in your terminal: | ||
|
|
||
| ```bash | ||
| # Clone superpowers | ||
| mkdir -p ~/.codebuddy | ||
| git clone https://github.com/binbinao/superpowers.git ~/.codebuddy/superpowers | ||
|
|
||
| # Install MCP server dependencies | ||
| cd ~/.codebuddy/superpowers/.codebuddy/mcp-server | ||
| npm install | ||
|
|
||
| # Verify installation | ||
| node test.js | ||
| ``` | ||
|
|
||
| ## Manual Installation | ||
|
|
||
| ### Step 1: Clone Repository | ||
|
|
||
| ```bash | ||
| mkdir -p ~/.codebuddy | ||
| git clone https://github.com/binbinao/superpowers.git ~/.codebuddy/superpowers | ||
| cd ~/.codebuddy/superpowers | ||
| ``` | ||
|
|
||
| ### Step 2: Install Dependencies | ||
|
|
||
| ```bash | ||
| cd .codebuddy/mcp-server | ||
| npm install | ||
| ``` | ||
|
|
||
| ### Step 3: Configure MCP in CodeBuddy | ||
|
|
||
| #### For VS Code Plugin: | ||
|
|
||
| 1. Open VS Code with CodeBuddy plugin installed | ||
| 2. Click CodeBuddy icon in the sidebar | ||
| 3. Select **Craft** mode | ||
| 4. Click **MCP** option | ||
| 5. Click **Add MCP Server** or **Configure** | ||
| 6. Add new server with these settings: | ||
|
|
||
| **Method A: Using npx (Easiest)** | ||
|
|
||
| ```json | ||
| { | ||
| "name": "superpowers", | ||
| "type": "stdio", | ||
| "command": "npx", | ||
| "args": [ | ||
| "-y", | ||
| "github.com/binbinao/superpowers#main/.codebuddy/mcp-server" | ||
| ], | ||
| "disabled": false | ||
| } | ||
| ``` | ||
|
|
||
| **Method B: Using local installation** | ||
|
|
||
| ```json | ||
| { | ||
| "name": "superpowers", | ||
| "type": "stdio", | ||
| "command": "node", | ||
| "args": ["/Users/YOUR_HOME/.codebuddy/superpowers/.codebuddy/mcp-server/index.js"], | ||
| "disabled": false | ||
| } | ||
| ``` | ||
|
|
||
| Replace `/Users/YOUR_HOME` with your actual home directory (run `echo ~` to see it). | ||
|
|
||
| #### For JetBrains Plugin: | ||
|
|
||
| 1. Open CodeBuddy settings in your JetBrains IDE | ||
| 2. Navigate to **MCP Configuration** | ||
| 3. Add new server with same settings as above | ||
|
|
||
| #### For Internal Version: | ||
|
|
||
| The internal version of CodeBuddy supports additional configuration options: | ||
|
|
||
| ```json | ||
| { | ||
| "name": "superpowers", | ||
| "type": "stdio", | ||
| "command": "node", | ||
| "args": ["/Users/YOUR_HOME/.codebuddy/superpowers/.codebuddy/mcp-server/index.js"], | ||
| "disabled": false, | ||
| "configSource": "user", | ||
| "timeout": 60 | ||
| } | ||
| ``` | ||
|
|
||
| ### Step 4: Restart CodeBuddy | ||
|
|
||
| Restart CodeBuddy to load the MCP server. | ||
|
|
||
| ### Step 5: Verify Installation | ||
|
|
||
| In CodeBuddy Craft mode, ask: | ||
|
|
||
| ``` | ||
| Use find_skills tool to list all available superpowers skills | ||
| ``` | ||
|
|
||
| You should see a list of available skills. | ||
|
|
||
| ## Verification | ||
|
|
||
| Run the test suite: | ||
|
|
||
| ```bash | ||
| cd ~/.codebuddy/superpowers/.codebuddy/mcp-server | ||
| node test.js | ||
| ``` | ||
|
|
||
| All tests should pass with ✓ marks. | ||
|
|
||
| ## Usage Examples | ||
|
|
||
| ### Load a Skill | ||
|
|
||
| ``` | ||
| Use use_skill tool with skill_name: "superpowers:brainstorming" | ||
| ``` | ||
|
|
||
| ### Find Available Skills | ||
|
|
||
| ``` | ||
| Use find_skills tool | ||
| ``` | ||
|
|
||
| ### Get Bootstrap | ||
|
|
||
| ``` | ||
| Use get_bootstrap tool | ||
| ``` | ||
|
|
||
| ## Creating Personal Skills | ||
|
|
||
| Create your own skills in `~/.config/codebuddy/skills/`: | ||
|
|
||
| ```bash | ||
| mkdir -p ~/.config/codebuddy/skills/my-skill | ||
| cat > ~/.config/codebuddy/skills/my-skill/SKILL.md << 'EOF' | ||
| --- | ||
| name: my-skill | ||
| description: Use when [condition] - [what it does] | ||
| --- | ||
| # My Skill | ||
| [Your skill content here] | ||
| EOF | ||
| ``` | ||
|
|
||
| Then use it: `use_skill tool with skill_name: "my-skill"` | ||
|
|
||
| ## Creating Project Skills | ||
|
|
||
| For project-specific skills, create them in your project directory: | ||
|
|
||
| ```bash | ||
| mkdir -p .codebuddy/skills/my-project-skill | ||
| cat > .codebuddy/skills/my-project-skill/SKILL.md << 'EOF' | ||
| --- | ||
| name: my-project-skill | ||
| description: Use when [condition] - [what it does] | ||
| --- | ||
| # My Project Skill | ||
| [Your skill content here] | ||
| EOF | ||
| ``` | ||
|
|
||
| Then use: `use_skill tool with skill_name: "project:my-project-skill"` | ||
|
|
||
| ## Skill Priority | ||
|
|
||
| When you use `use_skill` with a skill name: | ||
|
|
||
| 1. **Project skills** (`.codebuddy/skills/`) - Checked first | ||
| 2. **Personal skills** (`~/.config/codebuddy/skills/`) - Checked second | ||
| 3. **Superpowers skills** (`~/.codebuddy/superpowers/skills/`) - Checked last | ||
|
|
||
| Force specific skill type: | ||
| - `project:skill-name` - Only check project skills | ||
| - `skill-name` - Check project → personal → superpowers | ||
| - `superpowers:skill-name` - Only check superpowers skills | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Installation Fails | ||
|
|
||
| ```bash | ||
| # Check Node.js version | ||
| node --version # Should be 18+ | ||
|
|
||
| # Verify git clone worked | ||
| ls ~/.codebuddy/superpowers | ||
|
|
||
| # Check npm install worked | ||
| ls ~/.codebuddy/superpowers/.codebuddy/mcp-server/node_modules | ||
| ``` | ||
|
|
||
| ### MCP Server Won't Start | ||
|
|
||
| ```bash | ||
| # Test manually | ||
| node ~/.codebuddy/superpowers/.codebuddy/mcp-server/index.js | ||
|
|
||
| # Check for errors | ||
| # Should see: "Superpowers MCP server running on stdio" | ||
| ``` | ||
|
|
||
| ### Skills Not Found | ||
|
|
||
| ```bash | ||
| # Run test to verify skills discovery | ||
| cd ~/.codebuddy/superpowers/.codebuddy/mcp-server | ||
| node test.js | ||
|
|
||
| # Should show "Found XX skills" | ||
| ``` | ||
|
|
||
| ### CodeBuddy Can't Connect to MCP | ||
|
|
||
| 1. Check CodeBuddy version (requires recent version with MCP support) | ||
| 2. Verify MCP configuration file syntax is correct JSON | ||
| 3. Check file paths are absolute (not relative) | ||
| 4. Enable debug logging in CodeBuddy to see error messages | ||
| 5. Try disabling and re-enabling the MCP server | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - Read full documentation: [docs/README.codebuddy.md](../docs/README.codebuddy.md) | ||
| - Learn skill development: [skills/writing-skills/SKILL.md](../skills/writing-skills/SKILL.md) | ||
| - Browse available skills: [skills/](../skills/) | ||
| - Report issues: [https://github.com/binbinao/superpowers/issues](https://github.com/binbinao/superpowers/issues) | ||
|
|
||
| ## Uninstallation | ||
|
|
||
| ```bash | ||
| # Remove the superpowers repository | ||
| rm -rf ~/.codebuddy/superpowers | ||
|
|
||
| # Remove MCP configuration from CodeBuddy settings | ||
| # (Go to CodeBuddy MCP settings and delete superpowers server) | ||
| ``` | ||
|
|
||
| Your personal and project skills in `~/.config/codebuddy/skills/` and `.codebuddy/skills/` will remain unless you delete them. | ||
|
|
||
| ## Support | ||
|
|
||
| - **Issues**: https://github.com/binbinao/superpowers/issues | ||
| - **CodeBuddy Docs**: https://cloud.tencent.com/document/product/1749 | ||
| - **CodeBuddy MCP Guide**: https://cloud.tencent.com/developer/article/2526313 | ||
|
Comment on lines
+248
to
+269
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace bare URLs with Markdown links. Lines 248–269 include bare URLs, which markdownlint flags (MD034). Wrap them with link text or angle brackets. 📝 Example fix-- Report issues: [https://github.com/binbinao/superpowers/issues](https://github.com/binbinao/superpowers/issues)
-- **CodeBuddy Docs**: https://cloud.tencent.com/document/product/1749
-- **CodeBuddy MCP Guide**: https://cloud.tencent.com/developer/article/2526313
+- Report issues: [GitHub Issues](https://github.com/binbinao/superpowers/issues)
+- **CodeBuddy Docs**: <https://cloud.tencent.com/document/product/1749>
+- **CodeBuddy MCP Guide**: <https://cloud.tencent.com/developer/article/2526313>🤖 Prompt for AI Agents |
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: obra/superpowers
Length of output: 42
🌐 Web query:
npx github subdirectory path support💡 Result:
Short answer: No — npx follows npm's package specifiers and does not support pointing directly at a package.json inside a GitHub repo subdirectory. npx accepts git/GitHub specifiers, but npm's git-install semantics don't include a subdirectory path. [1][2]
Workarounds:
Sources:
🏁 Script executed:
Repository: obra/superpowers
Length of output: 42
🏁 Script executed:
Repository: obra/superpowers
Length of output: 290
🏁 Script executed:
Repository: obra/superpowers
Length of output: 228
🏁 Script executed:
Repository: obra/superpowers
Length of output: 230
🏁 Script executed:
Repository: obra/superpowers
Length of output: 120
🏁 Script executed:
Repository: obra/superpowers
Length of output: 695
🏁 Script executed:
# Also check what's near lines 248-269 mentioned in the scratchpad wc -l .codebuddy/INSTALL.mdRepository: obra/superpowers
Length of output: 85
The npx command on line 63 will fail—npm/npx do not support GitHub subdirectory paths.
The syntax
github.com/binbinao/superpowers#main/.codebuddy/mcp-serveris invalid. npx/npm do not support subdirectory specifications in GitHub URLs; they expect a package.json at the repository root. Either publish the package to npm and reference it by name, or remove Method A and make Method B (local installation) the primary approach.🤖 Prompt for AI Agents