three.ws Portfolio
v0.1.2An agent's trading state — portfolio value, PnL, live balances, trade feed, and signed transfers.
Values you need
| Variable | What it is | |
|---|---|---|
THREE_WS_BASE | optional | Base URL of the three.ws API that serves the portfolio + trades endpoints. Override only when self-hosting or targeting a preview deployment. Default: https://three.ws |
THREE_WS_TIMEOUT_MS | optional | Per-request timeout in milliseconds for the live three.ws API reads. Default: 20000 |
THREE_WS_SESSION | optional secret | Your three.ws session token (the value of the `__Host-sid` cookie from a signed-in browser). Required for the account-scoped reads — get_portfolio_summary, get_portfolio_history, get_portfolio_asset — which return data for the agents YOU own. The public trade feed and on-chain balance reads do n |
SOLANA_RPC_URL | optional | Solana mainnet RPC endpoint used by get_wallet_balances and send_transfer. Defaults to https://api.mainnet-beta.solana.com — bring your own (Helius / Quicknode / Triton) for production traffic. Default: https://api.mainnet-beta.solana.com |
SOLANA_SECRET_KEY | required secret | Base58-encoded Solana secret key for the wallet that send_transfer signs from. REQUIRED for send_transfer (the only write tool); a per-call `secret` arg overrides it. Not needed for any read tool. Treat like cash. |
MAX_SOL_PER_TX | optional | Per-transaction spend cap in SOL for native SOL transfers via send_transfer. Bounds the blast radius of a leaked key or an injected argument. Default: 0.5 |
RECIPIENT_ALLOWLIST | optional | Optional comma-separated base58 pubkeys. When set, send_transfer refuses any recipient not in the list. |
REQUIRE_CONFIRM | optional | When on (default), send_transfer refuses until re-issued with confirm:true. Set 0/false to disable the gate. Default: true |
npm (npx) verified
Requires Node.js 18+
Run in a terminal
claude mcp add portfolio-mcp -e 'SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY>' -- npx -y @three-ws/portfolio-mcp@0.1.2Add to
claude_desktop_config.json{
"mcpServers": {
"portfolio-mcp": {
"args": [
"-y",
"@three-ws/portfolio-mcp@0.1.2"
],
"command": "npx",
"env": {
"SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"portfolio-mcp": {
"args": [
"-y",
"@three-ws/portfolio-mcp@0.1.2"
],
"command": "npx",
"env": {
"SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "SOLANA_SECRET_KEY",
"id": "solana-secret-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"portfolio-mcp": {
"args": [
"-y",
"@three-ws/portfolio-mcp@0.1.2"
],
"command": "npx",
"env": {
"SOLANA_SECRET_KEY": "${input:solana-secret-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.portfolio-mcp]
command = "npx"
args = ["-y", "@three-ws/portfolio-mcp@0.1.2"]
env = { "SOLANA_SECRET_KEY" = "<SOLANA_SECRET_KEY>" }For AI agents
- Ask the user for: SOLANA_SECRET_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: get_portfolio_summary, get_portfolio_history, get_portfolio_asset, get_trades_feed, get_wallet_balances, send_transfer.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json