stocktraders-mcp
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
stocktraders-mcp
In parallel, completely independent from the old chatbotgpt/chatbotgpt — no shared code, no shared DB, no touching the running system.
Installation
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
Run regression tests (mandatory before changing anything in core/)
python tests/regression_cases.pyRun MCP server (for Claude Desktop / ChatGPT / Cursor to connect)
# stdio (Claude Desktop, MCP inspector)
python -m mcp_server.server
# HTTP (client từ xa)
python -m mcp_server.server --http --port 8100Run BYOK web app
uvicorn webapp.main:app --port 8000Flow:
POST /auth/key {"user_id": "...", "openai_api_key": "sk-..."}— users store their own key.POST /chat {"user_id": "...", "message": "..."}— uses the key just saved, doesn't touch the company key.No key → 400, no silent fallback to a shared key.
Architecture
See details in the core/*.py docstring at the top of each file — each file states exactly which component of the old system it replaces and why.
core/— tool registry + executor (1:1 port from the old code) + formatters (accurate numbers) + knowledge (guide embedded in tool description) + context_state (multi-turn carry-forward of date/ticker, generalized).mcp_server/— real MCP server, exposingcore/to external AI clients.webapp/— BYOK web chat, sharingcore/with the MCP server (ensuring no divergence).
Verified
tests/regression_cases.py: 24/24 pass — tool registry has all 29 tools, embedded guide is correct, context carry-forward is correct (the bug case fixed today in the old system), number formatter is accurate.MCP server: real round-trip over the MCP protocol (in-memory client/server) — lists 30 tools (29 + searchCaseIdeas),
getAnalyzeWavecarries the correct guide "big wave or pullback wave".Webapp: real uvicorn run, tested
/health,/auth/key,/auth/key/status,/chat(correctly rejects when no key).
Not done yet (needs a real OpenAI key + real time to verify)
Test real conversations via Claude Desktop/MCP inspector against the 11 cases from the original rule doc.
Test real conversations via the webapp with a real OpenAI key, comparing each sentence against the old version.
Deploy to a VPS (current production is
chatbotgpt/chatbotgpt; this project has not been deployed anywhere yet).Migrate old case_ideas (intentionally not automatic — see plan).
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Stock research for AI assistants: scan US stocks, ETFs and futures, cite SEC filings, save queries.
AI agents backtest, paper trade and live trade via your broker. Free to connect; OAuth.
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.
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
AlicenseAqualityAmaintenanceProvides AI assistants with market screening, analysis, and scoring across stocks, crypto, and forex, enabling natural language queries for trading insights.4MIT- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to trade stocks directly through natural language by creating and managing bots, executing trades, accessing market data, and backtesting strategies.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to connect to a trading journal, analyze performance metrics, identify psychological biases, and receive continuous trading coaching.MIT