# three.ws Portfolio

Connects an agent to portfolio values, wallet balances and closed trades through MCP. It can also send tokens on Solana.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 249
- Author: nirholas
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nirholas/three.ws/tree/HEAD/packages/portfolio-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/threews-portfolio

## What it does

The server reads live information from three.ws and Solana RPC. It can return portfolio value and its history, token-level positions, a public feed of closed trades with realized PnL, and on-chain balances for Solana addresses. Account data requires a three.ws session; the trade feed and balance lookup do not.

\`send_transfer` signs and broadcasts a real SOL or SPL token transfer on Solana mainnet. Supply a key through `SOLANA_SECRET_KEY` or the `secret` parameter, and set `confirm: true` to execute. Transfers cannot be reversed, so verify the recipient and amount before calling the tool. Node.js >= 20 is required.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `THREE_WS_BASE`, `THREE_WS_TIMEOUT_MS`, `THREE_WS_SESSION`, `SOLANA_RPC_URL`, `SOLANA_SECRET_KEY`, `MAX_SOL_PER_TX`, `RECIPIENT_ALLOWLIST`, `REQUIRE_CONFIRM` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> --env THREE_WS_SESSION=<THREE_WS_SESSION> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> --transport stdio portfolio-mcp -- npx -y @three-ws/portfolio-mcp
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add portfolio-mcp --env THREE_WS_BASE=<THREE_WS_BASE> --env THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> --env THREE_WS_SESSION=<THREE_WS_SESSION> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> -- npx -y @three-ws/portfolio-mcp
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "portfolio-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@three-ws/portfolio-mcp"
            ],
            "env": {
                "THREE_WS_BASE": "<THREE_WS_BASE>",
                "THREE_WS_TIMEOUT_MS": "<THREE_WS_TIMEOUT_MS>",
                "THREE_WS_SESSION": "<THREE_WS_SESSION>",
                "SOLANA_RPC_URL": "<SOLANA_RPC_URL>",
                "SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. 3 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "portfolio-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@three-ws/portfolio-mcp"
            ],
            "env": {
                "THREE_WS_BASE": "<THREE_WS_BASE>",
                "THREE_WS_TIMEOUT_MS": "<THREE_WS_TIMEOUT_MS>",
                "THREE_WS_SESSION": "<THREE_WS_SESSION>",
                "SOLANA_RPC_URL": "<SOLANA_RPC_URL>",
                "SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. 3 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e THREE_WS_BASE=<THREE_WS_BASE> -e THREE_WS_TIMEOUT_MS=<THREE_WS_TIMEOUT_MS> -e THREE_WS_SESSION=<THREE_WS_SESSION> -e SOLANA_RPC_URL=<SOLANA_RPC_URL> -e SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> portfolio-mcp npx -y @three-ws/portfolio-mcp
```
Replace <…> with your own values. 3 more environment variables are in the server README

## When to use it
- check current asset values across owned wallets
- review portfolio value over time
- find realized PnL for closed trades
- look up SOL and SPL balances for an address
- send SOL or an SPL token from a wallet

## Example prompts
- Show my current portfolio value with a breakdown by wallet.
- Review my portfolio history for the last 30 days and find closed trades for this token.
- Prepare a 0.1 SOL transfer to this address, verify the recipient and amount, then ask me to confirm.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

From the same set: [nirholas/three.ws](https://affpapa.org/en/nevibecode/by/nirholas/three.ws.md) — 43 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
