{"id":50312510,"url":"https://github.com/5queezer/mcp-tradingagents","last_synced_at":"2026-05-28T22:01:53.626Z","repository":{"id":352280518,"uuid":"1214473203","full_name":"5queezer/mcp-tradingagents","owner":"5queezer","description":"MCP server exposing TradingAgents as tools with self-contained OAuth 2.1 PKCE, deploys to Cloud Run","archived":false,"fork":false,"pushed_at":"2026-04-18T18:53:01.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-18T20:33:58.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5queezer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-18T16:16:08.000Z","updated_at":"2026-04-18T18:53:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/5queezer/mcp-tradingagents","commit_stats":null,"previous_names":["5queezer/mcp-tradingagents"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/5queezer/mcp-tradingagents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5queezer%2Fmcp-tradingagents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5queezer%2Fmcp-tradingagents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5queezer%2Fmcp-tradingagents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5queezer%2Fmcp-tradingagents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5queezer","download_url":"https://codeload.github.com/5queezer/mcp-tradingagents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5queezer%2Fmcp-tradingagents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33627948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-28T22:01:51.929Z","updated_at":"2026-05-28T22:01:53.587Z","avatar_url":"https://github.com/5queezer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcp-tradingagents\n\nMCP server exposing [TradingAgents](https://github.com/TauricResearch/TradingAgents) as tools, with self-contained OAuth 2.1 PKCE (via [mcp-oauth-template](https://github.com/5queezer/mcp-oauth-template)) and a Redis-backed job queue. Deploys to Cloud Run in one command.\n\n## Tools\n\n**Sync data (fast):**\n- `get_stock_data`, `get_indicators`, `get_fundamentals`\n- `get_balance_sheet`, `get_cashflow`, `get_income_statement`\n- `get_news`, `get_global_news(..., query=…)`, `get_insider_transactions`\n\n**Async full-graph analysis (3–10 min, Redis-backed):**\n- `start_analysis(ticker, date, …)` → `{job_id}`\n- `get_analysis_status(job_id)` → structured progress (phase, active_model, llm_errors, …)\n- `get_analysis_result(job_id)`\n- `list_analyses`, `cancel_analysis`, `reflect_and_remember`\n\n## Architecture\n\n```\nclaude.ai ──OAuth──▶ /authorize, /token\n          ──MCP ──▶ /mcp ──▶ sync tools             (route_to_vendor)\n                         └▶ start_analysis ──▶ Redis (job=queued)\n                                           ──▶ Cloud Tasks ──▶ /internal/run-job\n                                              (or asyncio fire-and-forget for dev)\n                         └▶ get_analysis_status     ──▶ reads Redis\n```\n\nWorker (`worker.run_job`) streams LangGraph in `stream_mode=\"updates\"`, writes progress to Redis after each node, and captures `on_llm_start` / `on_llm_error` callbacks for rate-limit visibility. TradingAgents' `FallbackChatModel` (in the upstream fork) retries with fallback models on rate-limit / API errors.\n\n## Environment\n\nRequired:\n\n| var                  | purpose                                              |\n|----------------------|------------------------------------------------------|\n| `BASE_URL`           | public service URL (deploy.sh sets automatically)    |\n| `ADMIN_PASSWORD`     | OAuth login                                          |\n| `WORKER_SECRET`      | shared secret: Cloud Tasks → `/internal/run-job`     |\n| `REDIS_URL`          | `rediss://default:TOKEN@HOST:PORT` (Upstash etc.)    |\n| `OPENROUTER_API_KEY` | LLM provider                                         |\n\nTunable:\n\n| var                               | default                    |\n|-----------------------------------|----------------------------|\n| `TRADINGAGENTS_LLM_PROVIDER`      | `openrouter`               |\n| `TRADINGAGENTS_DEEP_THINK_LLM`    | `deepseek/deepseek-chat`   |\n| `TRADINGAGENTS_QUICK_THINK_LLM`   | `deepseek/deepseek-chat`   |\n| `TRADINGAGENTS_FALLBACK_MODELS`   | elephant-alpha, glm-air, … |\n| `TRADINGAGENTS_MAX_DEBATE_ROUNDS` | `1`                        |\n| `TRADINGAGENTS_LLM_MAX_RETRIES`   | `6`                        |\n\nCloud Tasks (optional — when set, `start_analysis` enqueues instead of running in-process):\n\n- `CLOUD_TASKS_QUEUE`, `CLOUD_TASKS_LOCATION`, `CLOUD_TASKS_PROJECT`\n- `CLOUD_TASKS_SERVICE_ACCOUNT` (for OIDC; otherwise `WORKER_SECRET` header is used)\n\n## Deploy\n\n```bash\nsource ~/.secrets.d/openrouter\nexport REDIS_URL='rediss://default:TOKEN@XXX.upstash.io:6379'\nexport ADMIN_PASSWORD='…'\nexport WORKER_SECRET=\"$(openssl rand -hex 32)\"\n\n./deploy.sh tradingagents-mcp europe-west3\n```\n\nClaude.ai connector URL:\n\n```\nhttps://tradingagents-mcp-\u003chash\u003e.run.app/mcp\n```\n\n## Files\n\n```\ntradingagents_server.py   FastMCP instance + tools + /internal/run-job + create_app\nworker.py                 LangGraph analysis runner + Redis progress callback\njobs.py                   Redis helpers\nmcp_server/               mcp-oauth-template, + RedisTokenStore/ClientStore\nDockerfile                python:3.12-slim + git + uvicorn\ndeploy.sh                 gcloud run deploy wrapper\n```\n\n## License\n\nMIT (inherited from mcp-oauth-template).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5queezer%2Fmcp-tradingagents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5queezer%2Fmcp-tradingagents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5queezer%2Fmcp-tradingagents/lists"}