Skip to main content

Module mcp

Module mcp 

Source
Expand description

MCP (Model Context Protocol) server — exposes scraping & pipeline tools MCP (Model Context Protocol) server for graph-based scraping.

Exposes stygian-graph scraping and pipeline capabilities as an MCP server over stdin/stdout using the JSON-RPC 2.0 protocol. External tools (LLM agents, IDE plugins) can scrape URLs, query REST/GraphQL APIs, parse feeds, and execute full pipeline DAGs via the standardised MCP interface.

§Enabling

[dependencies]
stygian-graph = { version = "*", features = ["mcp"] }

§Running the server

Add stygian-graph as a dependency with the mcp feature and call McpGraphServer::run() from your own binary:

use stygian_graph::mcp::McpGraphServer;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    McpGraphServer::run().await
}

§Protocol

Implements MCP 2025-11-25 over JSON-RPC 2.0 on stdin/stdout.

MCP MethodDescription
initializeHandshake, return server capabilities
tools/listList available scraping and pipeline tools
tools/callExecute a scraping or pipeline tool

§Tools

ToolKey ParametersReturns
scrapeurl, timeout_secs?, proxy_url?, rotate_ua?data, metadata
scrape_resturl, method?, auth?, query?, body?, headers?, pagination?, data_path?data, metadata
scrape_graphqlurl, query, variables?, auth?, data_path?data, metadata
scrape_sitemapurl, max_depth?data (JSON array of entries), metadata
scrape_rssurldata (JSON array of items), metadata
pipeline_validatetomlnodes, services, execution_order, valid
pipeline_runtoml, timeout_secs?per-node outputs, skipped, errors
charon_*feature-gated HAR diagnostics and planning inputsCharon report/policy JSON payloads

Structs§

McpGraphServer
MCP server exposing stygian-graph scraping and pipeline tools.