edititall_mcp/lib.rs
1//! MCP launcher for [EditItAll](https://edititall.com) — a free, local-first
2//! suite of in-browser editors (photo, vector, PDF, spreadsheet, Word, slides,
3//! image convert/compress) built by [Subcue AI LLC](https://subcueai.com).
4//!
5//! Install the binary with `cargo install edititall-mcp`, then point any MCP
6//! client at it:
7//!
8//! ```text
9//! claude mcp add edititall -- edititall-mcp
10//! ```
11//!
12//! This crate **wraps** the zero-dependency Node server shipped in this repo
13//! (`edititall-mcp.mjs`). The binary embeds that script, writes it to a temp
14//! file, and execs `node`. You still need:
15//!
16//! - **Node.js 22+** on `PATH` (or set `NODE`)
17//! - **Chrome / Edge / Chromium / Brave** (auto-detected, or set `CHROME_PATH`)
18//!
19//! The Node process launches a local headless Chrome and drives EditItAll's
20//! official automation hooks. **Files never leave the machine.**
21//!
22//! Product docs: <https://edititall.com/ai>
23//!
24//! Env vars (forwarded to the Node server):
25//!
26//! - `EDITITALL_URL` — editor origin (default `https://edititall.com`)
27//! - `CHROME_PATH` — browser binary
28//! - `NODE` — Node executable (default `node` on `PATH`)
29
30/// The MCP stdio server script embedded in this crate. Written to a temp file
31/// at runtime and executed with Node.js 22+.
32pub const SERVER_JS: &str = include_str!("../edititall-mcp.mjs");
33
34#[cfg(test)]
35mod tests {
36 use super::*;
37
38 #[test]
39 fn embedded_server_identifies_itself() {
40 assert!(
41 SERVER_JS.contains("serverInfo"),
42 "embedded script must be the EditItAll MCP server"
43 );
44 assert!(SERVER_JS.contains("edititall"));
45 assert!(SERVER_JS.contains("sheet_set_cells"));
46 assert!(SERVER_JS.contains("images_process"));
47 }
48}