-
Notifications
You must be signed in to change notification settings - Fork 205
feat: Add MCP (Model Context Protocol) integration to VibeKit Claude agent #135
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
joedanz
wants to merge
21
commits into
superagent-ai:main
Choose a base branch
from
joedanz:joedanz/mcp-injection
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.
Conversation
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
|
@joedanz is attempting to deploy a commit to the Superagent Team on Vercel. A member of the Team first needs to authorize it. |
…joedanz/mcp-injection # Conflicts: # package-lock.json # package.json # packages/dagger/src/dagger/vibekit-dagger.ts # packages/vibekit/package.json # packages/vibekit/tsup.config.ts
…joedanz/mcp-injection # Conflicts: # package-lock.json
…agent - Add onSandboxReady hook to base agent for agent-specific setup - Implement MCP configuration in Claude agent via .mcp.json file - Add --mcp-config flag to claude CLI command for proper tool loading - Successfully integrate time-mcp server with 6 available tools - MCP tools now properly detected and available to Claude agent - Add comprehensive documentation and example configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
🎉 SUCCESS! Successfully integrated MCP (Model Context Protocol) tools with VibeKit's Claude agent!
This PR resolves the MCP integration gap that was previously identified and documented. MCP tools are now fully accessible to the Claude agent.
Key Achievements
"mcp_servers":[{"name":"time-mcp","status":"connected"}]Solution Implemented
The key was implementing proper MCP configuration for the Claude CLI:
1. Base Agent Hook
Added
onSandboxReady()hook to base agent for agent-specific setup after sandbox creation.2. Claude Agent MCP Setup
Override the hook in Claude agent to:
.mcp.jsonfile in sandbox working directory (/vibe0/.mcp.json)3. CLI Integration
Added
--mcp-config /vibe0/.mcp.jsonflag to claude CLI command to explicitly load MCP configuration.4. Working Directory
Ensured claude runs from directory containing MCP config with
cd ${this.WORKING_DIR} &&.Available MCP Tools
The agent now has access to 6 time-mcp tools:
mcp__time-mcp__current_time- Get current time in specified formatmcp__time-mcp__relative_time- Get relative time descriptionsmcp__time-mcp__days_in_month- Get number of days in a monthmcp__time-mcp__get_timestamp- Get Unix timestampmcp__time-mcp__convert_time- Convert between time formatsmcp__time-mcp__get_week_year- Get week and year informationVerification
Before:
"mcp_servers":[]and no MCP tools in agent tools listAfter:
{ "mcp_servers": [{"name": "time-mcp", "status": "connected"}], "tools": [ "Task", "Bash", "Glob", "Grep", "LS", "exit_plan_mode", "Read", "Edit", "MultiEdit", "Write", "NotebookRead", "NotebookEdit", "WebFetch", "TodoWrite", "WebSearch", "mcp__time-mcp__current_time", "mcp__time-mcp__relative_time", "mcp__time-mcp__days_in_month", "mcp__time-mcp__get_timestamp", "mcp__time-mcp__convert_time", "mcp__time-mcp__get_week_year" ] }Files Changed
Core Implementation
packages/vibekit/src/agents/base.ts: AddedonSandboxReady()hookpackages/vibekit/src/agents/claude.ts: MCP configuration implementationDocumentation
MCP_INTEGRATION_SUCCESS.md: Comprehensive integration documentationexample-mcp-config.json: Example MCP server configurationUsage Example
Test plan
🤖 Generated with Claude Code