Skip to content
MCP server

three.ws Portfolio

An agent's trading state — portfolio value, PnL, live balances, trade feed, and signed…

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.1.2
Listing updated
5 days ago

About three.ws Portfolio

three.ws Portfolio is an open-source MCP server. It runs locally on your machine and is started by your AI client.

An agent's trading state — portfolio value, PnL, live balances, trade feed, and signed transfers.

Install

Run in a terminal

claude mcp add portfolio-mcp --env THREE_WS_SESSION='<THREE_WS_SESSION>' --env SOLANA_SECRET_KEY='<SOLANA_SECRET_KEY>' -- npx -y @three-ws/portfolio-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "portfolio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/portfolio-mcp"
      ],
      "env": {
        "THREE_WS_SESSION": "<THREE_WS_SESSION>",
        "SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "portfolio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/portfolio-mcp"
      ],
      "env": {
        "THREE_WS_SESSION": "<THREE_WS_SESSION>",
        "SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "portfolio-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/portfolio-mcp"
      ],
      "env": {
        "THREE_WS_SESSION": "<THREE_WS_SESSION>",
        "SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "portfolio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/portfolio-mcp"
      ],
      "env": {
        "THREE_WS_SESSION": "<THREE_WS_SESSION>",
        "SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "portfolio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@three-ws/portfolio-mcp"
      ],
      "env": {
        "THREE_WS_SESSION": "<THREE_WS_SESSION>",
        "SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
      }
    }
  }
}

Configuration

  • THREE_WS_BASEBase URL of the three.ws API that serves the portfolio + trades endpoints. Override only when self-hosting or targeting a preview deployment.
  • THREE_WS_TIMEOUT_MSPer-request timeout in milliseconds for the live three.ws API reads.
  • THREE_WS_SESSIONYour 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 not need it. Treat like a password.
  • SOLANA_RPC_URLSolana 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.
  • SOLANA_SECRET_KEYBase58-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.Required
  • MAX_SOL_PER_TXPer-transaction spend cap in SOL for native SOL transfers via send_transfer. Bounds the blast radius of a leaked key or an injected argument.
  • RECIPIENT_ALLOWLISTOptional comma-separated base58 pubkeys. When set, send_transfer refuses any recipient not in the list.
  • REQUIRE_CONFIRMWhen on (default), send_transfer refuses until re-issued with confirm:true. Set 0/false to disable the gate.

Pricing

Open source

Prices change. Check three.ws before you buy.

three.ws Portfolio FAQ

Is three.ws Portfolio free?

Yes. three.ws Portfolio is open source, so you can use and self-host it for free.

How do I add three.ws Portfolio to Claude Code?

Run this command in your terminal: claude mcp add portfolio-mcp --env THREE_WS_SESSION='<THREE_WS_SESSION>' --env SOLANA_SECRET_KEY='<SOLANA_SECRET_KEY>' -- npx -y @three-ws/portfolio-mcp