Claude Code MCP Setup
Connect MCPBundles MCP servers to Claude Code (CLI) to use tools directly from the command line.
Requirements
- Claude Code CLI installed (get it from Anthropic)
- An MCP server enabled in your MCPBundles dashboard
- Credentials connected for the providers on that MCP server
Time to complete: 2-3 minutes
Option A: CLI Setup (Recommended)
Since you're already using Claude Code from the terminal, the MCPBundles CLI is the fastest path:
pip install mcpbundles
mcpbundles init
This automatically discovers your MCP servers, writes the Claude Code MCP config, and handles authentication. No manual JSON editing needed.
After running mcpbundles init, restart Claude Code and your tools will be available.
Want more control? Use mcpbundles tools to browse available tools, or mcpbundles call <tool-name> to test a tool directly from your terminal.
Option B: Manual Setup
Step-by-Step Setup
1. Get your MCP server URL
- Log in to MCPBundles Dashboard
- Open the MCP server you want to connect
- Scroll to the "Quick Setup" section (only visible when the MCP server is operational)
- Copy the MCP Server URL
2. Add the MCP server
Use the claude mcp add command:
claude mcp add --transport http your-bundle-name https://mcp.mcpbundles.com/bundle/YOUR-BUNDLE-ID
Replace:
your-bundle-name— Short MCP server name identifier in config (e.g.,marketing)https://mcp.mcpbundles.com/bundle/YOUR-BUNDLE-ID— Your actual MCPBundles MCP server URL
Example:
claude mcp add --transport http marketing https://mcp.mcpbundles.com/bundle/abc123
3. Start Claude Code
Launch a Claude Code session:
claude
You'll enter an interactive session.
4. Authenticate MCP Tools
Inside the Claude Code session, type:
/mcp
This triggers the authentication flow:
- Claude Code will list available MCP servers
- Select your MCP server
- Follow the OAuth/authentication prompts
- Once authenticated, tools are available
5. Verify Tools Are Available
Ask Claude:
What tools do you have access to?
Expected response:
"I have access to the following tools from your marketing MCP server:
- list_campaigns
- create_contact
- send_message ..."
Using Tools in Claude Code
Once connected, Claude can use your tools when relevant.
Example Prompts
Check campaign data:
"Check my Smartlead campaigns and summarize the top 3 by reply rate"
Create contacts:
"Add John Doe (john@example.com) to HubSpot as a new contact"
GitHub operations:
"List my GitHub repos and tell me which ones have open PRs"
Claude Code will call the tools, get results, and respond.
Managing MCP Servers
List all MCP servers
claude mcp list
Remove an MCP server registration
claude mcp remove your-bundle-name
Update your MCPBundles MCP server URL
Remove and re-add:
claude mcp remove marketing
claude mcp add --transport http marketing https://mcp.mcpbundles.com/bundle/new-id
Claude Code Routines (remote cloud agents)
Anthropic's official name for cloud-hosted Claude Code jobs is Routines (research preview). Routines run on Anthropic-managed infrastructure — they keep working when your laptop is closed. Some people informally call these "remote routines"; Anthropic's docs use Routines, not "CCR".
Routines are not the same as local CLI sessions with /mcp. Local setup above uses interactive OAuth in the terminal. Routines need header-based platform auth because they cannot complete MCPBundles sign-in in a browser on each run.
Two layers when using MCPBundles MCP servers
- Service credentials — connect the provider (QuickBooks, HubSpot, etc.) via OAuth or API key in the MCPBundles dashboard once. MCPBundles stores them server-side.
- MCPBundles platform auth — pass your workspace API key in an HTTP header on every MCP request so MCPBundles attaches your workspace and stored credentials.
Completing QuickBooks OAuth in the dashboard does not remove the need for platform auth from a Routine.
Configure MCP in a Routine
Use the same generic MCP URL as in the dashboard:
https://mcp.mcpbundles.com/bundle/{slug}
There is no user-specific MCP URL and no token in the URL. Create a workspace API key at Settings → Workspace API Keys, then add a header in the Routine's MCP connector configuration:
"headers": {
"X-API-Key": "${MCPBUNDLES_API_KEY}"
}
Or from the CLI when registering MCP for local testing:
claude mcp add --transport http quickbooks \
https://mcp.mcpbundles.com/bundle/quickbooks \
--header "X-API-Key: mb_YOUR_KEY"
Full header options and troubleshooting: Using API Keys.
Create and manage Routines at claude.ai/code/routines or with /schedule in the CLI. Connector UI details may change while Routines are in research preview — see Anthropic's docs for the current Routine MCP setup flow.
Troubleshooting
"Authentication required" when using tools
Cause: Credentials not connected.
Fix:
- Exit Claude Code
- Go to Settings → Credentials
- Scroll to the "Credentials" section
- Click "Add Credential" (or "Connect [Provider]" if no credentials exist) on needed providers
- Complete OAuth or add API key in the credential panel
- Select validation tool and click "Validate Now"
- Restart Claude Code and run
/mcpagain
Tools don't appear after adding the MCP server
Cause: MCP server not initialized.
Fix:
- Exit Claude Code (
Ctrl+Cor typeexit) - Restart:
claude - Run
/mcpagain - Select your MCP server and authenticate
"Server connection failed"
Cause: Invalid URL or MCP server not enabled.
Fix:
- Verify URL is exactly as shown in dashboard
- Confirm the MCP server is enabled (Dashboard → MCP servers)
- Make sure you used
--transport http - Try removing and re-adding the MCP server registration
"/mcp command not found"
Cause: Outdated Claude Code.
Fix:
- Update Claude Code to the latest release
- MCP support is included in current versions
Advanced Usage
Multiple MCP servers
Add multiple MCP server registrations:
claude mcp add --transport http marketing https://mcp.mcpbundles.com/bundle/abc123
claude mcp add --transport http dev-tools https://mcp.mcpbundles.com/bundle/def456
claude mcp add --transport http crm https://mcp.mcpbundles.com/bundle/ghi789
All tools from all MCP servers will be available in Claude Code sessions.
Environment-specific MCP servers
Use different MCP server URLs for different environments:
Production:
claude mcp add --transport http prod https://mcp.mcpbundles.com/bundle/prod-id
Staging:
claude mcp remove prod
claude mcp add --transport http staging https://mcp.mcpbundles.com/bundle/staging-id
Scripting with Claude Code
You can use Claude Code in scripts:
#!/bin/bash
echo "Check campaign performance" | claude
Tools will be called automatically if relevant.
Limitations
- Local CLI sessions: Provider OAuth via
/mcprequires interactive browser sign-in in the terminal - Routines (remote): Use workspace API key headers for MCPBundles platform auth; connect provider OAuth in the dashboard first — see Routines section above
- Session-based (local): Each new local session may require re-authentication via
/mcp - Network required: Tools need internet access
Tips
Naming MCP servers in config
Use short, descriptive MCP server name keys:
- ✅
marketing - ✅
dev - ✅
crm - ❌
my-really-long-mcp-server-name-2024
Testing Before Production
Test in a separate session:
- Add with a test name
- Verify tools work
- Remove test registration
- Add with production name
Next Steps
- Browse MCP servers — Explore available MCP servers
- Connect Credentials — Set up authentication
- Troubleshooting — Fix issues
- FAQ — Common questions
Need Help?
- Not working? See Troubleshooting
- Questions? Check the FAQ
- Support: Email help@mcpbundles.com