stygian_plugin/mcp/mod.rs
1//! MCP (Model Context Protocol) server for the plugin extraction system
2//!
3//! Exposes plugin-based visual data extraction as an MCP server with full
4//! protocol support including initialization, tool discovery, and execution.
5//!
6//! # Standalone Server
7//!
8//! Run as a standalone server over stdin/stdout:
9//!
10//! ```sh
11//! cargo run --bin stygian-plugin-mcp -- --templates-dir ./templates
12//! ```
13//!
14//! # Architecture
15//!
16//! ```text
17//! ┌──────────────────────────────────┐
18//! │ Standalone MCP Server Binary │
19//! │ (stdio JSON-RPC 2.0 transport) │
20//! └─────────────┬──────────────────────┘
21//! │
22//! ┌─────────────▼──────────────────────┐
23//! │ McpRequestHandler │
24//! │ (initialize, tools/list,call) │
25//! └─────────────┬──────────────────────┘
26//! │
27//! ┌─────────────▼──────────────────────┐
28//! │ McpPluginServer │
29//! │ (8 extraction & template tools) │
30//! └──────────────────────────────────┘
31//! ```
32
33pub mod handler;
34pub mod server;
35
36pub use handler::McpRequestHandler;
37pub use server::McpPluginServer;