
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@eigenpal/docx-editor-agents
Advanced tools
Agent SDK and chat UI for the DOCX editor — framework-agnostic bridge, MCP server, AI SDK adapters, plus React UI (and Vue UI in 1.x)
Word-like API for AI agents to review DOCX documents. Read, comment, suggest tracked changes, accept/reject. Headless, server-friendly, browser-friendly. The library you build your AI document features on top of.
npm install @eigenpal/docx-editor-agents
import { readFile, writeFile } from 'node:fs/promises';
import { DocxReviewer } from '@eigenpal/docx-editor-agents';
const buffer = await readFile('contract.docx');
const reviewer = await DocxReviewer.fromBuffer(buffer, 'AI Reviewer');
reviewer.addComment(5, 'This cap seems too low.');
reviewer.replace(5, '$50k', '$500k');
await writeFile('contract.reviewed.docx', new Uint8Array(await reviewer.toBuffer()));
That's the static-review path: drop into a CI bot, queue worker, or Lambda. No editor needed. ~50 KB.
| Package | Description |
|---|---|
@eigenpal/docx-editor-react | |
@eigenpal/docx-editor-vue | |
@eigenpal/docx-editor-core | Framework-agnostic core: OOXML parser, serializer, layout engine, ProseMirror schema. Depend on this if you fork the React or Vue adapter. |
@eigenpal/docx-editor-i18n | Shared locale strings and types consumed by both adapters. |
@eigenpal/docx-editor-agents | Agent SDK and chat UI: framework-agnostic bridge, MCP server, AI SDK adapters, plus React UI. |
Forking the adapter? Keep your fork thin. Depend on
@eigenpal/docx-editor-coredirectly so parser, serializer, and rendering fixes land in your build automatically, without backporting each upstream change by hand.
Wire AI tools into a running <DocxEditor> so add_comment, suggest_change, find_text etc. show up live in the user's editor.
// React
import { useAgentChat } from '@eigenpal/docx-editor-agents/react';
const { executeToolCall, toolSchemas } = useAgentChat({ editorRef, author: 'Assistant' });
// Vue
import { useAgentBridge } from '@eigenpal/docx-editor-agents/vue';
const { executeToolCall, toolSchemas } = useAgentBridge({ editorRef, author: 'Assistant' });
Both share the same EditorRefLike contract from /bridge, the same tool catalog, and the same AgentMessage[] chat shape. For other frameworks, build the bridge directly via createEditorBridge from @eigenpal/docx-editor-agents/bridge.
Transport-agnostic core. Wrap it with your own auth, storage, and transport (HTTP-SSE, WebSocket, queue worker, anything).
import { McpServer, createReviewerBridge, DocxReviewer } from '@eigenpal/docx-editor-agents';
app.post('/api/mcp', requireAuth, async (req, res) => {
const buffer = await loadDocxForUser(req.user, req.params.docId);
const reviewer = await DocxReviewer.fromBuffer(buffer, req.user.name);
const server = new McpServer(createReviewerBridge(reviewer), {
name: 'acme-review',
version: '1.0.0',
});
res.json(server.handle(JSON.parse(req.body))); // sync, transport-free, never throws
await saveDocxForUser(req.user, req.params.docId, await reviewer.toBuffer());
});
The built-in agent tools (read_document, read_selection, read_page, read_pages, find_text, read_comments, read_changes, add_comment, suggest_change, apply_formatting, set_paragraph_style, insert_break, reply_comment, resolve_comment, scroll) are exposed automatically via MCP tools/list and tools/call. MCP spec version: 2025-06-18.
A local stdio MCP bin is one-document-per-config (Claude Desktop loads its list at startup), which doesn't fit a multi-doc product. Host the server yourself with your own auth and storage.
| Subpath | Use when |
|---|---|
@eigenpal/docx-editor-agents | Server-side review, library glue |
@eigenpal/docx-editor-agents/bridge | Wiring AI tools into a running editor adapter |
@eigenpal/docx-editor-agents/server | Backend routes needing agent tooling without the MCP transport |
@eigenpal/docx-editor-agents/mcp | Building an MCP server (any transport) |
@eigenpal/docx-editor-agents/ai-sdk/server | Server-side streaming chat with the Vercel ai package |
@eigenpal/docx-editor-agents/react | React apps wiring <DocxEditor> to an agent |
@eigenpal/docx-editor-agents/ai-sdk/react | React chat UI over the bridge |
@eigenpal/docx-editor-agents/vue | Vue apps wiring <DocxEditor> to an agent |
@eigenpal/docx-editor-agents/ai-sdk/vue | Vue chat UI over the bridge |
Each subpath tree-shakes independently. Vue and AI SDK peers are optional via peerDependenciesMeta.
The bridge mirrors the Office.js Word API pattern: locate a stable handle (paraId) first, then mutate. The contract is type-enforced at compile time:
import type { WordCompatBridge } from '@eigenpal/docx-editor-agents';
EditorBridge is statically required to satisfy WordCompatBridge. Drop a method that maps to a Word API call and typecheck breaks.
Contributions welcome. See CONTRIBUTING.md for setup, tests, and the one-time CLA signature.
[!TIP] Questions or custom features? Email docx-editor@eigenpal.com.
FAQs
Agent SDK and chat UI for the DOCX editor — framework-agnostic bridge, MCP server, AI SDK adapters, plus React UI (and Vue UI in 1.x)
The npm package @eigenpal/docx-editor-agents receives a total of 16,488 weekly downloads. As such, @eigenpal/docx-editor-agents popularity was classified as popular.
We found that @eigenpal/docx-editor-agents demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.