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.
You sign in to Sonar during setup. No account? Create one free.
Server URLhttps://sonarfolio.com/api/mcpOpen Customize, then Connectors.
Open Claude connectors(opens in a new tab)Select + Add, then Add custom connector. Name it Sonar and paste the server URL.
If asked, choose Sign in now and Use Claude's published identity, with no client ID or secret, then Add.
Select Connect, sign in and select Allow. In a chat, turn it on under +, then Connectors.
What are my five largest positions?Use ChatGPT on the web. Custom MCP servers depend on your ChatGPT plan; on Business and Enterprise, an admin may need to allow them.
You sign in to Sonar during setup. No account? Create one free.
Server URLhttps://sonarfolio.com/api/mcpOpen Plugins.
Open ChatGPT plugins(opens in a new tab)Select +, then Add custom MCP server. Name it Sonar and paste the server URL.
Set Authentication to OAuth and leave client ID and secret empty. Accept the warning, then select Create as a plugin.
When asked, sign in and select Allow. Then install it from your plugins and type @ in a chat.
What are my five largest positions?ChatGPT asks before adding a position.
For header-based clients like Claude Code and Cursor, with an API key.
Create a free account, then a key. It's shown once.
Get your API keyAdd Sonar to your client.
Claude Codeclaude mcp add --transport http sonar https://sonarfolio.com/api/mcp \ --header "Authorization: Bearer YOUR_KEY"
Cursor: ~/.cursor/mcp.json{ "mcpServers": { "sonar": { "url": "https://sonarfolio.com/api/mcp", "headers": { "Authorization": "Bearer YOUR_KEY" } } } }Other MCP clients: Streamable HTTP, header Authorization: Bearer YOUR_KEYhttps://sonarfolio.com/api/mcpRun
/mcpin Claude Code to check the connection.
Or skip the key: add the URL without the header, run /mcp, choose Sonar and select Authenticate.
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.
| Plan | Included requests | Covers |
|---|---|---|
| Free | API credits only | Prices and your portfolio |
| Starter | 500 a day | Prices, social data and adding positions |
| Standard | 1,000 a day | Adds holdings, P&L, allocation and onchain data |
| Premium | 2,000 a day | Adds 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.