MCP quickstart
Make a key, add the server to your client, make a first call. About two minutes.
1. Make a key
Sign in to the app, open Account, Connect your agent, give the key a name (the machine it is for), pick a scope and an expiry, and press Make key. The key starts with
hek_and is shown once: copy it now. Scopefreeis enough to start. Scopefree+askalso lets the key callask, which spends AI budget.2. Keep it in an environment variable
Every setup on this site reads the key from
HARNESSLAB_API_KEY, so the key never sits in a file you might commit. Paste your key where it sayspaste-your-key-here.macOS and Linux
Add this to ~/.zshrc or ~/.bashrc, then open a new terminal.
export HARNESSLAB_API_KEY="paste-your-key-here"Windows (PowerShell)
Run this once, then open a new terminal.
[Environment]::SetEnvironmentVariable("HARNESSLAB_API_KEY", "paste-your-key-here", "User")3. Add the server to your client
Claude Code is one line. For every other client see Clients.
Run this in a terminal. Add --scope user to use the server in every project.
claude mcp add --transport http harnesslab https://app.harnesslab.co/mcp --header "Authorization: Bearer $HARNESSLAB_API_KEY"4. Make your first call
Ask your agent something the research can answer, for example: Use harnesslab to find what the research says about when to compact context. Or pick a prompt: in Claude Code type
/mcp__harnesslab__build_planand answer the argument.To see the raw exchange, list the tools with curl:
2. List the tools your key can call.
curl -sS https://app.harnesslab.co/mcp \ -H "Authorization: Bearer $HARNESSLAB_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}'5. Check the key
If something does not work, paste the key into Test my key under Account, Connect your agent. It says whether the key is valid, revoked, expired or the wrong scope, which tools it can call, its limits and what it used today. Troubleshooting lists the common causes.