popmely
Integrates with Google Antigravity, allowing its AI assistant to leverage MCP tools for MetaTrader 5 trading operations.
Allows OpenAI Agents to use MCP tools for MetaTrader 5 trading, including market data retrieval, analysis, and order execution.
Persists trading journals, backtest results, and credit score data in an embedded SQLite database for historical analysis and reporting.
Sends real-time alerts for trade executions, stop-loss/take-profit events, and bot status updates to specified Telegram chats.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@popmelyAnalyze EURUSD H1 for ICT order blocks and FVG."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
popmely: MetaTrader 5 (MT5) Model Context Protocol (MCP) Server
popmely is a production-grade, asynchronous Model Context Protocol (MCP) server providing seamless integration between MetaTrader 5 (MT5) and Large Language Models (LLMs) such as Claude, Antigravity, Cursor, and OpenAI Agents.
It equips AI assistants with full-duplex control over financial marketsโranging from real-time price feeds, Smart Money Concept (SMC) structure analysis, bar-by-bar backtesting, automated risk calculation, and position lifecycle management, to a background autonomous trading bot with real-time Telegram alerts, a dynamic Trading Credit Score risk governance engine, institutional ICT strategy models, and an embedded SQLite Persistence Database.
Table of Contents
Related MCP server: mt5-mcp
๐ Key Features
Standard MCP Protocol: Fully compliant with JSON-RPC 2.0 stdio and SSE transports for interoperability across Anthropic Claude Desktop, Google Antigravity, Cursor, and custom agentic frameworks.
Smart Money Concepts (SMC) Engine: Native detection of Break of Structure (BOS), Change of Character (CHoCH), Order Blocks (OB), Fair Value Gaps (FVG), Liquidity Sweeps, and Optimal Trade Entry (OTE 61.8%โ78.6%).
Trading Credit Score System (v4.0): Adaptive risk governance model that adjusts trade lot sizes and halts execution dynamically based on consecutive Stop Loss hits and tier degradation.
Autonomous Strategy Engine: Non-blocking background worker with configurable polling intervals, automated order execution, trailing stops, auto-breakeven, and Telegram push notifications.
Event-Driven Backtester: In-memory bar-by-bar simulation engine calculating Win Rate, Profit Factor, Expected Payoff, and Maximum Drawdown with granular trade logs.
Strict Risk Safety Gates: Lot size caps, max daily drawdown limits, mandatory stop-loss constraints, and slippage protection.
๐บ๏ธ The Trader's Journey (Workflow)
flowchart TD
Start([๐
Market Open / Session Start]) --> Step1[<b>1. Market Briefing & Analysis</b><br>AI scans Daily Levels, Asian Range, & SMC Structure]
Step1 --> Step2[<b>2. Institutional Confluence Check</b><br>Score H4 Macro + H1 Structure + M15 FVG Retest]
Step2 --> Decision1{Confluence >= 80%?}
Decision1 -- No --> Wait[โณ Wait for Clear Setup / Liquidity Sweep]
Decision1 -- Yes --> Step3[<b>3. Risk & Credit Calibration</b><br>Check Credit Score Tier: ๐ข/๐ก/๐ /๐ด<br>Calculate exact % Lot Size & R:R target]
Step3 --> Step4[<b>4. Smart Order Execution</b><br>Execute via Market / Breakout Stop / Bracket OCO]
Step4 --> Step5[<b>5. Active Trade Lifecycle</b><br>Auto-Breakeven at +300 pts & Trailing Stop]
Step5 --> Step6[<b>6. Post-Trade Review & Journal</b><br>Auto-deduct on SL / Recover on TP<br>Log into AI Trade Journal]
Step6 --> End([๐ Daily Performance Summary])
style Start fill:#238636,stroke:#2ea043,color:#fff
style End fill:#1f6feb,stroke:#388bfd,color:#fff
style Step3 fill:#d29922,stroke:#bb8009,color:#000
style Step6 fill:#8957e5,stroke:#a371f7,color:#fffThe 6-Step Execution Lifecycle:
Market Briefing: Run
daily_market_briefingto assess macro trend, support/resistance, and session ranges.Institutional Confluence: Run
mt5_confluence_matrixormt5_analyze_silver_bulletto confirm setups with $\ge 80%$ probability.Risk & Credit Score: Verify
mt5_score_statusto ensure account is in GREEN or YELLOW tier; compute risk-weighted lot sizing.Smart Execution: Dispatch orders via
mt5_smart_order,mt5_place_bracket_order, ormt5_place_grid_orders.Lifecycle Management: Background bot monitors trailing stops, executes auto-breakeven, and sends Telegram alerts.
Journal & Governance: Review
mt5_get_trade_journalfor performance metrics, R:R analytics, and Credit Score health.
๐๏ธ System Architecture
graph TD
subgraph "AI Clients / MCP Hosts"
Claude[Claude Desktop / Antigravity]
Cursor[Cursor IDE]
Agent[Autonomous Agent / Script]
end
subgraph "popmely MCP Server"
FastMCP[FastMCP Server Protocol]
Router[Tool / Resource / Prompt Router]
subgraph "Core Engines"
CreditScore[Trading Credit Score Engine]
SMC[SMC Structure Analyzer]
Backtest[Event-Driven Backtester]
Bot[Autonomous Trading Worker]
PosMgr[Position & Breakeven Manager]
Notifier[Telegram / Webhook Notifier]
end
end
subgraph "Terminal Layer"
MT5[MetaTrader 5 Windows Terminal]
Broker[Liquidity Provider / Broker]
end
Claude <-->|stdio / JSON-RPC| FastMCP
Cursor <-->|stdio / JSON-RPC| FastMCP
Agent <-->|SSE / stdio| FastMCP
FastMCP --> Router
Router --> CreditScore
Router --> SMC
Router --> Backtest
Router --> Bot
Router --> PosMgr
Bot --> Notifier
PosMgr --> MT5
Bot --> MT5
Router --> MT5
MT5 <--> Broker๐ MCP Interface Specification
1. Tools (74 Callable Functions)
๐ผ Account & Terminal
Tool Name | Description | Parameters |
| Query balance, equity, margin, leverage, and floating profit. | None |
| Check terminal connection state and algo-trading permission. | None |
๐ Market Data
Tool Name | Description | Parameters |
| Fetch real-time Bid, Ask, Spread, and timestamps. |
|
| Get contract sizes, digits, point size, min/max volume. |
|
| Search broker's tradable asset database by keyword. |
|
| Retrieve recent historical OHLCV candles across standard timeframes. |
|
| Date/Time Range Candles: Fetch OHLCV candles and period price change % between specific dates/hours. |
|
๐ Technical & SMC Analysis
Tool Name | Description | Parameters |
| Calculate EMAs (20, 50, 200), RSI, MACD, ATR, Bollinger Bands. |
|
| Full SMC analysis: BOS, CHoCH, Order Blocks, FVGs, OTE levels. |
|
| SMC Visual Chart Renderer: Generates high-res dark-themed |
|
๐ Institutional & ICT Strategy Tools (New)
Tool Name | Description | Parameters |
| ICT Silver Bullet Analyzer: Liquidity Sweeps, MSS displacement, and unmitigated FVG trigger plans (1:2.5 R:R). |
|
| Judas Swing & Asian Sweep: Detects London/NY open stop hunts above/below Asian Range and generates sniper reversals. |
|
| Inversion FVG (IFVG) Scanner: Tracks broken FVGs that have inverted roles into high-probability support/resistance. |
|
| Multi-Timeframe Confluence Matrix: Computes a 0-100% Institutional Confluence Score across H4, H1, M15, and RSI. |
|
๐ฐ High-Impact News & Straddle Trading (New)
Tool Name | Description | Parameters |
| Live Economic Calendar: Official feeds for CPI, NFP, FOMC with Impact & Currency filters. |
|
| News Blackout Window: Check if market is within High-Impact news volatility window. |
|
| Trade the News Spike: Place two-sided bracket straddle order (BUY_STOP + SELL_STOP) with 1:3 R:R to catch explosive news spikes. |
|
| Post-News Volatility Analyzer: Real-time ATR spike & displacement to assess news momentum continuation. |
|
๐ฌ Backtesting Engine
Tool Name | Description | Parameters |
| Run historical backtest on SMC FVG or EMA Cross strategies with auto-archiving. |
|
๐งฎ Risk Management
Tool Name | Description | Parameters |
| Calculate position size by account risk %, balance, and SL distance. |
|
โก Smart Order & Position Execution
Tool Name | Description | Parameters |
| Send standard Market BUY/SELL order with SL, TP, and magic number. |
|
| Smart Auto-Risk Order: Computes exact lot size by % risk, verifies Credit Score, calculates TP by R:R, and executes in 1 step. |
|
| Place pending Limit or Stop orders ( |
|
| News/Breakout Straddle: Place both BUY_STOP above and SELL_STOP below market price simultaneously. |
|
| DCA / Grid Scaling: Place multiple pending limit orders stepping down (Buy) or up (Sell) to average entry price. |
|
| List currently open market positions with floating PnL and tickets. |
|
| Update Stop Loss or Take Profit of an active position. |
|
| Close an active position by ticket ID with partial close support. |
|
| Emergency liquidation of all active positions. |
|
| Close only profitable open positions (Profit > min_profit_usd) to lock in gains. |
|
| Smart Scale-Out: Close N% (e.g. 50%) of a position, lock profit into account, and move SL to Breakeven (100% Risk-Free). |
|
| Bulk Scale-Out: Close N% across all profitable positions and secure remaining volumes at Breakeven in 1 click. |
|
| Lock Guaranteed Profit: Move Stop Loss to a guaranteed positive profit level (+points beyond entry). |
|
| Close only losing open positions (Loss < -max_loss_usd) to cut losses immediately. |
|
| Close open positions matching a specific comment / order name tag (e.g. 'AI_SMC', 'Manual'). |
|
| Close open positions matching a specific EA Magic Number. |
|
| List all active pending orders in terminal. |
|
| Cancel a single pending order by ticket ID. |
|
| Cancel all active pending orders across terminal in one click. |
|
| Retrieve closed trade logs and historical deals for past N days. |
|
| Date Range PnL & Deals: Retrieve closed trades and win rate stats between specific dates. |
|
| Second-by-Second Sniper Scalp: High-speed M1/tick momentum scalp with ultra-tight SL, 1:2 R:R TP, and spread protection. |
|
| AI Trade Journey & Journal: Generates detailed trade journey logs, R:R analytics, Credit Score impact, and AI feedback. |
|
๐ค Autonomous Agent Management & Notifications
Tool Name | Description | Parameters |
| Launch background autonomous scanning and execution worker. |
|
| Terminate the background autonomous worker thread. | None |
| Query uptime, scan count, signals generated, and execution stats. | None |
| Dispatch test notification to Telegram / Webhook channels. |
|
| Custom Telegram Message: Send any freeform text, trade alert, or daily summary to Telegram. |
|
| Telegram Chart Sender: Send generated candlestick chart images (.png) directly to Telegram with trade plan captions. |
|
๐ก๏ธ Trading Credit Score (Risk Governance)
Tool Name | Description | Parameters |
| Initialize or configure credit score and reference portfolio balance (persisted to SQLite). |
|
| Retrieve current score, tier, lot multiplier, and streak counters. | None |
| Deduct points upon SL hit with automatic losing streak penalty (saved to SQLite). |
|
| Recover points upon TP hit (50% of deduction rate). |
|
| Reset score to initial maximum capacity. | None |
| Manually override score value for manual risk calibration. |
|
| Audit log of score modifications, penalties, and recoveries from SQLite. |
|
๐พ Persistent Database (SQLite Storage)
Tool Name | Description | Parameters |
| Journal Diary Entry: Attach user/AI reflections, strategy tags, and PnL notes to a trade ticket. |
|
| Query Journal Notes: Retrieve persistent trade journal notes filtered by symbol or ticket. |
|
| Signal Audit Trail: Retrieve historical bot signals, triggers, and execution statuses. |
|
| Backtest Library: Query archived historical backtest runs, win rates, and profit factors. |
|
| Database Health: View SQLite database size, file path, and record counts across all tables. | None |
๐ง AI Memory & Order Recall Suite
Tool Name | Description | Parameters |
| Past Setup Memory: Recall past similar trades, historical Win Rate %, average profit, and AI lessons learned. |
|
| Safety Reflection: Recall recent losing trades and AI reflections to serve as a pre-trade checklist. |
|
| Strategy Leaderboard: Aggregate and rank historical strategies by Win Rate % and expectancy. |
|
| Emergency Undo Button: Immediately close/recall the most recently opened market position (within N seconds) to reverse mistakes. |
|
| Emergency Revocation: Instantly revoke and cancel all active pending limit and stop orders in 1 click. |
|
โ๏ธ Dynamic Configuration & Key Setup
Tool Name | Description | Parameters |
| Inspect Settings: View current runtime configuration settings, Telegram credentials, and safety limits (masked for security). |
|
| Dynamic Setup: Configure Telegram Bot Token, Chat ID, Webhooks, Max Lot Size, and Risk Limits directly via MCP without server restart. |
|
๐ Polymarket Prediction Market Suite (Live Mainnet)
Tool Name | Description | Parameters |
| Market Discovery: Search and discover Polymarket event prediction markets, odds, volume, and outcome tokens. |
|
| Live Orderbook: Retrieve live Level 2 bid/ask orderbook and spread for a specific outcome token. |
|
| Portfolio & Positions: Query active open positions and total portfolio value for a given wallet address. |
|
| Trade Audit: Query on-chain closed trade history and executed fills on Polymarket. |
|
| Live Order Execution: Place real live limit prediction orders directly on Polymarket CLOB Mainnet using your wallet Private Key. |
|
| Cancel Live Order: Cancel an active open limit order on Polymarket CLOB Mainnet. |
|
2. Resources (Read-Only State)
Read-only context URIs accessible by LLMs to inject situational awareness into conversation contexts:
URI | Content Schema | Description |
|
| Real-time equity, balance, margin levels, and terminal status. |
|
| Active position tickets, floating profit, and entry pricing. |
|
| Safety thresholds, max lot size, and default parameters. |
|
| Credit score tier, active lot multiplier, and streak metrics. |
3. Prompts (Pre-Built Workflows)
Interactive prompt workflows registered on the MCP server:
daily_market_briefing: Synthesizes account health, credit score tier, multi-timeframe technical momentum (H1/M15), and SMC structural zones into an actionable daily briefing.smc_trade_setup: Evaluates Premium/Discount pricing, unmitigated FVGs/OBs, calculates risk-weighted lot sizing adhering to current score tier rules, and prepares entry plans.
๐ก๏ธ Trading Credit Score Engine (v4.0)
The Trading Credit Score system prevents catastrophic drawdown through dynamic risk scaling and autonomous circuit breaking.
Tier Classifications
100% โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ข GREEN TIER (70% - 100%) โ โ Standard Trading (100% Lot Size)
70% โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ก YELLOW TIER (50% - 70%) โ โ Cautious Mode (50% Lot Size)
50% โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ ORANGE TIER (30% - 50%) โ โ Warning Mode (25% Lot Size + Alerts)
30% โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ด CRITICAL TIER (< 30%) โ โ CIRCUIT BREAKER (Trading Blocked)
0% โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโMathematical Model
Deduction Formula (SL Hit)
$$\Delta \text{Score}{\text{deduct}} = \left( \frac{\text{Loss}{\text{USD}}}{\text{Balance}{\text{ref}}} \times \text{Multiplier}{\text{base}} \right) \times \text{StreakMultiplier}$$
$$\text{StreakMultiplier} = \begin{cases} 1.0 & \text{if Streak} \le 2 \ 1.5 & \text{if } 3 \le \text{Streak} \le 4 \ 2.0 & \text{if Streak} \ge 5 \end{cases}$$
Recovery Formula (TP Hit)
$$\Delta \text{Score}{\text{recover}} = \left( \frac{\text{Profit}{\text{USD}}}{\text{Balance}{\text{ref}}} \times \text{Multiplier}{\text{base}} \right) \times \text{RecoveryRate} \quad (\text{Default: } 0.50)$$
Score recovery occurs at 50% velocity relative to penalties to encourage disciplined risk management.
๐ง Smart Money Concepts (SMC) Analyzer
The built-in SMC engine calculates institutional market structure directly from OHLCV arrays:
Swing Highs / Lows: Multi-bar fractal pivot identification.
Break of Structure (BOS): Continuation signals validated by candle body closes.
Change of Character (CHoCH): Early trend reversal identification.
Fair Value Gaps (FVG): 3-candle imbalance zones tracked for mitigation state.
Order Blocks (OB): High-volume institutional origin candles.
Premium vs. Discount Zones: Equilibrium calculations based on dealing ranges.
Optimal Trade Entry (OTE): Fibonacci retracement zones (61.8%, 70.5%, 78.6%).
๐ค Autonomous Trading Agent
The autonomous agent runs on a non-blocking background thread (daemon=True) to perform continuous market scanning:
sequenceDiagram
autonumber
participant Agent as Autonomous Agent
participant Score as Credit Score Engine
participant MT5 as MetaTrader 5
participant SMC as SMC Analyzer
participant Risk as Risk Calculator
participant Telegram as Telegram / Webhook
loop Every Scan Interval (e.g. 15s)
Agent->>MT5: Manage Active Positions (Auto-BE / Trailing Stop)
Agent->>MT5: Poll Closed Deals History
alt Closed Deal Found
Agent->>Score: Update Points (Deduct SL / Recover TP)
end
Agent->>Score: Check is_trading_allowed()
alt Score is CRITICAL (<30%)
Agent->>Agent: Suppress Execution (Signal-Only Mode)
else Score is Valid
Agent->>MT5: Fetch Latest OHLCV Data
Agent->>SMC: Evaluate Market Structure & FVGs
alt Valid Setup Detected
Agent->>Risk: Calculate Base Lot Size (Risk %)
Risk->>Score: Fetch Tier Lot Multiplier (1.0 / 0.5 / 0.25)
Agent->>Telegram: Dispatch Instant Signal Alert
alt auto_trade == True
Agent->>MT5: Execute Market Order
end
end
end
end๐ Installation & Quickstart Guide
โก 5-Minute Quickstart (Windows PowerShell)
# 1. Clone the repository
git clone https://github.com/JonusNattapong/popmely.git
cd popmely
# 2. Create and activate virtual environment
python -m venv .venv
.venv\Scripts\activate
# 3. Install dependencies and package
pip install -e .
# 4. Copy environment configuration
Copy-Item .env.example .env
# 5. Verify installation
python -c "import popmely; print(f'๐ popmely v{popmely.__version__} is ready!')"๐ฅ๏ธ Step 1: MetaTrader 5 Terminal Configuration
Open your MetaTrader 5 terminal.
Log into your Demo or Live trading account.
Enable Automated Trading:
Go to top menu:
Tools>Options(or pressCtrl + O).Select the
Expert Advisorstab.โ Check "Allow Algo Trading".
โ Check "Allow WebRequest for listed URL" (if using Webhooks).
Click OK.
๐ฑ Step 2: Telegram Push Notification Setup (Optional)
To receive real-time signal alerts and credit score warnings:
Open Telegram and search for
@BotFather.Send
/newbotand follow the prompts to create your bot $\rightarrow$ copy theTELEGRAM_BOT_TOKEN.Search for
@userinfobot$\rightarrow$ start it to get your personalTELEGRAM_CHAT_ID.Edit your
.envfile:TELEGRAM_BOT_TOKEN=123456789:ABCdefGhIJKlmNoPQRstuvWxyz TELEGRAM_CHAT_ID=987654321Test your alert:
python -c "from popmely.agent.notifier import notifier; notifier.send_alert('๐ popmely alert is working!')"
โ๏ธ Client Configuration
Claude Desktop (claude_desktop_config.json)
Add popmely to your Claude Desktop configuration located at %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"popmely": {
"command": "python",
"args": [
"-m",
"popmely"
],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}Google Antigravity / Cursor IDE (mcp.json)
{
"mcpServers": {
"popmely": {
"command": "python",
"args": [
"d:\\Projects\\Github\\popmely\\src\\popmely\\server.py"
],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}Direct CLI Invocation
# Standard stdio MCP mode
python -m popmely
# FastMCP SSE Transport mode
python -m popmely --transport sse --host 127.0.0.1 --port 8000๐บ Live Streaming Trading Dashboard & Console
Run the interactive live terminal console to monitor real-time prices, SMC structure, Credit Score meter, and bot executions on your screen:
# Monitor XAUUSD in real-time (auto-refreshes every 2 seconds)
python -m popmely.live --symbol XAUUSD --interval 2
# Monitor BTCUSD with autonomous auto-trading execution enabled
python -m popmely.live --symbol BTCUSD --interval 1 --auto-trade==================================================================================
๐ POPMELY LIVE STREAMING TRADING TERMINAL v5.0.0 | 2026-08-16 17:15:00
๐ MT5 Account: #110491916 (MetaQuotes-Demo) | Terminal: CONNECTED
==================================================================================
๐ฐ Balance: $100,000.00 | Equity: $100,000.00 | Floating PnL: $0.00
๐ Margin Used: $0.00 | Free Margin: $100,000.00 | Margin Level: 0.0%
----------------------------------------------------------------------------------
๐ก๏ธ Trading Credit Score : [โโโโโโโโโโโโโโโโโโโโ] 100.0% ๐ข GREEN (100% Lot)
Streak Counters : Win Streak: 2 | Loss Streak: 0 | SQLite: PERSISTENT
----------------------------------------------------------------------------------
๐ Ticker (XAUUSD) : Bid: 4376.00 | Ask: 4376.20 | Spread: 20 pts
๐๏ธ Confluence Matrix : STRONG_BUY (Bullish: 85% | Bearish: 15%)
๐ฐ Economic News Status : ๐ข CLEAR (No High-Impact News)
----------------------------------------------------------------------------------
๐ Active Positions (1 Open):
#1234567 XAUUSD BUY 0.10 4375.50 4376.00 +$50.00
----------------------------------------------------------------------------------
๐ก Live Stream Event Feed:
[17:15:00] ๐ Live Streaming Terminal Initialized.
[17:15:02] ๐ฏ Institutional Confluence 85% detected on XAUUSD M15.
[17:15:04] โก Order executed: BUY 0.10 XAUUSD @ 4375.50 (Ticket #1234567).
==================================================================================๐ Web Data Dashboard (Browser)
A local, read-only web dashboard over the persistent SQLite database โ Credit Score trajectory, bot signal performance, trade journal, and backtest archive in one page. It holds no MT5 connection and issues SELECT statements only, so it is safe to leave open while the bot trades.
# Start on http://127.0.0.1:8787 (opens your browser)
python -m popmely.dashboard
# Custom port, no browser popup, alternate database file
popmely-dashboard --port 9000 --no-browser --db ~/.popmely/popmely.dbSection | What it shows |
Hero + meter | Current Credit Score, tier, lot-size multiplier, and the tier bands |
KPI row | Win/loss streaks, signals logged, signal win rate, journaled P&L, avg confluence, backtest count |
Credit score trajectory | Score after every recorded event, with hover detail and a table view |
Signals by strategy | Signal volume per strategy, with execution and outcome detail on hover |
Tables | Recent signals, trade journal notes, backtest archive, full score event log |
Built on the Python standard library โ no extra dependencies, no CDN, works offline. It reads ~/.popmely/popmely.db; if that file does not exist yet, the page renders an empty state rather than failing. Use --host 0.0.0.0 only on a trusted network: the dashboard has no authentication.
๐ง Configuration Parameters
Create a .env file in the project root to override default settings:
# Optional: Auto-login credentials (Leave blank to use active MT5 terminal session)
MT5_ACCOUNT=
MT5_PASSWORD=
MT5_SERVER=
MT5_PATH=
# Trading Defaults
DEFAULT_SYMBOL=XAUUSD
DEFAULT_MAGIC=112233
DEFAULT_DEVIATION=20
MAX_SLIPPAGE_POINTS=50
# Safety Controls
MAX_LOT_SIZE=1.0
MAX_DAILY_DRAWDOWN_PERCENT=5.0
REQUIRE_SL=false
# Push Notifications
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
WEBHOOK_URL=https://your-webhook-endpoint.com/api๐ Project Evolution Journey
The evolution of popmely from a basic MT5 bridge to an institutional AI trading server:
v1.0.0 (Core Bridge) โโโบ v2.0.0 (SMC & Backtest) โโโบ v3.1.0 (Autonomous Bot) โโโบ v4.0.0 (Credit Score) โโโบ v4.5.0 (ICT Strategies) โโโบ v5.0.0 (SQLite Database)Milestone | Version | Release Highlights | Key Tools Added |
The Genesis Bridge |
| Initial bridge between MT5 terminal and AI models via MCP protocol. | Account Info, Quote Feed, Place/Close Order |
SMC & Quantitative Engine |
| Introduced Smart Money Concepts analyzer and bar-by-bar backtest simulation. | BOS, CHoCH, OB, FVG, Backtest Engine |
Autonomous AI & Protocol |
| Standardized to FastMCP, background autonomous scanning worker, and Telegram alerts. | Agent Worker, Auto-BE, Trailing Stop, Telegram Notifier |
Trading Credit Score |
| Adaptive risk governance engine that scales lot sizes and halts trading on drawdown. | Credit Score Tiers (GREEN/YELLOW/ORANGE/CRITICAL) |
Institutional Mastery |
| Institutional ICT strategies, Smart entry orders, Selective position closing, and Date range queries. | Silver Bullet, Judas Swing, IFVG, Confluence, Trade Journal |
SQLite Persistence & DB |
| Embedded SQLite database engine with state persistence, trade notes diary, signal audit trails, and backtest archives. | DB Add Note, Query Notes, Signals Log, Backtest Archive, DB Stats (50 Tools) |
๐งช Development & Testing
Run unit and integration test suites:
# Run test suite
python -m unittest discover -s tests
# Direct module verification
python -c "import popmely; print(f'Loaded popmely v{popmely.__version__}')"โ ๏ธ Risk Disclaimer
IMPORTANT: Trading foreign exchange, commodities, cryptocurrencies, and CFDs carries a high level of risk and may not be suitable for all investors. High leverage can work against you as well as for you.
This software is provided for research, educational, and workflow automation purposes. Always test all strategies extensively on Demo Accounts before deploying real capital. The author and contributors accept no responsibility for financial losses incurred through the use of this software.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Maintained with โค๏ธ by JonusNattapong.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- MIT
- Alicense-qualityCmaintenanceA local-first MCP server that bridges AI coding agents with MetaTrader 5 for inspection, market data, MQL5 development, compiling, Strategy Tester review, workspace sync, logs, audit trails, demo trading, and carefully gated live trading.MIT
- Flicense-qualityBmaintenanceUniversal MCP server that enables AI assistants to control MetaTrader 5 directly, executing trades, managing data, and automating MT5 operations through natural language.2
Related MCP Connectors
MCP server for Gainium โ manage trading bots, deals, and balances via AI assistants
HiveCapital MCP Server โ autonomous investment layer for AI agents
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/JonusNattapong/popmely'
If you have feedback or need assistance with the MCP directory API, please join our Discord server