# Etoro Portfolio Agent

> eTRADER — a personal eToro portfolio agent for Claude Code, backed by a local Python MCP server wrapping the eToro Public API for tracking, analysis, and confirmation-gated trade execution.

- **Type:** MCP server
- **Install:** `agentstack add mcp-mattsebastianh-etoro-portfolio-agent`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [mattsebastianh](https://agentstack.voostack.com/s/mattsebastianh)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [mattsebastianh](https://github.com/mattsebastianh)
- **Source:** https://github.com/mattsebastianh/etoro-portfolio-agent

## Install

```sh
agentstack add mcp-mattsebastianh-etoro-portfolio-agent
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# eTRADER — eToro Portfolio Agent

[](LICENSE)
[](etoro-mcp/requirements.txt)
[](https://modelcontextprotocol.io)
[](https://claude.com/claude-code)

A personal eToro portfolio agent for [Claude Code](https://claude.com/claude-code), backed by a local Python MCP server that wraps the [eToro Public API](https://api-portal.etoro.com). Track positions, analyze instruments, manage risk, and execute confirmation-gated trades — all from a Claude Code session.

## How it works

Claude Code loads this project and operates as **eTRADER**, a disciplined portfolio agent defined in [`agent instruction/etoro-trader-project-instructions.md`](agent%20instruction/etoro-trader-project-instructions.md). The agent talks to eToro through a project-scoped MCP server (`etoro-mcp/server.py`, stdio transport) that exposes tools for:

| Skill | Tools |
|---|---|
| Identity | `get_profile` |
| Tracking | `get_portfolio`, `get_positions`, `get_balances`, `get_pnl` |
| History | `get_trading_history` |
| Market data | `search_instruments`, `get_instrument_by_symbol`, `get_instrument_by_id`, `get_rates`, `get_candles` |
| Watchlists & alerts | `get_watchlists`, `add_to_watchlist`, `create_price_alert`, `get_price_alerts` |
| Execution (opt-in) | `create_order`, `close_position`, `cancel_order`, `modify_position` |

## Hard guardrails

These are baked into the agent instructions and are non-negotiable:

- **Confirmation gate** — no order is created, modified, or closed without explicit confirmation of the exact order ticket in the current conversation.
- **Demo-first** — new strategies run in demo mode before real.
- **Stop-loss required** — every new position ships with a stop-loss.
- **Position sizing** — default risk ≤1% of equity per trade; single positions capped at 10% of equity.
- Capital preservation ranks above profit capture. Always.

## Setup

Requirements: Python 3.14+, a Claude Code installation, and eToro API keys (create them in eToro under *Settings → Trading → API Key Management*).

```bash
./install-etoro-mcp.sh
```

The installer creates `etoro-mcp/.venv`, installs pinned dependencies from `etoro-mcp/requirements.txt`, and writes a project-scoped `.mcp.json` from your keys.

Alternatively, copy `.mcp.json.example` to `.mcp.json` and fill it in by hand.

### Configuration (`.mcp.json` env vars)

| Variable | Purpose |
|---|---|
| `ETORO_API_KEY` | Public API key (identifies the app) |
| `ETORO_USER_KEY` | User key from API Key Management |
| `ETORO_MODE` | `demo` or `real` |
| `ETORO_ENABLE_TRADING` | `true` to enable the execution tools |

Change mode or trading by editing `.mcp.json` and restarting the Claude Code session. Verify the server with `claude mcp list` or `/mcp`.

> **`.mcp.json` contains your API keys — it is gitignored and must never be committed.**

## Usage

Start Claude Code in the project directory and talk to it in plain language:

- *"How's my portfolio?"* — snapshot with positions, P&L, and risk flags
- *"Analyze TSLA"* — multi-timeframe technical read with an enter/wait/avoid verdict
- *"Buy $500 of AAPL with a 5% stop"* — presents an order ticket, executes only on your confirmation
- *"Risk check"* — concentration, aggregate risk-at-stop, drawdown protocol
- *"Weekly review"* — win rate, expectancy, and an honest behavioral diagnosis

## Project layout

| Path | Purpose |
|---|---|
| `agent instruction/` | The eTRADER role definition |
| `etoro-mcp/server.py` | The MCP server (single source) |
| `etoro-mcp/requirements.txt` | Pinned dependencies |
| `.mcp.json.example` | Key-free config template |
| `install-etoro-mcp.sh` | One-shot installer |
| `memory/` | Agent memory — one fact per file, indexed in `memory/MEMORY.md` (local-only; see `memory/MEMORY.md.example`) |
| `CHANGELOG.md` | Notable changes, feature by feature |

## Contributing

Issues and PRs are welcome. Please develop against **demo mode** only, never commit `.mcp.json` or any file containing keys, and keep the hard guardrails intact — changes that weaken the confirmation gate or stop-loss requirements won't be merged.

## License

[MIT](LICENSE)

## Disclaimer

This is a personal tool, not financial advice. Trading involves risk of loss; the agent is explicit that markets are probabilistic and never promises profit. Use demo mode first.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [mattsebastianh](https://github.com/mattsebastianh)
- **Source:** [mattsebastianh/etoro-portfolio-agent](https://github.com/mattsebastianh/etoro-portfolio-agent)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-mattsebastianh-etoro-portfolio-agent
- Seller: https://agentstack.voostack.com/s/mattsebastianh
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
