Configuring MCP Server with Claude Code
Overview
Claude Code is Anthropic's AI-powered coding assistant that runs in your terminal. It provides native support for Model Context Protocol (MCP) servers through its built-in CLI commands. This guide shows you how to connect your Cequence AI Gateway MCP server to Claude Code.
Unlike other clients, Claude Code uses CLI commands for MCP configuration - no manual file editing required!
Configuration Methods
Claude Code supports two transport types for MCP servers:
- HTTP: Standard HTTP-based communication (recommended)
- SSE: Server-Sent Events for real-time streaming
Method 1: Quick Setup with NPX (Recommended)
The fastest way to configure your MCP server:
npx @cequenceai/mcp-cli@latest claudecode --url "your-mcp-server-url" --name "your-server-name"
Options
| Flag | Description | Required |
|---|---|---|
-u, --url | Cequence MCP server URL | Yes |
-n, --name | Server name (default: "cequence-mcp") | No |
-t, --transport | Transport type: http or sse (default: http) | No |
-k, --api-key | API key for authentication | No |
Examples
HTTP transport (default):
npx @cequenceai/mcp-cli@latest claudecode --url "https://mcp.aigateway.cequence.ai/v1/servers/abc123" --name "salesforce"
SSE transport:
npx @cequenceai/mcp-cli@latest claudecode --url "https://mcp.aigateway.cequence.ai/v1/servers/abc123" --name "salesforce" --transport sse
Method 2: Direct Claude CLI
Use the Claude CLI directly to add MCP servers:
HTTP Transport
claude mcp add --transport http <server-name> <server-url>
Example:
claude mcp add --transport http salesforce-crm "https://mcp.aigateway.cequence.ai/v1/servers/sf-abc123"
SSE Transport
claude mcp add --transport sse <server-name> <server-url>
Example:
claude mcp add --transport sse github-realtime "https://mcp.aigateway.cequence.ai/v1/servers/gh-xyz789"
Configuration Parameters
Replace the following placeholders:
<server-name>: A descriptive name for your MCP server (e.g., "salesforce-crm", "github-repo", "jira-project")<server-url>: The URL provided by Cequence AI Gateway after creating your MCP server
Naming Conventions
Server names should be:
- Lowercase
- Hyphen-separated (no spaces)
- Descriptive of the service
Good examples:
salesforce-salesgithub-devopsjira-project-tracker
Avoid:
Salesforce Sales(spaces)sf(too vague)my_server_1(underscores)
Multiple MCP Servers
Add multiple servers by running the command for each:
# Add GitHub server
claude mcp add --transport http github "https://mcp.aigateway.cequence.ai/v1/servers/github-abc"
# Add Jira server
claude mcp add --transport http jira "https://mcp.aigateway.cequence.ai/v1/servers/jira-xyz"
# Add Salesforce server
claude mcp add --transport http salesforce "https://mcp.aigateway.cequence.ai/v1/servers/sf-123"
Managing MCP Servers
List Configured Servers
claude mcp list
Remove a Server
claude mcp remove <server-name>
Example:
claude mcp remove salesforce-crm
Transport Types
HTTP Transport
- Use case: Standard request/response operations
- Best for: Most API integrations, CRUD operations
- Reliability: Stable, well-tested
claude mcp add --transport http <name> <url>
SSE Transport
- Use case: Real-time streaming, live updates
- Best for: Monitoring, notifications, streaming data
- Features: Persistent connections, push updates
claude mcp add --transport sse <name> <url>
Choosing Transport
| Scenario | Recommended Transport |
|---|---|
| Standard API operations | HTTP |
| Real-time notifications | SSE |
| Data queries | HTTP |
| Live monitoring | SSE |
| Most integrations | HTTP |
Verification
Once configured, verify your MCP server is working:
-
Start Claude Code in your terminal:
claude -
List available MCP servers:
claude mcp list -
Test with a simple command:
"List my open Salesforce opportunities" -
Check that tools from your MCP server are available
Using MCP Servers in Claude Code
In Terminal Chat
Interact with your MCP server through natural language:
> List my open GitHub pull requests
> Create a Jira ticket for the login bug
> Query Salesforce for recent opportunities
> Show me the latest GitLab pipeline status
Common Workflows
Development:
> Show me all failing tests in the CI pipeline
> Create a branch for feature/user-auth
> List merge requests assigned to me
Project Management:
> What Jira tickets are in the current sprint?
> Show overdue tasks in Asana
> List open issues labeled as 'bug'
Data Analysis:
> Query Databricks for user activity metrics
> Get the latest BigQuery results
> Show Elasticsearch logs from last hour
Troubleshooting
Claude CLI Not Found
Issue: claude: command not found
Solutions:
- Install Claude Code: Follow Anthropic's installation guide
- Verify installation:
which claude - Add to PATH if installed but not found
MCP Server Not Connecting
Issue: Server shows as disconnected
Solutions:
- Verify the URL is correct and accessible
- Check your internet connection
- Ensure the MCP server is deployed and running
- Try removing and re-adding the server
Authentication Errors
Issue: "Authentication required" or "Unauthorized"
Solutions:
- Complete OAuth authentication in Cequence AI Gateway
- Verify your credentials are valid
- Re-authenticate the connection
Transport Mismatch
Issue: Server not responding correctly
Solutions:
- Verify you're using the correct transport type
- Most Cequence MCP servers use HTTP transport
- Try switching transport if issues persist
Permission Denied
Issue: "Permission denied" when accessing tools
Solutions:
- Check API permissions in Cequence AI Gateway
- Verify OAuth scopes are sufficient
- Review MCP server endpoint configuration
Best Practices
- Use HTTP Transport: Unless you specifically need real-time streaming, use HTTP
- Descriptive Names: Name servers clearly to remember their purpose
- One Server Per Service: Configure separate servers for different services
- Regular Testing: Periodically verify server connections
- Keep CLI Updated: Update Claude Code regularly for latest features
Prerequisites
Before configuring MCP servers with Claude Code:
- Claude Code Installed: Install from Anthropic
- Cequence AI Gateway Access: Create and deploy your MCP server
- MCP Server URL: Obtain from Cequence AI Gateway after deployment
- Network Access: Ensure your terminal can reach the MCP server URL
Example Workflow
Complete setup for a development workflow:
# 1. Add GitHub server for code management
claude mcp add --transport http github "https://mcp.aigateway.cequence.ai/v1/servers/gh-abc"
# 2. Add Jira server for issue tracking
claude mcp add --transport http jira "https://mcp.aigateway.cequence.ai/v1/servers/jira-xyz"
# 3. Add Slack server for notifications
claude mcp add --transport http slack "https://mcp.aigateway.cequence.ai/v1/servers/slack-123"
# 4. Verify all servers
claude mcp list
# 5. Start using Claude Code
claude
Then in Claude Code:
> Show my open PRs on GitHub, any related Jira tickets, and post a summary to Slack