Skip to main content

stygian_mcp/
lib.rs

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