Thesis
Thesis
面向散户投资者的自托管逐代码研究空间。通过 PWA 分享面板从任何地方捕获内容。该工作区暴露了一个 MCP 服务器,以便您自己的代理(Claude、ChatGPT、Codex CLI)进行综合。单用户 MVP——您的数据保留在您的 Cloudflare 账户中。
研究辅助,而非建议。代理负责撰写;您来做决定。
架构
┌─────────────────────────────────────────────────────────────┐
│ Browser / Mobile │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ PWA (Vite + React + Tailwind) │ │
│ │ - Web Share Target - Workspace tabs │ │
│ │ - Tiptap rich text - Component renderer │ │
│ └────────────────────┬─────────────────────────────────┘ │
└───────────────────────┼─────────────────────────────────────┘
│ /api/* /mcp
┌───────────────────────▼─────────────────────────────────────┐
│ Cloudflare Worker (Hono) │
│ ┌───────────────────────────────┐ ┌──────────────────┐ │
│ │ Workspace Durable Object │ │ WorkspaceAgent │ │
│ │ SQLite + embedding BLOB │ │ DO (Slice 4) │ │
│ │ 30 MCP tools │ │ nightly cron │ │
│ └───────────────────────────────┘ └──────────────────┘ │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ Data providers │ │
│ │ Yahoo Stooq EDGAR Finnhub FRED │ │
│ └───────────────────────────────────────────────────────┘ │
│ ┌──────────────┐ ┌────────────┐ ┌──────────────────────┐ │
│ │ R2 (docs) │ │ KV cache │ │ CF AI Gateway │ │
│ └──────────────┘ └────────────┘ └──────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Future:
┌─────────────────────────┐
│ Auth app (Slice 5) │
│ better-auth + Postgres │
│ Docker → Fly.io │
└─────────────────────────┘Related MCP server: Signal8 MCP Server
快速开始
git clone <repo> && cd invest
npm install
cp apps/worker/.dev.vars.example apps/worker/.dev.vars
# Edit apps/worker/.dev.vars — set THESIS_BEARER_TOKEN, optionally FINNHUB_API_KEY + FRED_API_KEY
# Terminal 1 — worker on :8787
npm run dev:worker
# Terminal 2 — PWA on :5173 (proxies /api and /mcp to :8787)
npm run dev:pwa打开 http://localhost:5173。在 设置 中添加一个 bearer 令牌(使用 .dev.vars 中的值)。
连接代理(BYOA)
GET /api/mcp-info 返回 MCP 端点、工具列表和认证说明。设置页面以可复制的 URL 形式呈现相同信息。
流式 HTTP(首选):
POST /mcp、GET /mcp旧版 SSE:
GET /mcp/sse、POST /mcp/messages认证:
Authorization: Bearer <token>或?token=<token>
环境变量
所有机密都放在 apps/worker/.dev.vars 中用于本地开发。参见 apps/worker/.dev.vars.example。
变量 | 必需 | 说明 |
| 是 | 所有 API + MCP 请求的共享密钥 |
| 可选 | 在 finnhub.io 免费获取 — 启用基本面、收益、新闻 |
| 可选 | 在 fred.stlouisfed.org 免费获取 — 启用宏观图块 |
| 可选 | 2025 年验证码门槛 — 跳过以使用 Yahoo 回退 |
| 切片 4 | 嵌入式代理夜间运行所需 |
| 切片 4 | Cloudflare AI Gateway 令牌 |
| 切片 4 | 您的 CF 账户 ID |
| 可选 | 默认每个工作区每月 200000 个令牌 |
已交付的切片
完整的决策日志和切片历史:docs/roadmap/GRILL-ME.md
切片 | 描述 | 状态 |
W0–W5 | 基础、作者身份、综合、视角、证据、数据 | ✅ |
切片 0 | 稳定化、Stooq 文档、EDGAR 重试、主题色 | ✅ |
切片 1 | 组合原语 — | ✅ |
切片 1.5 | 完整插槽映射 + 扩展组件词汇 | 🔄 |
切片 2 | 检索 — 嵌入(BLOB 余弦)、 | ✅ |
切片 3 | 时间性 — | ✅ |
切片 4 | 嵌入式代理 — WorkspaceAgent DO、夜间 cron、AI Gateway | ✅ |
切片 5 | 认证 — better-auth、Docker 化认证应用 | 设计中 |
切片 6 | 聊天界面 | 设计中 |
切片 7 | 跨代码 Vectorize 层 | 设计中 |
冒烟测试
分类的冒烟测试位于 smoke/。
# All Playwright specs (UI + E2E)
npm run smoke
# Individual shell scripts (worker API — no browser needed)
bash smoke/ingestion/capture.smoke.sh
bash smoke/claims/claims.smoke.sh
bash smoke/agent/agent.smoke.sh # needs ANTHROPIC_API_KEY部署
Cloudflare Worker + PWA
# 1. Build PWA into apps/pwa/dist
npm run build:pwa
# 2. Set production secrets (one-time)
cd apps/worker
wrangler secret put THESIS_BEARER_TOKEN
wrangler secret put ANTHROPIC_API_KEY
wrangler secret put CF_AIG_TOKEN
wrangler secret put FINNHUB_API_KEY
wrangler secret put FRED_API_KEY
# 3. Deploy worker + PWA assets
wrangler deployWorker 从同一源提供 PWA。/share-target、/mcp 和 /api/* 都是第一方。
完整的部署指南,包括 auth-app Docker 目标、DNS 和部署后冒烟检查:docs/deployment.md。
技术栈
层 | 技术 |
Worker 运行时 | Cloudflare Workers + Durable Objects (SQLite) |
API 框架 | Hono |
MCP | 手写 JSON-RPC over HTTP + SSE(30 个工具) |
PWA | Vite 5 + React 18 + Tailwind 3 |
富文本 | Tiptap |
嵌入 | Workers AI |
代理 | 普通 Durable Object( |
文档 | R2 + |
共享类型 |
|
贡献
阅读
docs/STATUS.md— 当前状态 + 前瞻计划阅读
docs/architecture/v2-embedded-agent.md— v2 设计在推送前运行
npm run typecheck在
smoke/中为新端点添加冒烟测试覆盖
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityCmaintenanceEnables financial research and analysis through AI agents that combine web search, content crawling, entity extraction, and deep research workflows. Supports extracting stock/fund entities with security codes and conducting structured financial investigations.924Apache 2.0

Signal8 MCP Serverofficial
AlicenseAqualityDmaintenanceProvides AI agents with direct access to SEC filing intelligence, company fundamentals, dilution risk scoring, and cross-company analytics for financial research.871791MIT- FlicenseAqualityDmaintenanceProvides AI assistants with real-time stock prices, financial statements, SEC filings, and analytical tools like DCF valuation and ratio analysis.14

ROIC.ai Financial Data MCPofficial
AlicenseAqualityBmaintenanceEnables AI assistants to access stock prices, financial statements, earnings call transcripts, and fundamental data for 60,000+ public companies via 25 read-only tools.252MIT
Related MCP Connectors
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Private company data & real-time news signals for AI agents.
The financial MCP for AI agents - 90+ financial tables, SEC filings, signals, alt-data.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bilaltariq98/invest'
If you have feedback or need assistance with the MCP directory API, please join our Discord server