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