Files
mcp-docx/Cargo.toml
T
Andy d4ebdbf6a9 CLI: inline font download + checksum verification
- Add `fonts download` and `fonts verify` subcommands
- Implement Rust-based downloader (ureq + tar + flate2) with pinned sources
- Verify SHA-256 for Liberation and Noto Sans TTFs for reproducibility
- Keep binary behind `build-bin` feature; library build unaffected
2025-08-11 15:04:47 +08:00

136 lines
3.3 KiB
TOML

[package]
name = "docx-mcp"
version = "0.1.0"
edition = "2021"
authors = ["Your Name <your.email@example.com>"]
description = "A comprehensive Model Context Protocol (MCP) server for Microsoft Word DOCX file manipulation"
documentation = "https://docs.rs/docx-mcp"
homepage = "https://github.com/hongkongkiwi/docx-mcp"
repository = "https://github.com/hongkongkiwi/docx-mcp"
readme = "README.md"
license = "MIT"
keywords = ["mcp", "docx", "word", "document", "pdf"]
categories = ["text-processing", "api-bindings", "command-line-utilities"]
exclude = [
"/.github/*",
"/tests/fixtures/*",
"/example/*",
"/benches/*",
"/.gitignore",
"/deny.toml"
]
[dependencies]
# Official MCP SDK
mcp-server = "0.1"
mcp-core = "0.1"
# Async runtime
tokio = { version = "1.40", features = ["full"] }
async-trait = "0.1"
# DOCX manipulation (pure Rust)
docx-rs = "0.4"
zip = "0.6"
quick-xml = "0.36"
# Pure Rust text extraction from DOCX
roxmltree = "0.20" # XML parsing without external deps
# PDF generation (pure Rust)
printpdf = "0.7"
lopdf = "0.34"
rusttype = "0.9" # Font rendering in pure Rust
# Embedded fonts for PDF
include-bytes-plus = "1.0"
# Image processing (pure Rust)
image = { version = "0.25", features = ["png", "jpeg", "webp", "bmp", "gif"] }
imageproc = "0.25"
resvg = "0.44" # SVG rendering in pure Rust
tiny-skia = "0.11" # 2D graphics in pure Rust
usvg = "0.44" # SVG parsing
# HTML/Markdown to PDF (pure Rust alternatives)
pulldown-cmark = "0.12" # Markdown parsing
html5ever = "0.29" # HTML parsing
comrak = "0.28" # CommonMark parsing
# Template rendering (pure Rust)
handlebars = "6.0" # Template engine
tera = { version = "1.20", optional = true }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
ureq = { version = "2.10", features = ["tls"] }
flate2 = { version = "1.0", features = ["rust_backend"] }
tar = "0.4"
sha2 = "0.10"
# Error handling and logging
anyhow = "1.0"
thiserror = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# File handling
tempfile = "3.10"
walkdir = "2.5"
# Additional utilities
uuid = { version = "1.10", features = ["v4", "serde"] }
base64 = "0.22"
chrono = { version = "0.4", features = ["serde"] }
regex = "1.10"
once_cell = "1.20"
# Command line argument parsing
clap = { version = "4.5", features = ["derive", "env"] }
# Optional external tool support
headless_chrome = { version = "1.0", optional = true }
wkhtmltopdf = { version = "0.4", optional = true }
[features]
default = ["embedded-fonts", "pure-rust-pdf"]
embedded-fonts = []
pure-rust-pdf = []
external-tools = ["headless_chrome", "wkhtmltopdf"]
full = ["embedded-fonts", "pure-rust-pdf", "external-tools", "tera"]
build-bin = []
[build-dependencies]
anyhow = "1.0"
[[bin]]
name = "docx-mcp"
path = "src/main.rs"
required-features = ["build-bin"]
[lib]
name = "docx_mcp"
path = "src/lib.rs"
[dev-dependencies]
# Testing framework
tokio-test = "0.4"
assert_matches = "1.5"
pretty_assertions = "1.4"
rstest = "0.18"
test-log = "0.2"
# Test utilities
tempfile = "3.10"
uuid = { version = "1.10", features = ["v4"] }
criterion = { version = "0.5", features = ["html_reports"] }
# Mock and fixtures
mockito = "1.4"
serde_yaml = "0.9"
[[bench]]
name = "docx_benchmarks"
harness = false