Developers

Use your portfolio from AI assistants, the terminal or your own code. Everything is read-only and covers only assets you hold.

Connect your AI assistant

Ask Claude, ChatGPT, Claude Code or Cursor about your holdings, or add a position by chat.

Works on every Claude plan, on the web, desktop and mobile. Free includes one custom connector.

  1. You sign in to Sonar during setup. No account? Create one free.

    Server URL
    https://sonarfolio.com/api/mcp
  2. Open Customize, then Connectors.

    Open Claude connectors(opens in a new tab)
  3. Select + Add, then Add custom connector. Name it Sonar and paste the server URL.

  4. If asked, choose Sign in now and Use Claude's published identity, with no client ID or secret, then Add.

  5. Select Connect, sign in and select Allow. In a chat, turn it on under +, then Connectors.

Test it: ask your assistant
What are my five largest positions?

Connectors see only assets you hold. They can add positions you describe, but can't trade, move funds or delete anything.

Troubleshooting

It won't connect or shows no tools

Check that the URL ends in /api/mcp and that sign-in ended with Allow. Otherwise, remove Sonar and add it again.

The assistant says a plan or credits are needed

Your plan sets what the assistant sees; each tool call is one request. See requests and credits on API and AI tools.

You disconnected an app or revoked a key

Access stops right away. To reconnect, remove Sonar, add it again and sign in.

You use Claude on a Team or Enterprise plan

An owner adds Sonar once with the server URL; each member signs in to their own account.

REST API

JSON over HTTPS with a bearer key. Each endpoint has a matching MCP tool and CLI command.

curl https://sonarfolio.com/api/v1/assets \
  -H "Authorization: Bearer YOUR_KEY"
  • GET/api/v1/meMCPget_usageCLIsonar statusPlan, access and today's usageStarter
  • GET/api/v1/assetsMCPlist_held_assetsCLIsonar assetsMarket and social data for each held assetStarter
  • GET/api/v1/assets/{id}MCPget_assetCLIsonar asset <SYMBOL>One held asset: quote, social, top creators, 90-day closesStarter
  • GET/api/v1/assets/search?q=MCPsearch_assetsCLIsonar search <QUERY>Find an asset id (names only)Starter
  • GET/api/v1/portfolioMCPget_portfolioCLIsonar portfolioTotals, 24h change, P&L, allocation, moversStandard
  • GET/api/v1/holdingsMCPlist_holdingsCLIsonar holdings [--account NAME]Every holding per accountStandard
  • POST/api/v1/holdingsMCPadd_positionCLIsonar add <SYMBOL> <QUANTITY> [--cost --date --account]Add a position: { asset_id, quantity, cost_usd?, date?, account? }Writes data. MCP clients see it marked destructive; the CLI asks first (--yes skips).Starter

Responses include source, timestamps and our disclaimer, plus X-RateLimit-Limit, -Remaining, -Reset and X-Credits-Remaining headers. Errors: { error: { code, message } }.

Command line

The same data in your terminal and scripts, with the same key.

Install and sign in

npm install -g sonarfolio
sonar login

Needs Node 18 or later. sonar login saves a key from API and AI tools; in scripts and CI, set SONAR_API_KEY instead.

More install options

Run the install again to update. Try it without installing: npx -p sonarfolio sonar status. Install from this site: npm install -g https://sonarfolio.com/cli/latest.tgz. Your key is saved to ~/.config/sonar/config.json, readable only by you.

Commands

Commands are listed with the REST endpoints, plus sonar watch [portfolio|assets] for a live view within your daily limit.

In scripts

sonar holdings --json | jq '.holdings[] | {symbol, value_usd}'

Every command takes --json and prints the API's JSON.

Limits and credits

Each API call, MCP tool call or CLI command is one request. Daily limits reset at 00:00 UTC.

PlanIncluded requestsCovers
FreeAPI credits onlyPrices and your portfolio
Starter500 a dayPrices, social data and adding positions
Standard1,000 a dayAdds holdings, P&L, allocation and onchain data
Premium2,000 a dayAdds holdings, P&L, allocation and onchain data

Plan names in the endpoint list mark where a request is included; elsewhere, API credits pay, on any plan. $1 buys 1,000, credits never expire, and every account starts with 100.