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: 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 | 사용자의 CF 계정 ID |
| 선택 | 워크스페이스당 기본 월 200000 토큰 |
제공된 슬라이스
전체 의사결정 로그 및 슬라이스 이력: docs/roadmap/GRILL-ME.md
슬라이스 | 설명 | 상태 |
W0–W5 | 기반, 저작권, 종합 분석, 렌즈, 증거, 데이터 | ✅ |
슬라이스 0 | 안정화, Stooq 문서, EDGAR 재시도, theme-color | ✅ |
슬라이스 1 | 구성 프리미티브 — | ✅ |
슬라이스 1.5 | 전체 슬롯 맵 + 확장 컴포넌트 어휘 | 🔄 |
슬라이스 2 | 검색 — 임베딩(BLOB 코사인), | ✅ |
슬라이스 3 | 시간적 — | ✅ |
슬라이스 4 | 임베디드 에이전트 — WorkspaceAgent DO, 야간 크론, 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