How veinsurelee/thread-scope works
Thread Scope is an MCP service that lets AI clients discover BYR forum structure, retrieve and search forum content, inspect traffic, and query user information. The main workflow is MCP tool invocation → application use case → crawl or local lookup → persistence where applicable → presented result. The README documents the broader domain capabilities; sampled sources confirm the server entry point, traffic-history read path, structure cache behavior, thread crawling, user crawling, and HTTP/session handling. Other documented subsystem connections are shown only at the level supported by the architecture description.
Main entry points: use-case Use cases · page-fetcher.ts Page fetching · tool Tool handlers · structure Structure crawl
Components 21
MCP interface
- MCP server
src/index.ts - Tool handlers
src/controller/tool - Result presenters
src/controller/presenter
Application workflows
- Use cases
src/application/use-case - Domain models
src/model - Forum algorithms
src/model/algorithm/forum
Forum data access
- Structure crawl
src/crawl/structure - Article crawl
src/crawl/article - Thread crawl
src/crawl/content - Search crawl
src/crawl/search - Traffic crawl
src/crawl/traffic - User crawl
src/crawl/user
Local persistence
- Content database
src/storage/content-db.ts - Traffic database
src/storage/traffic-db.ts - Traffic write queue
src/storage/traffic-queue.ts - Structure snapshot
src/storage/structure-store.ts
Shared foundation
- Page fetching
src/crawl/common/page-fetcher.ts - HTTP and session
src/core/http-client.ts - Authentication
src/auth/auth.ts
Other components
- MCP client
- BYR forum
Connections 26
- MCP client → MCP server: sends JSON-RPC
- MCP server → Tool handlers: registers tools
- Tool handlers → Use cases: invokes workflows
- Tool handlers → Result presenters: formats results
- Use cases → Structure crawl: fetches structure
- Use cases → Article crawl: fetches articles
- Use cases → Thread crawl: fetches threads
- Use cases → Search crawl: searches content
- Use cases → Traffic crawl: fetches traffic
- Use cases → User crawl: fetches users
- Use cases → Traffic database: queries history
- Structure crawl → Structure snapshot: reads and writes
- Use cases → Content database: reads and writes
- Use cases → Traffic write queue: queues samples
- Traffic write queue → Traffic database: persists samples
- Structure crawl → Page fetching: fetches pages
- Article crawl → Page fetching: fetches pages
- Thread crawl → Page fetching: fetches pages
- Search crawl → Page fetching: fetches pages
- Traffic crawl → Page fetching: fetches pages
- User crawl → Page fetching: fetches pages
- Page fetching → HTTP and session: requests pages
- HTTP and session → BYR forum: sends HTTP requests
- Authentication → HTTP and session: manages session
- Use cases → Domain models: uses domain data
- Use cases → Forum algorithms: aggregates forum data