Skip to main content
Claude Code manages servers through CLI commands instead of JSON config files. Servers can be scoped globally (all projects) or per-project.

Setup

1

Set your API key

Add your OpenCX API key to your shell profile so it persists across sessions:
echo 'export OPENCX_API_KEY="your-api-key-here"' >> ~/.zshrc
source ~/.zshrc
2

Add the MCP server

claude mcp add opencx -- npx -y @opencx/mcp
This registers the server at user scope (available in all projects) by default.
3

Verify

Start Claude Code and ask: “List my recent chat sessions.”You can also confirm the server is registered:
claude mcp list

Scope

Claude Code supports two scopes for MCP servers:
ScopeFlagStored inShared with team
User (default)--scope user~/.claude/No
Project--scope project.mcp.json in repo rootYes (commit the file)
Add at project scope when your team should share the same MCP setup:
claude mcp add opencx --scope project -- npx -y @opencx/mcp
Project-scoped servers read environment variables from the shell of whoever runs Claude Code. Each team member sets OPENCX_API_KEY in their own shell profile.

Managing Servers

claude mcp list                    # List all registered servers
claude mcp remove opencx           # Remove the server
claude mcp add opencx -- npx -y @opencx/mcp  # Re-add after removal

CI and Automation

Claude Code can use MCP servers in non-interactive contexts. Pass the API key through CI secrets:
OPENCX_API_KEY=${{ secrets.OPENCX_API_KEY }} claude --print "List unresolved sessions from the last 24 hours"
For headless use, Claude Code’s --print flag outputs the response to stdout without an interactive session.

Claude Desktop

JSON config and app restart flow

Get Started

API key setup and all client configs

Prompt Library

Ready-to-use prompts by domain

Troubleshooting

Common issues and fixes