Skip to main content

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


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

  1. Log in to MCPBundles Dashboard
  2. Open the MCP server you want to connect
  3. Scroll to the "Quick Setup" section (only visible when the MCP server is operational)
  4. 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:

  1. Claude Code will list available MCP servers
  2. Select your MCP server
  3. Follow the OAuth/authentication prompts
  4. 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

  1. Service credentials — connect the provider (QuickBooks, HubSpot, etc.) via OAuth or API key in the MCPBundles dashboard once. MCPBundles stores them server-side.
  2. 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:

  1. Exit Claude Code
  2. Go to Settings → Credentials
  3. Scroll to the "Credentials" section
  4. Click "Add Credential" (or "Connect [Provider]" if no credentials exist) on needed providers
  5. Complete OAuth or add API key in the credential panel
  6. Select validation tool and click "Validate Now"
  7. Restart Claude Code and run /mcp again

Tools don't appear after adding the MCP server

Cause: MCP server not initialized.

Fix:

  1. Exit Claude Code (Ctrl+C or type exit)
  2. Restart: claude
  3. Run /mcp again
  4. 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 /mcp requires 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:

  1. Add with a test name
  2. Verify tools work
  3. Remove test registration
  4. Add with production name

Next Steps


Need Help?