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: equity-desk
クイックスタート
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:pwahttp://localhost:5173 を開きます。設定でベアラートークンを追加します(.dev.vars の値を使用)。
エージェントを接続する(BYOA)
GET /api/mcp-info はMCPエンドポイント、ツールリスト、認証手順を返します。設定ページには同じ情報がコピー可能なURL付きで表示されます。
Streamable 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 | CloudflareアカウントID |
| 任意 | ワークスペースごとのデフォルト月間200,000トークン |
提供済みスライス
完全な決定ログとスライス履歴: docs/roadmap/GRILL-ME.md
スライス | 説明 | ステータス |
W0–W5 | 基盤、著者性、統合、レンズ、エビデンス、データ | ✅ |
スライス0 | 安定化、Stooqドキュメント、EDGARリトライ、theme-color | ✅ |
スライス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/* はすべてファーストパーティです。
認証アプリの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/に新しいエンドポイントのスモークカバレッジを追加
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Licensed, cited financial data for AI agents: news, filings, transcripts, research and tearsheets.
Research agents, a shared workspace and market data for investment research teams.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Research layer for AI agents: stock theses, filing Q&A with page cites, monitoring. Research-only.
Related MCP Servers
AlicenseBqualityBmaintenanceProvides AI agents with direct access to SEC filing intelligence, company fundamentals, dilution risk scoring, and cross-company analytics for financial research.113600 npm45MIT- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform grounded equity research by analyzing tickers from SEC filings and market data, producing citation-guarded memos with pre-computed fundamentals.MIT
- AlicenseNot gradedqualityBmaintenanceFinancial data and research MCP for AI agents: filings with full-text and fact search, statements as reported, earnings, insider and institutional ownership, corporate events, executives, analyst data, company discovery and research signals for US, China and Japan equities. Every figure traced to its filing. Browser sign-in.10MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to access and analyze financial data such as stocks, ETFs, crypto, forex, commodities, company fundamentals, financial statements, and market insights through 250+ configurable tools.356 npmApache 2.0