The AI-Native Office & Diagram Toolkit Plugin for AI Agents (Word, Excel, Technical Diagrams)
pip install docwright-ai-toolkit Copy PIP instructions
Capabilities • Quickstart • AI IDE Setup • Architecture • MCP Catalog • License
When modern Large Language Models (LLMs) generate or manipulate office documents using raw library scripts (python-docx, openpyxl), they frequently corrupt files:
Docwright AI Toolkits resolves this by introducing a strict, deterministic compilation layer between AI models and binary file formats.
pip install docwright-ai-toolkit Verify the installation:
docwright --version Inspecting Available Tools Enumerate all registered MCP tools and their capabilities:
docwright list Inspect the schema and parameter specifications for any tool:
docwright schema docx.build_document AI IDE & Agent Setup (Universal Integration) Docwright communicates natively via the Model Context Protocol (MCP) using standard I/O (stdio), and provides a deterministic CLI Engine for terminal-based AI agents and headless pipelines.
claude mcp add docwright -- docwright-mcp Or add to your .claude.json:
{ "mcpServers": { "docwright": { "command": "docwright-mcp" } } } 2. Cursor IDE Add to .cursor/mcp.json:
# Discover all 51 tools docwright list # Inspect exact contract & argument schema docwright schema docx.build_document # Execute via structured spec file docwright docx.build_document --spec payload.json 7. Universal MCP Clients (Cline, Roo Code, Continue.dev, Zed) Any client supporting the Model Context Protocol can connect via docwright-mcp. Pre-built JSON templates are available in configs/.
Docwright enforces a 5-layer separation of concerns:
[ AI Agent / IDE (Cursor, Claude, Antigravity) ] | (MCP JSON-RPC) v [ Layer 5: Interfaces ] ──> CLI Dispatcher & Native MCP STDIO Server | [ Layer 4: Operations ] ──> Central ToolRegistry (Smart Parameter Adapter) | [ Layer 3: Contracts ] ──> Pydantic Schemas (DocSpec, LayoutSpec, Envelope) | [ Layer 2: Verification ] ──> 13 Universal Gates (UG-01..13) & Diagnostic Envelopes | [ Layer 1: Core Engine ] ──> OpenXML TagOrderRegistry, 2D BlockMutator, OpenCV Measurer Contracts (contracts/): Open Pydantic models allowing LLMs to inspect schemas, type hints, and documentation. Engines (core/, gates/): High-performance, protected modules enforcing XML grammar, layout topology, and formula calculation. Core Tool Catalog Docwright exposes 51 specialized tools organized by functional domain:
For non-developer environments without a pre-installed Python runtime, standalone executable releases are available in the GitHub Releases tab:
{ "mcpServers": { "docwright": { "command": "C:\\path\\to\\docwright.exe", "args": ["mcp"] } } } License & Commercial Terms Docwright AI Toolkits is licensed under the Business Source License 1.1 (BSL 1.1).
mcp ai-agents docx xlsx diagram cursor claude windsurf antigravity office-toolkit
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




