Skip to content
ASTra
The Word engine built for AI agents

Your agent finally
speaks Word.

ASTra lets any AI agent read a .docx as clean structure, change it with exact operations, and save only files that pass schema validation. No XML. No guesswork. No half-finished edits.

$ npx -y @attentionform/astra-mcp-server --allowed-dir ./docs
agent · astra-mcp

you Build the Q3 board report from the notes in /docs.

  • ●open_document
    …
  • ●compose_document
    …
  • ●validate_document
    …
  • ●visual_inspect
    …
  • ●save_document
    …
Working. Every step is checked before it counts.
A board report page with a table, a stacked column chart and a callout
✓ valid

The problem nobody warned you about

Your agent is brilliant.
Your Word files are not ready for it.

A .docx is a zipped pile of XML. Give a model that raw, and one stray tag quietly ruins the file. You find out when the client opens it.

Raw XML

<w:tbl><w:tr><w:tc><w:p>
  <w:r><w:t>Revenue</w:t></w:r>
</w:p>   <!-- </w:tc> never closed -->
<w:tc><w:p><w:r><w:t>$14.2M
✕ This file can’t be opened.

One missing tag. No warning. A broken deliverable.

With ASTra

table:6x4   t_002   "Metric | Q3 2025 | Q3 2026"
row  r1c1   Revenue   $10.6M   $14.2M
update  t_002  row 1  col 2   → valid
✓ Checked before it counts.

The agent changes a cell by its ID. The package stays sound, or nothing is written.

Agent-first, from the first line

A person sees a page.
Your agent sees structure.

A rendered report page
What a person reads.
ID | V | Path | Header | Style | Text | Flags
--- | --- | --- | --- | --- | --- | ---
41E5F245 | 1 | Root | | Heading1 | Atlas Robotics: Q3 2026 Board Repor…
6E34034E | 1 | Root | | Heading2 | 1. Executive summary |
2A8D004A | 1 | Root | | body:L-1 | Revenue reached $14.2M in Q3, up 34…
t_001 | 1 | Root | | table:1x1 | r1c1 The board is asked to approve th…
550B88F0 | 1 | Root | | Heading2 | 2. Financial performance |
t_002 | 1 | Root | | table:6x4 | r1c1 Metric | r1c2 Q3 2025 | r1c3 Q3 …
58FD6E31 | 1 | Root | | chart | [Chart columnStacked] Revenue by quart…
56AC2CF6 | 1 | Root | | chart | [Chart line] Operating margin (%) | ca…
What your agent reads. Every row has an ID it can act on.

Four promises

Built so you can trust it with the real thing.

  • · style heading
  • · update table cell
  • · insert chart
  • · replace text
Applying…

Atomic

A batch lands whole, or it never happened.

An agent sends a whole batch of edits. If one is wrong, every one is undone and the file is untouched. No half-edited documents. Ever.

composeedit tableadd chartbad editrevert

Every save is a commit.

History

Every save is a commit. Time travel included.

Browse the history, preview what a revert would change, then revert or redo. History is append-only, so nothing your agent did is ever lost.

your folder
../secrets ✕
E_SANDBOX
  • author names
  • comments
  • revision marks
  • personal data

Safety

Walled in by design. Clean on the way out.

The server only touches the folders you allow, and nowhere else. When you are ready to share a file, one sanitize step strips the authors, comments and revision history, and can redact emails and phone numbers. It runs when you ask for it, not automatically.

  • ·Structure
  • ·Relationships
  • ·Styles
  • ·Schema
checked before every save

Validation

A broken file never leaves the building.

Every save is checked against the Word package rules. If something is wrong, nothing is written, and the agent is told exactly how to fix it.

How it works

From one sentence to a finished document.

You say it in plain words.

Turn the Q3 notes into a board report. Add the revenue chart and flag the risks.
On it. I’ll open the folder, build the report, check it, and show you the pages.

See it work

Real calls. Real answers. Even the refusals.

This is a recording of an agent talking to the ASTra server. Nothing here is mocked.

One call turns a Markdown file into a three-page board report: a styled table, three native charts, callouts, a footnote, a link and a code block. Then the agent checks it and saves.

  1. Agent calls new_document

    {
      "outPath": "/path/to/documents/atlas-board-report.docx",
      "template": "blank",
      "styleGuide": "atlas-style.md"
    }

    ASTra returns (trimmed)

    {
      "ok": true,
      "sessionId": "sess_7c1e4a52-2f3b-4d0e-9a61-0c5b8e2d4f17",
      "revision": 1
    }

Recorded from a real run of ASTra MCP server 0.2.0 (repository commit 04f1f84). Session IDs and folder paths are shortened; nothing else is edited except where marked trimmed. Regenerate with npm run demo.

Everything Word can do

And now your agent can do it too.

Charts

Charts that are really charts

Column, bar, line, area, pie, doughnut, scatter, combo and 3D. Native to Word, still editable there.

A stacked column chart inside a report

Review

Redlines down to the word

Real tracked changes with the author and date you choose, plus comments anchored to the exact paragraph. Accept or reject in one move.

A contract clause with a tracked change from thirty to forty-five days
tracked change comment author · date

Tables

Tables that obey

Add, move and reshape rows and columns by ID. Headers, widths and styles stay exactly where they belong.

A styled table with a navy header row

Compose

A whole report in one call

Hand it Markdown. Get back a finished, styled document with a cover, tables, charts and callouts in place.

Review in the margin

Comments and threaded replies anchored to the exact paragraph, from any reviewer you name.

Footnotes that connect

Footnotes, endnotes, bookmarks and hyperlinks, all wired up so they work the moment the file opens.

Print-ready layout

Cover pages, headers and footers, watermarks, page borders, sections and page setup.

Your brand, by default

Drop in a style guide once. Every table, callout and chart follows your palette.

It can see the page

Pages render back to the agent as images, so it checks its own layout before you ever do.

Scrub before you share

Strip authors, comments, revisions, hidden metadata and personal data in a single pass.

Every format out

Send the same document out as PDF, HTML or Markdown without leaving the pipeline.

Undo that goes deep

Browse history, preview a revert, restore any revision, redo it. Nothing is ever overwritten.

Three ways in

One engine. Every way you work.

Start here

MCP server

Plug it into Claude Desktop, Cursor, Windsurf, Claude Code or any MCP client. Sandboxed to the folders you list.

mcp config
{
  "mcpServers": {
    "astra": {
      "command": "npx",
      "args": [
        "-y",
        "@attentionform/astra-mcp-server",
        "--allowed-dir",
        "/path/to/your/documents"
      ]
    }
  }
}
Set up your client →

For pipelines

Command line

Inspect, validate, batch-edit, sanitize and export from scripts and CI. Scriptable and repeatable.

shell
npx -y @attentionform/astra validate report.docx
npx -y @attentionform/astra export report.docx --format pdf -o report.pdf
Command line setup →

For builders

TypeScript engine

The library behind both. Parse, edit in batches and serialise from your own Node code.

typescript
import { DocxParser, OperationEngine } from '@attentionform/astra-engine';

const parser = new DocxParser(fs.readFileSync('report.docx'));
const ast = await parser.getAST();
const engine = new OperationEngine(ast, parser);

const result = await engine.executeBatch({
  operations: [{ action: 'replace', target: ast.sections[0].nodes[0].id, text: 'New title' }],
});
if (result.success) fs.writeFileSync('report.docx', parser.rezip());
Engine setup →

Give your agent Word.

One config entry. Try it on a copy of a real document and watch what changes.

Source-available under the Business Source License 1.1. Free for individuals, schools, non-profits and small businesses.