Set Up Claude Code CLI
The MCP server is currently in preview. The configurations below point to api-preview.stoxiio.com.
Connect Stoxiio to the Claude Code command‑line interface so you can query your financial data from the terminal.
Prerequisites
- Claude Code CLI installed — see Claude Code docs
- A Stoxiio Read‑only API key — see Generate an API Key
Configuration
Claude Code reads MCP server configurations from a .mcp.json file.
Option 1 — Project‑level configuration
Create a .mcp.json file at the root of your project:
{
"mcpServers": {
"stoxiio": {
"type": "http",
"url": "https://api-preview.stoxiio.com/mcp",
"headers": {
"X-Api-Key": "stx_your_api_key_here"
}
}
}
}
If you use a project‑level .mcp.json, make sure to add it to your .gitignore so your API key is not committed to version control:
.mcp.json
Option 2 — Global configuration
Add the server to your global Claude Code config at ~/.claude.json:
{
"mcpServers": {
"stoxiio": {
"type": "http",
"url": "https://api-preview.stoxiio.com/mcp",
"headers": {
"X-Api-Key": "stx_your_api_key_here"
}
}
}
}
Option 3 — Using the CLI
You can also add the server interactively:
claude mcp add stoxiio --transport http --url https://api-preview.stoxiio.com/mcp --header "X-Api-Key: stx_your_api_key_here"
To add it globally (available across all projects):
claude mcp add stoxiio --transport http --url https://api-preview.stoxiio.com/mcp --header "X-Api-Key: stx_your_api_key_here" -s user
Storing your API key securely
Claude Code config files store the API key in plaintext. To protect your key using environment variables or your OS credential store, see:
Verify the connection
Start Claude Code and ask:
claude
> What is my total wealth?
Claude should call the get_wealth_summary tool and return your wealth breakdown.
You can also check that the server is registered:
claude mcp list
Troubleshooting
| Problem | Solution |
|---|---|
| Server not listed | Run claude mcp list and verify the entry exists. Re-add if needed. |
| 401 Unauthorized | Your API key is invalid or lacks the Read scope. Generate a new one. |
| Connection error | Check your internet connection and that https://api-preview.stoxiio.com/mcp is reachable. |
| Tools not invoked | Make sure Claude has tool‑use enabled. Ask explicitly: "Use the stoxiio tools to…" |