1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Unified MCP (Model Context Protocol) aggregator for Stygian.
//!
//! Merges the tool surfaces of `stygian-graph`, `stygian-browser`, and
//! `stygian-proxy` into a single MCP server. An LLM agent connecting to
//! this server can scrape URLs, run pipeline DAGs, automate browsers,
//! manage proxy pools, and combine all three capabilities — without needing
//! to connect to three separate processes.
//!
//! ## Architecture
//!
//! ```text
//!
//! LLM / IDE
//! │ JSON-RPC 2.0 (stdin/stdout)
//! ▼
//! ┌─────────────────────────────┐
//! │ McpAggregator │
//! │ │
//! │ tools/list ─── merge ─── ┤
//! │ tools/call ─── route ─┐ │
//! └─────────────────────────┼──┘
//! ┌──────────────────┬─┘
//! ▼ ▼
//! GraphHandler BrowserHandler ProxyHandler
//! (stygian-graph) (stygian- (stygian-
//! scrape, rest, browser) proxy)
//! graphql, rss, acquire, nav, add, acquire,
//! sitemap, eval, shot, release, stats
//! pipeline_* verify, release
//! ```
//!
//! Tools are prefixed by crate: `graph_scrape`, `browser_acquire`,
//! `proxy_add`. The aggregator itself adds two cross-crate tools:
//!
//! | Tool | Description |
//! | ---- | ----------- |
//! | `scrape_proxied` | HTTP scrape routed through the proxy pool |
//! | `browser_proxied` | Browser session with proxy from the pool |