HTS MetaTrader5 Trading MCP
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., "@HTS MetaTrader5 Trading MCPget EURUSD daily candles for the last week"
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.
HTS(MetaTrader5) Trading MCP
A Model Context Protocol (MCP) server that connects Claude AI with MetaTrader 5 for forex trading operations and market data analysis.
Features
Market Data
Historical Candles: Retrieve OHLC data for any forex symbol and timeframe
Multi-Timeframe Analysis: Fetch candle data across multiple timeframes simultaneously
Account Information: View trading account details and metrics
Position Tracking: Monitor all open positions
Order Management: Track pending orders
Trading Operations
Order Placement: Create market and pending orders (BUY, SELL, LIMIT, STOP)
Order Modification: Update price levels, SL/TP, and expiration times
Order Cancellation: Cancel pending orders
Position Management: Close positions (full/partial) and modify SL/TP levels
Related MCP server: metatrader-mcp
Architecture
The system consists of two components:
MCP Server (Node.js/TypeScript)
Exposes tools via Model Context Protocol
Manages command queue for EA communication
Provides HTTP API for MT5 integration
MetaTrader 5 EA (MQL5)
Executes trading operations
Retrieves market data
Communicates with MCP server via HTTP
Installation
npm install
npm run buildConfiguration
Create a .env file:
HTTP_PORT=3000Usage
Start the MCP Server
npm startConfigure Claude Desktop
Add to your Claude desktop config:
{
"mcpServers": {
"mcp-server": {
"command": "node",
"args": ["/path/to/trading-mcp/dist/index.js"]
}
}
}Deploy MT5 EA
Copy
ea/info-bot.mq5to your MetaTrader 5ExpertsfolderCompile the EA in MetaEditor
Attach the EA to any chart
Ensure the EA has the correct HTTP endpoint configured
API Tools
Market Data Tools
get_candles- Historical candle data for a symbolget_bulk_candles- Multi-timeframe candle dataget_accounts- All trading accountsget_account- Specific account by numberget_positions- All open positionsget_orders- All pending orders
Trading Tools
open_order- Create new trading ordermodify_order- Update pending ordercancel_order- Cancel pending orderclose_position- Close open positionmodify_position- Update position SL/TPget_command_queue- View pending commandsget_handler_queue- View command results
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
- Flicense-qualityDmaintenanceEnables AI assistants to interact with the MetaTrader 5 trading platform for market data analysis, placing trades, and managing trading positions. Provides comprehensive access to forex and financial market operations through the Model Context Protocol.1
- Alicense-qualityDmaintenanceEnables users to capture real MetaTrader 5 chart snapshots with custom indicators and fetch market data through natural language in Claude Desktop.2MIT
- Alicense-qualityCmaintenanceEnables interaction with MetaTrader 5 for market data, technical analysis, Fibonacci calculations, and trading via MCP clients such as Claude.MIT
- Alicense-qualityAmaintenanceEnables AI assistants to trade on MetaTrader 5 using natural language, supporting account management, order placement, and real-time market data.1MIT
Related MCP Connectors
Connect any MCP client to MetaTrader 4/5 to read prices, manage positions, and place trades.
Trade Robinhood through natural language in Claude Code.
Global stock research, ML forecasts, valuation signals, screeners & portfolio tracking in Claude
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/Yumin-Kim/hts-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server