Skip to main content

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 article shows you how to connect your Cequence AI Gateway MCP server to Claude Code.

CLI-Based Configuration

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

The fastest way to configure your MCP server:

npx @cequenceai/mcp-cli@latest claudecode --url "your-mcp-server-url" --name "your-server-name"

Options​

FlagDescriptionRequired
-u, --urlCequence MCP server URLYes
-n, --nameServer name (default: "cequence-mcp")No
-t, --transportTransport type: http or sse (default: http)No
-k, --api-keyAPI key for authenticationNo
--strict-mcp-config [path]Write a dedicated config file (default: .mcp-strict.json) for use with strict mode. Optionally pass a target path or directory.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"

Method 3: Strict MCP Config (Isolated Session)​

Strict mode makes Claude Code load only the servers from a config file you pass explicitly, ignoring every other MCP configuration source — the project .mcp.json, user settings, plugins, and claude.ai connectors. This is useful when you want a clean, reproducible session that exposes just your Cequence AI Gateway server.

Generate the config with NPX​

npx @cequenceai/mcp-cli@latest claudecode --url "your-mcp-server-url" --name "your-server-name" --strict-mcp-config

This writes a .mcp-strict.json file to your current directory:

{
"mcpServers": {
"your-server-name": {
"type": "http",
"url": "your-mcp-server-url"
}
}
}

You can also pass an explicit path or directory:

npx @cequenceai/mcp-cli@latest claudecode --url "your-mcp-server-url" --name "salesforce" --strict-mcp-config ./config

Launch Claude Code in strict mode​

claude --mcp-config .mcp-strict.json --strict-mcp-config

The --strict-mcp-config flag tells Claude Code to use only the MCP servers from the file passed with --mcp-config, ignoring all other MCP configuration sources.

Reproducible sessions

Because the strict config file is a plain JSON file, you can commit it to a repository (or share it) so teammates launch Claude Code with the exact same MCP server set every time.

Configuration Parameters​

Replace the following placeholders:

  • <server-name>: A descriptive name for your MCP server (for example, "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-sales
  • github-devops
  • jira-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​

ScenarioRecommended Transport
Standard API operationsHTTP
Real-time notificationsSSE
Data queriesHTTP
Live monitoringSSE
Most integrationsHTTP

Verification​

Once configured, verify your MCP server is working:

  1. Start Claude Code in your terminal:

    claude
  2. List available MCP servers:

    claude mcp list
  3. Test with a simple command:

    "List my open Salesforce opportunities"
  4. 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:

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

Tips​

  1. Use HTTP Transport: Unless you specifically need real-time streaming, use HTTP
  2. Descriptive Names: Name servers clearly to remember their purpose
  3. One Server Per Service: Configure separate servers for different services
  4. Regular Testing: Periodically verify server connections
  5. Keep CLI Updated: Update Claude Code regularly for latest features

Prerequisites​

Before configuring MCP servers with Claude Code:

  1. Claude Code Installed: Install from Anthropic
  2. Cequence AI Gateway Access: Create and deploy your MCP server
  3. MCP Server URL: Obtain from Cequence AI Gateway after deployment
  4. 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

Additional Resources​