Skip to main content
Glama
Rufus011

CMP-server Pocket Option 2026

by Rufus011

Python MCP License Tests

CI Ruff Types: mypy Code style

A modern, async, fully-typed bridge between AI assistants and the PocketOption trading platform. Plug it into Claude Code, Claude Desktop, Cursor β€” or drive it from GPT / Grok β€” solo or as a coordinated team of analysts and traders. Your model can read balances, pull candles, screen assets, and place trades through clean MCP tools.

πŸ“– Full guide (English + Русский): GETTING_STARTED.md Β· βš™οΈ SETUP.md Β· 🩺 TROUBLESHOOTING.md


IMPORTANT

This is a terminal / developer tool β€” not a click-and-run desktop app. There's nothing to double-click: no .exe, no installer, no window, no buttons. You set it up from a terminal / command line (pip install, then run a command) and connect it to an AI client (Claude Code, Claude Desktop, Cursor) by pasting a small block into that client's config file. It has no GUI of its own. If you've never used a command line, this isn't plug-and-play β€” start with GETTING_STARTED.md, which walks through every step.

WARNING

Trade responsibly. Binary options are negative-expectation by design, and OTC pairs use synthetic prices the broker controls β€” no bot changes that math. Real-money trading is off by default and only turns on when you explicitly set PO_ALLOW_REAL=1 / allow_real=True. Automated trading may also violate PocketOption's terms of service. Test on a demo account first; you use this at your own risk.

🎯 What it is β€” and what it isn't

  • It is clean, typed, tested infrastructure: a way to wire AI models into PocketOption over MCP, with real async plumbing, safety-first defaults, per-model memory, and multi-agent coordination. A solid base to build and learn on.

  • It isn't a profitable strategy or a "money-making bot." Binary options are negative-expectation, and this API is unofficial (reverse-engineered). The tooling makes agents disciplined and safe, not profitable β€” treat it as a framework and a learning / engineering showcase, and stay on demo.

Related MCP server: :GT Protocol MCP Server

✨ Why this exists

Most PocketOption wrappers hand-roll the socket.io protocol, ship broken imports, disable TLS verification, and leak your session token into logs. This one doesn't.

  • 🧠 AI-native β€” exposes trading as first-class MCP tools, so any MCP host can use it with zero glue code.

  • ⚑ Truly async & event-driven β€” built on python-socketio; prices, fills and candles resolve on real events, no polling loops.

  • πŸ”’ Secure by default β€” TLS verification on, session tokens redacted from every log and protocol dump, real-money trading gated behind an explicit flag.

  • 🧩 Model-agnostic core β€” the trading logic lives once in client.py; Claude, GPT and Grok are thin facades over it.

  • πŸ§ͺ Actually tested β€” 72 offline tests (parsing, routing, safety guards, secret redaction) that need no network and no SSID.

  • 🐍 Typed & pinned β€” full type hints, py.typed, and a pinned Python version so tools never silently "modernize" your project.

πŸ› οΈ What your AI can do through it

Tool

What it does

get_balance

current balance, demo/live

list_assets

tradeable assets with payout % and allowed expirations

get_asset_info

one asset: payout, open/closed, expirations

get_candles

OHLCV candles at any timeframe (60 / 300 / 900 / 3600 / 14400 s…)

get_price

live price for an asset

place_trade

open a trade (call/put, any amount, expiration in seconds)

check_result

wait for a trade to close β†’ win/loss + profit

open_positions

trades currently open

trade_history

recent closed trades

performance

win rate and net P&L this session

The model computes its own indicators from get_candles β€” it never needs to read a chart image.

🀝 One model β€” or a whole trading desk

Connect a single model, or run several at the same time. Every model gets the exact same PocketOption toolset, and an optional shared opinion board lets them operate as a team β€” analysts posting reads, a trader acting on the consensus.

Connect…

How

Name on the board

Claude β€” Code / Desktop / Cursor

MCP config (claude_config_example.json)

claude

GPT β€” OpenAI

python run_gpt.py

gpt

Grok β€” xAI

python run_grok.py

grok

Any OpenAI-compatible β€” OpenRouter, Ollama, LM Studio, Mistral…

python run_any.py

model name

TradingView market data

add the tradingview MCP block β€” works with any of the above

β€”

Turn them into a desk. Run two or three models side by side and they coordinate through a shared, TTL-expiring opinion board (post_opinion / read_opinions): e.g. GPT and Grok each post an analyst read on EURUSD_otc, and Claude reads the board and only places the trade when they agree. They can also talk directly β€” send_message / read_messages, broadcast or addressed to one agent by name β€” to ask questions, agree a plan, or divide work. Each agent's role is just its name + instructions (drop a per-model manual in agent_manuals/) β€” so you decide who researches and who pulls the trigger.

