{
"mcpServers": {
"futu-stock": {
"env": {
"FUTU_HOST": "127.0.0.1",
"FUTU_PORT": "11111",
"FUTU_TRADE_ENV": "SIMULATE",
"FUTU_TRD_MARKET": "HK",
"FUTU_SECURITY_FIRM": "FUTUSECURITIES",
"FUTU_ENABLE_TRADING": "0",
"FUTU_ENABLE_POSITIONS": "1"
},
"command": "futu-mcp-server"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
基于模型上下文协议(MCP)的富途证券行情交易接口服务器。将富途OpenAPI功能以标准化的MCP协议提供给AI模型使用,支持行情订阅、数据查询等功能。
Is it safe?
No known CVEs for ruff.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 10 days ago. 61 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'ruff' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
No known vulnerabilities.
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Futu Stock Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
基于模型上下文协议(MCP)的富途证券行情交易接口服务器。将富途OpenAPI功能以标准化的MCP协议提供给AI模型使用,支持行情订阅、数据查询等功能。
在使用本项目之前,您需要:
.env文件已添加到.gitignore中本项目是一个开源工具,旨在简化富途OpenAPI的接入流程。使用本项目时请注意:
# 安装 pipx(如果还没有安装)
brew install pipx # macOS
# 或者 pip install --user pipx # 其他系统
# 安装包
pipx install futu-stock-mcp-server
# 运行服务器
futu-mcp-server
为什么使用 pipx?
- pipx 专门用于安装 Python 应用程序到全局环境
- 自动管理独立的虚拟环境,避免依赖冲突
- 命令直接可用,无需激活虚拟环境
# 拉取镜像
docker pull your-registry/futu-stock-mcp-server:latest
# 运行容器
docker run -d \
--name futu-mcp-server \
-p 8000:8000 \
-e FUTU_HOST=127.0.0.1 \
-e FUTU_PORT=11111 \
your-registry/futu-stock-mcp-server:latest
git clone https://github.com/yourusername/futu-stock-mcp-server.git
cd futu-stock-mcp-server
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Create virtual environment
uv venv
# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
# Install in editable mode
uv pip install -e .
export FUTU_HOST=127.0.0.1
export FUTU_PORT=11111
推荐方式:在 MCP 客户端配置文件中使用
env字段注入,无需创建.env文件,见下方 MCP Server 配置 章节。
Add new dependencies to pyproject.toml:
[project]
dependencies = [
# ... existing dependencies ...
"new-package>=1.0.0",
]
Then update your environment:
uv pip install -e .
This project uses Ruff for code linting and formatting. The configuration is in pyproject.toml:
[tool.ruff]
line-length = 100
target-version = "py38"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "B", "UP"]
Run linting:
uv pip install ruff
ruff check .
Run formatting:
ruff format .
找到配置文件位置:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json添加服务器配置(所有参数均通过 env 字段注入,无需 .env 文件):
{
"mcpServers": {
"futu-stock": {
"command": "futu-mcp-server",
"env": {
"FUTU_HOST": "127.0.0.1",
"FUTU_PORT": "11111",
"FUTU_ENABLE_POSITIONS": "1",
"FUTU_ENABLE_TRADING": "0",
"FUTU_TRADE_ENV": "SIMULATE",
"FUTU_SECURITY_FIRM": "FUTUSECURITIES",
"FUTU_TRD_MARKET": "HK"
}
}
}
}
python 命令启动(适用于源码开发场景):{
"mcpServers": {
"
... [View full README on GitHub](https://github.com/shuizhengqi1/futu-stock-mcp-server#readme)