InkPaw

InkPaw

Enables AI agents to generate, edit, validate, and render Word documents programmatically via MCP, ensuring correct OOXML structure and style.

Category
访问服务器

README

InkPaw 🐾

English | 简体中文

A tiny, meticulous DOCX toolkit for AI agents. Models write; InkPaw keeps the document correct.

InkPaw is a Word document generation, editing, validation, and rendering toolkit for AI agents. It provides an MCP server, a protocol-independent renderer, and a local web Playground for trying the complete agent workflow.

The design principle is simple: the model owns content and structure; deterministic code owns numbering, styles, references, OOXML correctness, and output validation.

Try the Playground

The fastest way to experience InkPaw is the local experimental Playground:

git clone https://github.com/syouro/InkPaw.git
cd InkPaw
npm install
npm run playground

Open http://127.0.0.1:8766, enter an OpenAI-compatible base URL, model name, and API key, then ask the agent to create a document.

The Playground shows streaming reasoning and tool activity, renders page previews, supports follow-up edits and templates, and provides DOCX/PDF downloads. It binds to localhost by default and is intended for local evaluation—not direct public deployment. Full page preview requires LibreOffice and poppler-utils. See Playground guide.

DeepSeek support

InkPaw includes explicit compatibility for DeepSeek thinking-mode Agent Loops: it sends the thinking control, streams reasoning_content into a separate UI panel, and preserves that reasoning across tool-call continuations as required by the DeepSeek API. The recommended starting model for the Playground is deepseek-v4-flash, which is prefilled with the official https://api.deepseek.com endpoint.

See the DeepSeek integration guide for setup, protocol details, and troubleshooting.

Why InkPaw?

LLMs can write strong content, but asking a model to control Word layout details directly often causes broken numbering, drifting styles, invalid references, or documents that fail to open. InkPaw separates those concerns with a persistent structured document model (def JSON):

  • Agents create headings, paragraphs, tables, images, equations, footnotes, comments, and sections.
  • InkPaw generates numbering, captions, cross-references, tables of contents, styles, and OOXML.
  • Stable node IDs allow precise query, update, move, and delete operations across agent turns.
  • Structured validation issues include locations, repair guidance, and authoritative examples for self-correction.

Features

  • Structured document creation and Markdown import.
  • Node-level insert, update, move, and delete with SQLite persistence.
  • Automatic numbering, captions, cross-references, and static or native TOCs.
  • Three-layer styling: preset → style profile → document overrides.
  • Table spans, headers/footers, footnotes, comments, checkboxes, equations, floating images, and multiple sections.
  • DOCX, PDF, and per-page PNG output.
  • Three validation layers: OPC integrity, ECMA-376 Schema, and Word compatibility checks.
  • MCP over stdio or stateless Streamable HTTP.
  • HTTP Bearer authentication and optional per-user storage scopes.
  • Local BYOK Playground with streaming Agent Loop, MCP tools, previews, and downloads.

Requirements

  • Node.js 18+
  • npm
  • LibreOffice Writer + Math for the complete test suite and PDF/PNG previews
  • Optional: poppler-utils for per-page PNG conversion
  • Optional: xmllint + xsltproc for complete OOXML Schema validation

Core DOCX generation does not require LibreOffice.

MCP quick start

InkPaw starts with stdio transport by default:

npm start

Example MCP client configuration:

{
  "mcpServers": {
    "inkpaw": {
      "command": "node",
      "args": ["/absolute/path/to/InkPaw/src/server.js"]
    }
  }
}

Streamable HTTP

npm run start:http

The default endpoint is http://127.0.0.1:8765/mcp and requires Bearer authentication. On first start, InkPaw creates data/mcp-token; you may also set DOCX_MCP_TOKEN explicitly.

Renderer only

The renderer does not depend on MCP or SQLite:

npm run demo
node src/docxUtil.js render examples/demo-report.js

Validation

npm test
npm run validate -- path/to/file.docx
scripts/docx2png.sh path/to/file.docx
npm run visual

Visual baselines depend on LibreOffice and installed fonts. Update them only after manually reviewing the rendered pages.

Architecture

MCP client or local Playground
              │
              ▼
MCP transport (stdio / HTTP)
              │
              ▼
Service + validator + SQLite store
              │
              ▼
Transform (numbering / refs / captions)
              │
              ▼
Protocol-independent DOCX renderer
              │
              ▼
DOCX / PDF / PNG + validation feedback

See Architecture for the module boundaries and invariants.

Repository layout

src/          core renderer, MCP server, service, storage, and validation
playground/   experimental local web Agent experience
scripts/      launch, validation, rendering, and visual-regression tools
test/         unit and integration tests
presets/      reusable style presets
schemas/      OOXML validation assets
docs/         architecture, specifications, compatibility, and release policy

Documentation

Project status

The core DOCX/MCP toolkit is the primary project. The Playground is marked experimental because its API and interface may change and its default security boundary is localhost. It is tested, but it is not a turnkey multi-tenant public SaaS deployment.

License

MIT © 2026 syouro. Third-party notices are listed in THIRD_PARTY_NOTICES.md.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选