CMP-server Pocket Option 2026

CMP-server Pocket Option 2026

Enables AI assistants to interact with the PocketOption trading platform via MCP, including balance checks, candle data, asset screening, and trade placement, with support for multi-agent coordination.

Category
Visit Server

README

<div align="center">

<img src="https://capsule-render.vercel.app/api?type=waving&color=0:00ff00,100:0066ff&height=220&section=header&text=CMP-server%20Pocket%20Option%202026&fontSize=34&fontColor=ffffff&fontAlignY=38&animation=fadeIn&desc=Let%20any%20AI%20read%20the%20market%20and%20trade%20on%20PocketOption%20via%20MCP&descAlignY=58&descSize=15" alt="CMP-server Pocket Option 2026"/>

<br/>

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

</div>


[!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.

✨ 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."

<details> <summary>Run it standalone to sanity-check the connection</summary>

# 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. </details>

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

<div align="center">

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

</div>

⭐ Support the project

<div align="center">

Stars Forks Issues

</div>

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).

<div align="center">

Share on X Telegram

</div>

πŸ› 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 πŸ™

<div align="center">

Donate on Bybit

<img src="assets/bybit-uid-qr.png" width="150" alt="Bybit UID 497849886"/>

Bybit UID: 497849886

</div>

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

<div align="center">

Star History Chart

</div>

πŸ“œ License

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

<div align="center"> <img src="https://capsule-render.vercel.app/api?type=waving&color=0:0066ff,100:00ff00&height=120&section=footer" alt=""/> </div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured