コンテンツにスキップ

Claude CodeConnect

Claude Code

このコンテンツはまだ日本語訳がありません。

To sign in with OAuth, you need no API key: open Quick Install in Console, choose Claude, then Connect with MCP (Claude Code). Over SSH or on a machine without a browser, sign in with claude mcp login flovia --no-browser instead of /mcp. The sections below are for using a key instead.

If Claude Code says MCP server flovia already exists in user config, run claude mcp remove flovia --scope user first, then the add command again. A flovia added earlier without --scope takes precedence in that directory, so run claude mcp remove flovia --scope local there.

Claude Code loads a new MCP server only when it starts. After you add Flovia, quit and reopen it. claude --continue reopens your last conversation in that directory.

Save your key in a file only you can read. Run this, paste the key, then press Enter and Ctrl-D:

Terminal window
(umask 077; mkdir -p ~/.config/flovia && cat > ~/.config/flovia/key) && chmod 600 ~/.config/flovia/key

Then run the same setup Console provides:

Terminal window
claude mcp remove flovia --scope user 2>/dev/null; claude mcp add-json --scope user flovia "$(cat <<'JSON'
{
"type": "http",
"url": "https://api.flovia.dev/mcp",
"headersHelper": "printf '{\"Authorization\":\"Bearer %s\"}' \"$(tr -d ' \\t\\r\\n' < ~/.config/flovia/key)\""
}
JSON
)"

It first removes an earlier user-scope flovia, so it also works over an existing setup. Claude Code runs headersHelper on each connect, so it reads the key from the file. The key is not saved in its settings, and you do not need to edit your shell profile. If you replace the key, update the file and reconnect from /mcp.

--scope user applies in every directory. If you omit --scope, Claude Code saves the server for the current directory only.

Restart Claude Code and open /mcp. Then check your connection.

If /mcp shows Flovia as connected, its tools may be deferred rather than missing. Claude Code’s tool search (opens in new tab) loads MCP tool definitions when needed (checked October 22, 2026). Ask:

Use ToolSearch to find flovia_status, then call it once. If there is no match, report that without reading settings, keys or header values. Do not call provider tools or send raw HTTP requests.

If the tools still cannot be found, reconnect Flovia from /mcp and start a new chat. Deferred tools on a connected server do not by themselves mean your key is invalid. Replace the key only if the connection reports 401 or unauthorized.

To try Flovia now without restarting, use the CLI with the same file:

Terminal window
npx --package=@flovialabs/sdk@0.1.33 flovia status --key-file ~/.config/flovia/key

If you already keep the key in FLOVIA_KEY, set it in the private shell profile used to start Claude Code:

Terminal window
export FLOVIA_KEY='<your key>'

Reload that profile in your terminal, then run:

Terminal window
claude mcp add --transport http --scope user flovia https://api.flovia.dev/mcp --header 'Authorization: Bearer ${FLOVIA_KEY}'

Keep the single quotes around the header. Claude Code stores the variable reference and reads FLOVIA_KEY at start, so launch it from a terminal where it is set.

On Windows, we recommend OAuth through Quick Install: it needs no key and no shell setup. The key-file commands above need a POSIX shell, and Claude Code’s documentation does not say how headersHelper runs on native Windows, so with a key use an environment variable instead. Run this in PowerShell, paste your key when asked, then press Enter:

Terminal window
[Environment]::SetEnvironmentVariable('FLOVIA_KEY', (Read-Host 'Paste your Flovia key').Trim(), 'User')
claude mcp remove flovia --scope user 2>$null
claude mcp add --transport http --scope user flovia https://api.flovia.dev/mcp --header 'Authorization: Bearer ${FLOVIA_KEY}'

The key is saved as a user environment variable and stays out of the command and its history. Keep the single quotes around the header: PowerShell leaves ${FLOVIA_KEY} as is, and Claude Code reads the variable when it starts. A user variable reaches only programs started after it is set, so close the terminal and Claude Code, then start Claude Code from a new terminal.

If you run Claude Code inside WSL, use the steps above for macOS and Linux in WSL. Variables you export in WSL do not reach Windows apps, and Windows user variables are not exported into WSL by default.

With Flovia connected, Claude Code may still use its own web search or page fetching instead of Flovia. To make it use Flovia first, add this line to ~/.claude/CLAUDE.md, which it reads in every project.

Flovia (MCP server "flovia") is connected. For crypto prices, wallets, transactions, onchain and Solana reads, web search (Exa), reading web pages (Firecrawl) and text generation (OpenAI), use the flovia tools before your own web search, page fetching or other tools.
Terminal window
claude mcp remove flovia --scope user

If you used local scope, run the remove command in that directory with the same scope. Removing the setup does not revoke the key. To revoke a key that leaked, see Manage API keys. If a key is rejected, see By client.