Q
Qoyyuum/mcp-metatrader5-server
Market data and trading actions in MetaTrader 5
在 GitHub 查看 ↗链接已于 2026-11-12 核查 · HTTP 200 · 打开的是厂商自己的官网
安装与配置
- 复制上面的命令
- 粘成
claude_desktop_config.json里mcpServers的一项(本地服务器用 command + args,示例见 客户端接法) - 重启客户端
客户端配置(取自该仓库的安装命令)
{
"mcpServers": {
"qoyyuum-mcp-metatrader5-server": {
"command": "uvx",
"args": ["--from", "mcp-metatrader5-server", "mt5mcp"]
}
}
}解析自我们于 2026-11-06 抓取的该仓库 README;我们未执行过。
command/args 来自仓库写明的安装命令;不确定时请以该项目 README 为准。
VS Code(.vscode/mcp.json —— 键名是 servers)
{
"servers": {
"qoyyuum-mcp-metatrader5-server": {
"command": "uvx",
"args": ["--from", "mcp-metatrader5-server", "mt5mcp"]
}
}
}VS Code 顶层键是 <code>servers</code>,其余与上面那份相同。
Claude Code(命令行)
claude mcp add --transport stdio qoyyuum-mcp-metatrader5-server -- uvx --from mcp-metatrader5-server mt5mcp
Claude Code 不收 JSON 文件,用这条命令直接加。
配置项的键名以你的客户端为准:客户端与 CLI
- 来源明细
- 收录自 abordage/awesome-mcp 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
- 收录与活跃
- 收录于 2026-11-05 · 最近见到 2026-11-14 · 共见到 10 次 · 被 10 个来源列出
- 评分构成
- 综合分 1,003 · 10 个来源 · mcp
- 安装
uvx --from mcp-metatrader5-server mt5mcp
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是
uvx --from mcp-metatrader5-server mt5mcp。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
我们收录于 2026-11-05;最近见到 2026-11-14。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
# MetaTrader 5 MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol (MCP) server for MetaTrader 5, allowing AI assistants to interact with the MetaTrader 5 platform for trading and market data analysis. Documentation
## Features
Connect to MetaTrader 5 terminal
Access market data (symbols, rates, ticks)
Place and manage trades
Analyze trading history
Integrate with AI assistants through the Model Context Protocol
## Installation
### From PyPI
bash
uvx --from mcp-metatrader5-server mt5mcp
### From Source
bash
git clone https://github.com/Qoyyuum/mcp-metatrader5-server.git
cd mcp-metatrader5-server
uv sync
uv run mt5mcp
## Requirements
uv (recommended) or pip
Python 3.11 or higher
MetaTrader 5 terminal installed on Windows
MetaTrader 5 account (demo or real)
## Usage
### Quick Start
The server runs in stdio mode by default for MCP clients like Claude Desktop:
bash
uv run mt5mcp
### Development Mode (HTTP)
For testing with HTTP transport, create a .env file:
env
MT5MCPTRANSPORT=http
MT5MCPHOST=127.0.0.1
MT5MCPPORT=8000
Then run:
bash
uv run mt5mcp
The server will start at http://127.0.0.1:8000
### Installing for MCP Clients
#### Method 1: Using uvx (Simplest - No Installation Required) ⭐
Add this configuration to your MCP client's config file:
For Claude Desktop (claudedesktopconfig.json):
json
"mcpServers": {
"mcp-metatrader5-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Qoyyuum/mcp-metatrader5-server",
"mt5mcp"
#### Method 2: Using FastMCP Install (Recommended)
bash
git clone https://github.com/Qoyyuum/mcp-metatrader5-server
cd mcp-metatrader5-server
After git cloning the repo, run the following commands:
For MCP JSON format
bash
uv run fastmcp install mcp-json src/mcpmt5/main.py
For Claude Desktop
bash
uv run fastmcp install claude-desktop src/mcpmt5/main.py
For Claude Code
bash
uv run fastmcp install claude-code src/mcpmt5/main.py
For Cursor
bash
uv run fastmcp install cursor src/mcpmt5/main.py
For Gemini CLI
bash
uv run fastmcp install gemini-cli src/mcpmt5/main.py
#### Method 3: Manual Configuration
Add this to your claudedesktopconfig.json or whatever LLM config file:
json
"mcpServers": {
"mcp-metatrader5-server": {
"command": "uvx",
"args": [
"--from",
"mcp-metatrader5-server",
"mt5mcp"
],
"env": {
"MT5PATH": "C:\\Program Files\\MetaTrader 5\\terminal64.exe",
"MT5LOGIN": " ",
"MT5PASSWORD": " ",
"MT5SERVER": " "
The env block is optional. When it is set, initialize() and login() can be
called without arguments and the agent never needs to see or ask for your
credentials. Explicit arguments still take precedence. MT5USERNAME is
accepted as an alias for MT5LOGIN.
> Security: with credentials in the env block, the config file holds a
> secret. Keep it out of git, shared backups and shared or synced folders.
## API Reference
### Connection Management
initialize(): Initialize the MT5 terminal
login(account, password, server): Log in to a trading account
shutdown(): Close the connection to the MT5 terminal
### Market Data Functions
getsymbols(): Get all available symbols
getsymbolsbygroup(group): Get symbols by group
getsymbolinfo(symbol): Get information about a specific symbol
getsymbolinfotick(symbol): Get the latest tick for a symbol
copyratesfrompos(symbol, timeframe, startpos, count): Get bars from a specific position
## Features
Connect to MetaTrader 5 terminal
Access market data (symbols, rates, ticks)
Place and manage trades
Analyze trading history
Integrate with AI assistants through the Model Context Protocol
## Installation
### From PyPI
bash
uvx --from mcp-metatrader5-server mt5mcp
### From Source
bash
git clone https://github.com/Qoyyuum/mcp-metatrader5-server.git
cd mcp-metatrader5-server
uv sync
uv run mt5mcp
## Requirements
uv (recommended) or pip
Python 3.11 or higher
MetaTrader 5 terminal installed on Windows
MetaTrader 5 account (demo or real)
## Usage
### Quick Start
The server runs in stdio mode by default for MCP clients like Claude Desktop:
bash
uv run mt5mcp
### Development Mode (HTTP)
For testing with HTTP transport, create a .env file:
env
MT5MCPTRANSPORT=http
MT5MCPHOST=127.0.0.1
MT5MCPPORT=8000
Then run:
bash
uv run mt5mcp
The server will start at http://127.0.0.1:8000
### Installing for MCP Clients
#### Method 1: Using uvx (Simplest - No Installation Required) ⭐
Add this configuration to your MCP client's config file:
For Claude Desktop (claudedesktopconfig.json):
json
"mcpServers": {
"mcp-metatrader5-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Qoyyuum/mcp-metatrader5-server",
"mt5mcp"
#### Method 2: Using FastMCP Install (Recommended)
bash
git clone https://github.com/Qoyyuum/mcp-metatrader5-server
cd mcp-metatrader5-server
After git cloning the repo, run the following commands:
For MCP JSON format
bash
uv run fastmcp install mcp-json src/mcpmt5/main.py
For Claude Desktop
bash
uv run fastmcp install claude-desktop src/mcpmt5/main.py
For Claude Code
bash
uv run fastmcp install claude-code src/mcpmt5/main.py
For Cursor
bash
uv run fastmcp install cursor src/mcpmt5/main.py
For Gemini CLI
bash
uv run fastmcp install gemini-cli src/mcpmt5/main.py
#### Method 3: Manual Configuration
Add this to your claudedesktopconfig.json or whatever LLM config file:
json
"mcpServers": {
"mcp-metatrader5-server": {
"command": "uvx",
"args": [
"--from",
"mcp-metatrader5-server",
"mt5mcp"
],
"env": {
"MT5PATH": "C:\\Program Files\\MetaTrader 5\\terminal64.exe",
"MT5LOGIN": " ",
"MT5PASSWORD": " ",
"MT5SERVER": " "
The env block is optional. When it is set, initialize() and login() can be
called without arguments and the agent never needs to see or ask for your
credentials. Explicit arguments still take precedence. MT5USERNAME is
accepted as an alias for MT5LOGIN.
> Security: with credentials in the env block, the config file holds a
> secret. Keep it out of git, shared backups and shared or synced folders.
## API Reference
### Connection Management
initialize(): Initialize the MT5 terminal
login(account, password, server): Log in to a trading account
shutdown(): Close the connection to the MT5 terminal
### Market Data Functions
getsymbols(): Get all available symbols
getsymbolsbygroup(group): Get symbols by group
getsymbolinfo(symbol): Get information about a specific symbol
getsymbolinfotick(symbol): Get the latest tick for a symbol
copyratesfrompos(symbol, timeframe, startpos, count): Get bars from a specific position
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/qoyyuum-mcp-metatrader5-server/)
- 来源
- awesome · https://github.com/Qoyyuum/mcp-metatrader5-server
- 按领域浏览
- MCP 服务
- 收录来源
- 10 个独立来源
- 收录于
- 今天
同类推荐
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。