Claude Code Integration
Claude Code supports MCP servers via the claude mcp add command. This is the fastest way to add mpak bundles.
Quick Setup
Section titled “Quick Setup”Add any mpak bundle with a single command:
claude mcp add --transport stdio echo -- mpak run @nimblebraininc/echoThat’s it. The server is now available in Claude Code.
How It Works
Section titled “How It Works”claude mcp addregisters the MCP server with Claude Code--transport stdiotells Claude Code this is a local processmpak rundownloads, caches, and executes the bundle
Servers Requiring Configuration
Section titled “Servers Requiring Configuration”For bundles that need API keys or other configuration:
claude mcp add --transport stdio ipinfo \ --env IPINFO_API_TOKEN=your-token-here \ -- mpak run @nimblebraininc/ipinfoYou can pass multiple --env flags:
claude mcp add --transport stdio myserver \ --env API_KEY=xxx \ --env DEBUG=true \ -- mpak run @owner/myserverConfiguration Scopes
Section titled “Configuration Scopes”Claude Code supports different scopes for MCP server configuration:
# Local (default) - stored in ~/.claude.json, not sharedclaude mcp add --transport stdio echo -- mpak run @nimblebraininc/echo
# Project - stored in .mcp.json, checked into gitclaude mcp add --transport stdio --scope project echo -- mpak run @nimblebraininc/echo
# User - stored in ~/.claude.json globallyclaude mcp add --transport stdio --scope user echo -- mpak run @nimblebraininc/echoPin to a Specific Version
Section titled “Pin to a Specific Version”claude mcp add --transport stdio echo -- mpak run @nimblebraininc/echo@1.0.0Managing Servers
Section titled “Managing Servers”# List all configured serversclaude mcp list
# Get details for a serverclaude mcp get echo
# Remove a serverclaude mcp remove echo
# Check server status (within Claude Code)/mcpAlternative: Use mpak config
Section titled “Alternative: Use mpak config”Instead of passing --env flags, you can store configuration with mpak:
# Store config oncempak config set @nimblebraininc/ipinfo api_key=your-token
# Then add without env flagsclaude mcp add --transport stdio ipinfo -- mpak run @nimblebraininc/ipinfompak resolves stored config automatically when running.
Troubleshooting
Section titled “Troubleshooting”Server Not Starting
Section titled “Server Not Starting”-
Test the bundle runs directly:
Terminal window mpak run @nimblebraininc/echo -
Check Claude Code’s MCP status:
/mcp
Command Not Found
Section titled “Command Not Found”Ensure mpak is installed globally:
npm install -g @nimblebrain/mpakwhich mpak # Should show the pathView Server Output
Section titled “View Server Output”Run the bundle directly to see any error output:
mpak run @nimblebraininc/echo