Claude Code

Add Thirdfy MCP to Claude Code with one command, onboard by email, then add your agent key as a header.

Claude Code connects to Thirdfy as a remote HTTP MCP server.

1. Add the server

claude mcp add --transport http thirdfy https://mcp.thirdfy.com/mcp

Start Claude Code and run /mcp. thirdfy shows as connected, with its tool count. From a terminal, claude mcp list and claude mcp get thirdfy show the same.

2. Onboard by email

Use Thirdfy to onboard me with you@example.com.

Claude calls startEmailOnboarding and asks for the code from your inbox. It then calls completeEmailOnboarding with acceptTerms: true. The response includes your agent API key (agent-...) and execution wallets. Save the key; it is shown once.

Prefer the shell? thirdfy-agent login email does the same and stores the key in ~/.thirdfy/config.json. See Agent CLI authentication.

3. Add your key as a header

Thirdfy reads the agent key from the connection header on every call. Put it in an environment variable and re-add the server with the header:

export AGENT_API_KEY="agent-..."
claude mcp remove thirdfy
claude mcp add --transport http thirdfy https://mcp.thirdfy.com/mcp \
  --header "Authorization: Bearer $AGENT_API_KEY"

Your shell expands $AGENT_API_KEY when you run the command, so the stored config holds the key itself. For a config that keeps only the variable name, use a project .mcp.json (below).

Run /mcp again and reconnect. Credentialed tools now act for your agent. Don't paste the key into prompts; without the header those tools return 401 Authentication required.

Scopes and team setup

--scope decides where the server is saved:

ScopeWho sees itStored in
local (default)You, in this project~/.claude.json
projectEveryone who clones the repo.mcp.json at the project root
userYou, in every project~/.claude.json

For a team repo, commit a .mcp.json that reads each person's key from their own environment:

{
  "mcpServers": {
    "thirdfy": {
      "type": "http",
      "url": "https://mcp.thirdfy.com/mcp",
      "headers": {
        "Authorization": "Bearer ${AGENT_API_KEY}"
      }
    }
  }
}

Claude Code expands ${AGENT_API_KEY} when it connects. If the variable is unset, /mcp shows a warning. Claude Code asks for approval the first time it uses a project-scoped server.

4. Try it

Using Thirdfy:
1. List the OpenMarket actions.
2. Run get_openmarket_btc_funding and summarize it.
3. Check if my Hyperliquid venue is ready to trade.

Pair it with the CLI

Claude Code can also run the Agent CLI in the same session. Use MCP tools for discovery and single actions. Use thirdfy-agent ... --json for scripts, CI and repeatable runs.

Troubleshooting

IssueFix
/mcp shows failedCheck the URL is https://mcp.thirdfy.com/mcp and the transport is http
401 Authentication requiredAdd the Authorization: Bearer agent-... header (step 3)
Literal ${AGENT_API_KEY} sentExport the variable before you start Claude Code
AGENT_IDENTITY_MISMATCHThe model passed a different key in arguments. The header key is used