pdftract/crates/pdftract-cli/src/mcp/mod.rs
jedarden 210c40de8c feat(pdftract-mcp): add MCP server implementation changes
Changes from Phase 6.7 child beads that were not committed earlier:

- Add subtle dependency for constant-time token comparison
- Add root directory for path-traversal protection in HTTP+SSE transport
- Update MCP server state to support --root flag
- Minor fixes and improvements across MCP modules

These changes support the 7 closed child beads:
- pdftract-5xq16: JSON-RPC 2.0 framing layer
- pdftract-67tm8: stdio transport
- pdftract-g0ro2: HTTP+SSE transport
- pdftract-24kut: transport mutual exclusion enforcement
- pdftract-1rami: tool catalog (10 tools)
- pdftract-6696g: path-traversal protection
- pdftract-zltqd: bearer-token auth

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 03:09:56 -04:00

16 lines
424 B
Rust

pub mod auth;
pub mod bind;
pub mod framing;
pub mod http;
pub mod root;
pub mod server;
pub mod stdio;
pub mod tools;
pub use auth::{resolve_token, AuthSource, EXIT_USAGE_ERROR};
pub use bind::{check_bind_security, EXIT_CONFIG_ERROR};
pub use root::{canonicalize_root, resolve_path};
pub use server::run;
pub use stdio::run as run_stdio;
pub use framing::{BatchMessage, ErrorObject, Id, Notification, Request, Response};