Connect Claude Code

Claude Code speaks HTTP MCP with custom headers, so it uses the plain endpoint and a bearer token. Claude Code's interface changes between releases; the command and flags below are what stay the same.

Before you start

Create an API key in Fitaio (Settings, then Developer). Pick read and write scope if Claude Code should log entries.

Connect

Run once, replacing the key:

claude mcp add --transport http fitaio https://fitaio.app/mcp --header "Authorization: Bearer fitaio_YOUR_KEY"

Add --scope user to make the server available in every project instead of the current one.

Check it worked

claude mcp list

fitaio should show as connected. Then start a session and ask:

Use Fitaio to show my personal records and the date of each.

Claude Code calls get_personal_records. Every tool is listed in the tool reference. Inside a session, /mcp shows the server status and its tools.

Troubleshooting

  • claude mcp list shows the server as failed. Run claude mcp get fitaio and check the URL and header. The header value is Bearer followed by the key, with one space.
  • invalid_key. Recreate the key in the app and run claude mcp remove fitaio, then add it again.
  • Writes refused with insufficient_scope. The key is read-only; create one with read and write scope.