flowchart TB
    TV["πŸ“ˆ TradingView<br/>(optional data)"] -.-> G
    TV -.-> K
    G["πŸ€– GPT β€” analyst"] -->|post_opinion| B[("opinions.json<br/>shared board Β· TTL 15m")]
    K["πŸ€– Grok β€” analyst"] -->|post_opinion| B
    B -->|read_opinions| C["πŸ€– Claude β€” trader"]
    C -->|place_trade| PO[("🟒 PocketOption")]

Roles aren't hardcoded β€” the board just lets agents post and read each other's views. Whether a model acts as an analyst, a risk-checker, or the one that trades is defined by the prompt/instructions you give it and its AGENT_NAME.

πŸ—οΈ Architecture

flowchart LR
    AI["πŸ€– Claude Β· GPT Β· Grok"] -->|MCP tools| S["mcp_server.py<br/>(MCP facade)"]
    S --> C["client.py<br/><b>model-agnostic core</b>"]
    C -->|socket.io / WSS| PO[("🟒 PocketOption")]
    C --> M["models.py<br/>typed parsing"]
    C --> MEM["memory.py<br/>strategies + opinions"]
    TV["πŸ“ˆ TradingView MCP<br/>(optional)"] -.real-pair data.-> AI

The core knows nothing about any LLM. New models plug in as thin facades over the same client.py β€” the trading logic is written once.

πŸš€ Quick start

# 1. install (registers the `pocketoption-mcp` command)
pip install .

# 2. grab your DEMO SSID from pocketoption.com
#    F12 β†’ Network β†’ websocket β†’ the 42["auth",{...}] frame with "session"/"isDemo"

# 3. point Claude at it β€” merge the mcpServers block from
#    claude_config_example.json into your Claude / Cursor config, then restart.

Then just ask your assistant: "What PocketOption tools do you have?" β†’ "Show my balance and the top 5 OTC pairs by payout."

# bash / zsh
export PO_SSID='42["auth",{...}]'
pocketoption-mcp        # or: python -m cmp_server_pocket_option_2026.mcp_server
# PowerShell
$env:PO_SSID='42["auth",{...}]'
pocketoption-mcp

It should print Connected to … (demo) and wait. Ctrl+C to stop.

Full step-by-step (installing Python, getting the SSID, config file locations) lives in GETTING_STARTED.md.

πŸ“ˆ Optional: TradingView for real (non-OTC) pairs

OTC pairs are synthetic, so outside data can't help there β€” the model reads them from candles alone. For real pairs you can run the third-party tradingview-mcp server alongside this one (needs uv, no TradingView account). The tradingview block in claude_config_example.json wires it up. Note: PocketOption's EURUSD maps to TradingView's FX:EURUSD β€” the two don't share a symbol namespace, so the model bridges them.

πŸ§ͺ Development

pip install ".[dev]"
pytest                               # 66 offline tests β€” no network, no SSID
ruff check .                         # lint
mypy cmp_server_pocket_option_2026   # type-check

The suite is deliberately offline: it swaps the transport for a fake and feeds captured-shape events into the client, validating parsing, routing, safety guards and secret-redaction without ever touching PocketOption. CI runs all three on Python 3.10 / 3.11 / 3.12 / 3.13.

Runtime artifacts (sessions/, strategies/, opinions.json, dump.jsonl) are git-ignored. sessions/ holds your account token β€” never commit or share it.

🧰 Tech stack

Python  python-socketio  Β·  pydantic v2  Β·  mcp  Β·  pytest  Β·  ruff  Β·  mypy

⭐ Support the project

Stars Forks Issues

If this saved you time or you find it interesting, give it a ⭐ β€” it's the single biggest thing that helps the project reach other traders and developers. Fork it, build on it, share it (it's MIT).

Share on X Telegram

πŸ› Found a bug? πŸ’‘ Have an idea?

Contributions of every size are welcome β€” the project is actively developed and open to collaborators.

  • 🐞 Bug β†’ open an issue with the Bug report template. Redact your SSID before pasting logs.

  • πŸ’‘ Feature or improvement β†’ open an issue with the Feature request template.

  • πŸ’¬ Questions / open discussion β†’ the Discussions tab.

  • πŸ”§ Want to code? β†’ PRs welcome β€” read CONTRIBUTING.md first (it's short). Good first areas: new indicators, more model adapters, better desk coordination.

πŸ’š Support development

Building and maintaining this is unpaid open-source work. If it's useful to you, a donation keeps it moving β€” completely optional, and thank you πŸ™

Donate on Bybit

Bybit UID: 497849886

How to send: in the Bybit app, use Send / transfer by UID (Bybit Pay), enter UID 497849886, then pick the coin and amount. Bybit-to-Bybit transfers are instant and fee-free. (The QR just encodes the UID for quick copying β€” it doesn't auto-open a payment.)

πŸ“ˆ Star history

Star History Chart

πŸ“œ License

MIT Β© 2026 Rufus011 β€” build on it freely, trade at your own risk.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rufus011/CMP-server_Pocket-option-2026'

If you have feedback or need assistance with the MCP directory API, please join our Discord server