stocktraders-mcp
Officialstocktraders-mcp
并行运行,与旧的 chatbotgpt/chatbotgpt 完全独立——不共享代码、不共享数据库、不碰正在运行的系统。
安装
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r requirements.txt
copy .env.example .env # rồi điền BYOK_ENCRYPTION_KEYRelated MCP server: Rozkoduj MCP
运行回归测试(在 core/ 中有任何改动之前必须运行)
python tests/regression_cases.py运行 MCP 服务器(供 Claude Desktop / ChatGPT / Cursor 连接)
# stdio (Claude Desktop, MCP inspector)
python -m mcp_server.server
# HTTP (client từ xa)
python -m mcp_server.server --http --port 8100运行 BYOK Web 应用
uvicorn webapp.main:app --port 8000流程:
POST /auth/key {"user_id": "...", "openai_api_key": "sk-..."}— 用户自行保存各自的 key。POST /chat {"user_id": "...", "message": "..."}— 使用刚保存的 key,不碰公司 key。没有 key → 400,不会静默回退到公共 key。
架构
详细内容见 core/*.py 文件开头的 docstring — 每个文件都写明它替代旧系统的哪个组件以及原因。
core/— 工具注册表 + 执行器(从旧代码 1:1 移植)+ 格式化器(数据精确)+ 知识库(嵌入到工具描述中的指南)+ context_state(多轮日期/代码的携带转发,已泛化)。mcp_server/— 真正的 MCP 服务器,向外部 AI 客户端暴露core/。webapp/— BYOK Web 聊天,与 MCP 服务器共用core/(确保不出现偏差)。
已验证
tests/regression_cases.py:24/24 通过 — 工具注册表齐全(29 个工具),指南嵌入正确,上下文携带转发正确(今天在旧系统修复的 bug 用例),数据格式化器精确。MCP 服务器:通过 MCP 协议真实往返(内存客户端/服务器)— 列出 30 个工具(29 + searchCaseIdeas),
getAnalyzeWave带有正确的指南“大浪还是回调浪”。Web 应用:运行真实 uvicorn,测试
/health、/auth/key、/auth/key/status、/chat(未设置 key 时正确拒绝)。
尚未完成(需要真实的 OpenAI key + 实际时间来验证)
通过 Claude Desktop/MCP inspector 使用原始规则文档中的 11 个用例测试真实对话。
在 Web 应用中使用真实的 OpenAI key 测试真实对话,并逐句与旧版本对照。
部署到 VPS(当前生产环境是
chatbotgpt/chatbotgpt,该项目尚未部署到任何地方)。迁移旧的 case_ideas(故意不自动执行 — 参见计划)。
This server cannot be deployed
Maintenance
Related MCP Connectors
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Provide AI assistants with real-time access to official SEC EDGAR filings and financial data. Enab…
Trade 16 crypto exchanges + MetaTrader 5 from your AI assistant via one MCP connection.
Market analyst tools + AI agent: crypto, US equities, options, Korea, fundamentals, macro, backtests
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables natural language trading operations for stocks, options, crypto, and portfolio management via Alpaca's Trading API through AI assistants.MIT

Rozkoduj MCPofficial
AlicenseAqualityBmaintenanceProvides AI assistants with market screening, analysis, and scoring across stocks, crypto, and forex, enabling natural language queries for trading insights.4MIT- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to trade stocks directly through natural language by creating and managing bots, executing trades, accessing market data, and backtesting strategies.4MIT
- AlicenseNot gradedqualityCmaintenanceConnects a brokerage account to AI assistants, enabling portfolio queries, order management, and market data access through natural language.MIT