1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Model Context Protocol (MCP) server implementation.
//!
//! Provides an MCP server that exposes Kreuzberg's document extraction
//! capabilities as MCP tools for integration with AI assistants.
//!
//! # Features
//!
//! - **extract_file**: Extract content from a file by path
//! - **extract_bytes**: Extract content from base64-encoded bytes
//! - **batch_extract_files**: Extract content from multiple files in parallel
//! - **detect_mime_type**: Detect MIME type of a file
//! - **cache_stats**: Get cache statistics
//! - **cache_clear**: Clear the cache
//! - **cache_manifest**: Get model manifest with checksums
//! - **cache_warm**: Download model files for offline use
//! - **get_version**: Get Kreuzberg version info
//! - **chunk_text**: Split text into chunks
//! - **embed_text**: Generate vector embeddings (requires `embeddings` feature)
//! - **extract_structured**: Extract structured data via LLM with JSON schema (requires `liter-llm` feature)
//!
//! # Example
//!
//! ```rust,no_run
//! use kreuzberg::mcp::start_mcp_server;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
//! start_mcp_server().await?;
//! Ok(())
//! }
//! ```
// Re-export public API for backward compatibility
pub use ;
pub use ;
pub use ;
pub use map_kreuzberg_error_to_mcp;