Connect Claude Code
Sign in with your Harmony account, or use an API key. If your Account is in the EU, use https://api.eu.harmony.ai/api/mcp in the commands and .mcp.json below.
Sign in with your Harmony account
If you already added Harmony as a connector in Claude and you sign in to Claude Code with that Claude account, skip these steps. Harmony appears in /mcp as a claude.ai connector. Adding the server again creates a second connection that replaces the connector in Claude Code.
-
Add the Harmony server:
claude mcp add --transport http harmony https://api.harmony.ai/api/mcp -
Start Claude Code, run
/mcp, selectharmony, and sign in to Harmony in the browser window that opens. You can also sign in from your shell withclaude mcp login harmony. -
Choose the Account Claude Code should use, then click Continue.
-
On the consent page, click Allow. Harmony warns that the return address is on your own computer, because Claude Code receives the sign-in there. If it labels the app Unverified, Claude Code registered itself and chose its own name. Allow it only if you started the connection.
-
Ask Claude Code: "List my Harmony workflows."
To remove Claude Code's access, disconnect it in Harmony under Settings > Developers > Connected apps. Clear authentication in /mcp removes the sign-in Claude Code saved, but the app stays listed in Harmony until you disconnect it there.
Claude Code stays signed in while you use it. After 30 days without use, it asks you to sign in again.
Use an API key
-
Put your API key in an environment variable:
export HARMONY_API_KEY="harmony_pk_..." -
Add the Harmony server:
claude mcp add --transport http harmony https://api.harmony.ai/api/mcp \--header "Authorization: Bearer $HARMONY_API_KEY" -
Start Claude Code and ask: "List my Harmony workflows."
Claude Code saves the key in ~/.claude.json.
Share the setup with your team
Commit a .mcp.json at the project root:
{
"mcpServers": {
"harmony": {
"type": "http",
"url": "https://api.harmony.ai/api/mcp"
}
}
}
Each developer approves the harmony server the first time Claude Code starts in the project, then signs in through /mcp.
To use API keys instead, add "headers": { "Authorization": "Bearer ${HARMONY_API_KEY}" } to the server. The file then holds no key, and Claude Code reads each developer's own key from HARMONY_API_KEY.