Connect to the CompetLab MCP Server
Before you begin
You need two things: an MCP-capable client that speaks Streamable HTTP (Claude Code, Claude Desktop, Claude on the web, Cursor, VS Code, Windsurf, or Cline), and a CompetLab API key. Getting the key is the only step that isn’t copy-and-paste, so start there.
1. Get your API key
In the CompetLab dashboard, open your organization’s Settings → API Keys and create a
key. You’ll need the Owner or Admin role, and each organization can hold up to
five active keys. Every key starts with cl_live_ and is 40 characters long — copy it
when it’s shown, since you won’t be able to read it again.
Keep the key somewhere safe. It carries the same access your account has over the API, so treat it like a password.
2. Choose how to send your key
The key travels with every request, one of two ways:
| Method | Where the key goes | Use it when |
|---|---|---|
CL-API-Key header | An HTTP header your client sends | Your client supports custom headers — Claude Code, Cursor, VS Code, Windsurf, Cline. |
?api_key= query parameter | Appended to the server URL | Your client can’t send custom headers — Claude on the web is the main case. |
If both are present, the header wins. The per-client configs below already use the right method for each client, so in practice you just paste and drop in your key.
3. Add the server to your client
Each client keeps its MCP config in a different place and format. Find yours below.
| Client | Config location | Auth |
|---|---|---|
| Claude Code | the claude mcp add command | header |
| Cursor | .cursor/mcp.json | header |
| VS Code (Copilot) | .vscode/mcp.json | header secure prompt |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | header |
| Cline | cline_mcp_settings.json, or the Cline UI | header |
| Claude Desktop / web | claude.ai, or Claude Desktop → Settings → Developer → Edit Config | URL |
Claude Code
Register the server with one command — no file to edit:
claude mcp add --transport http \
--header "CL-API-Key: YOUR_COMPETLAB_API_KEY" \
competlab https://mcp.competlab.com/mcpCursor
Add the server to .cursor/mcp.json in your project (or the global Cursor MCP settings):
{
"mcpServers": {
"competlab": {
"url": "https://mcp.competlab.com/mcp",
"headers": {
"CL-API-Key": "YOUR_COMPETLAB_API_KEY"
}
}
}
}VS Code (Copilot)
VS Code uses a servers block (not mcpServers) and can prompt for the key securely, so
it never sits in the file. Add this to .vscode/mcp.json:
{
"inputs": [
{
"type": "promptString",
"id": "competlab-api-key",
"description": "CompetLab API Key (starts with cl_live_)",
"password": true
}
],
"servers": {
"competlab": {
"type": "http",
"url": "https://mcp.competlab.com/mcp",
"headers": {
"CL-API-Key": "${input:competlab-api-key}"
}
}
}
}Windsurf
Windsurf uses serverUrl rather than url. Add this to
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"competlab": {
"serverUrl": "https://mcp.competlab.com/mcp",
"headers": {
"CL-API-Key": "YOUR_COMPETLAB_API_KEY"
}
}
}
}Cline
Add the server through the Cline UI (Installed → Advanced MCP Settings) or edit
cline_mcp_settings.json directly. Note the disabled: false flag:
{
"mcpServers": {
"competlab": {
"url": "https://mcp.competlab.com/mcp",
"headers": {
"CL-API-Key": "YOUR_COMPETLAB_API_KEY"
},
"disabled": false
}
}
}Claude Desktop and Claude on the web
Claude on the web and Claude Desktop connect by URL and don’t send custom headers, so the key goes in the URL. In Claude Desktop, open Settings → Developer → Edit Config and add:
{
"mcpServers": {
"competlab": {
"url": "https://mcp.competlab.com/mcp?api_key=YOUR_COMPETLAB_API_KEY"
}
}
}Because the key is in the URL, treat the whole URL as a secret — don’t share it in a chat, a screenshot, or a committed file. If your client supports headers, prefer the header form and keep the key out of the URL.
Verify the connection
Once the server is added, your client should list the CompetLab tools. In Claude Code, check with:
claude mcp listYou should see competlab in the list. In any client, the quickest end-to-end test is to
ask the agent to list your projects — that calls the list_projects tool and confirms
both the connection and your key in one step. If your key is missing or malformed, the
server rejects the request with a 401 before any tool runs, so your client shows the
CompetLab server as failing to connect rather than returning a tool result — see
Troubleshooting below.
Run the server locally (advanced)
For offline or air-gapped work, CompetLab publishes an open-source version of the server that runs locally over stdio. It’s the same tools, connecting straight to the CompetLab REST API — there’s no reason to use it over the hosted URL unless you specifically need to run the process yourself. Clone and build it per the repository’s README, then run:
COMPETLAB_API_KEY=YOUR_COMPETLAB_API_KEY node dist/index.jsTo wire the local stdio server into Claude Desktop, point the config at the built file:
{
"mcpServers": {
"competlab": {
"command": "node",
"args": ["/path/to/competlab-mcp-server/dist/index.js"],
"env": {
"COMPETLAB_API_KEY": "YOUR_COMPETLAB_API_KEY"
}
}
}
}Troubleshooting
api_key_missing— the server saw no key. Check that yourCL-API-Keyheader is spelled exactly, or that?api_key=is on the URL for a header-less client.api_key_invalid— the key isn’t the right shape. Valid keys start withcl_live_and are 40 characters; make sure you copied the whole thing.- The client can’t send headers — use the
?api_key=URL form (the Claude Desktop / web config above). api_unreachable— the server couldn’t reach the CompetLab API. This is transient; retry, and check the CompetLab status page if it persists.
Next steps
- Browse the 33 tools → — every tool with its parameters and a worked example.
- Back to the MCP Server overview → — how it works, auth, and the FAQ.