Skip to content
API

Version Story API

Put lawyer-grade redlining inside your AI assistant with Version Story MCP, or inside your own software with our REST API.

Jump to MCP or REST.

What you can build

Four Things The Engine Does

The same deterministic comparison engine that powers the Version Story app, reachable from your own code. Both surfaces below do all four — MCP hands them to an agent as tools, REST exposes them over plain HTTP.

Redline

A true comparison of a base document against each revision — every insertion, deletion, and move, with footnotes, tables, and numbering intact.

Merge

Several revisions of one base folded into a single document, each edit labeled with the draft it came from and competing edits flagged rather than silently resolved.

Combine

Independent drafts that share no common base folded into one document, so a clean-slate rewrite and the original still read as one review.

Version history

An ordered chain of versions attributed change by change, so you can see which draft introduced every surviving edit.

Each one returns the same set of files: a Word document with real tracked changes, a PDF redline, a changed-pages-only PDF, and a markdown rendering built for a model to read.

Version Story MCP

What Is MCP?

The Model Context Protocol is how an AI assistant reaches tools outside itself. Connect Version Story over MCP and Claude can compare, merge, and trace versions of your documents inside the conversation you are already having.

It is the easiest way to start. Copy the link below, paste it into Claude, and it walks you through the rest.

Copy this into Claude
https://mcp-compare.versionstory.com/mcp
Try it today

Up and running in minutes

Paste the link into Claude, sign in with your Version Story account, and start comparing documents. Everything you already have — your files, your projects, your permissions — is there waiting.

How it works, the basics

Your agent takes two or more documents and sends them to us. Then we send you back redlines.

The documents you send us can be Word or PDF or even the old binary version of Word, .doc. Then we will send you back four files, each a variant of the redline. We will send you a Word track changes redline, which can be edited; a PDF redline, which renders nicely in any interface, including Claude; something called a changed-pages-only redline, which senior lawyers often prefer to review; and a markdown file serialized from the redline that is optimized for your agent to read — it is token efficient and improves reasoning.

The tools

Tools are the commands we share with your agent over MCP. Your agent translates what a user asks for in plain language into the right command, calls it, and hands the result back — no glue code from you.

Think git. It’s git for lawyers. We do diff, merge, and blame. Lawyers call this “redline”, “merge”, and "version history."

Whenever you send files to our app to get a redline, we also vectorize them and do a semantic search to see if they should be associated with any files you sent previously. We organize these into projects where the files are represented in our standalone application UI as nodes on a canvas connected by mappings that represent redlines. This is a visual, interactive representation of the Git-like version tree that lawyers find intuitive.

Redline

  • create_comparisonStage a redline of local documents; returns an upload manifest.
  • create_comparison_from_linksStage a redline from https URLs; the server fetches the bytes.
  • get_redlinesBlock until redlines are ready; return the download manifest.

Merge

  • create_mergeStage a merge of two or more revisions of one base document.
  • get_merged_documentBlock until the merged document is generated.

Combine

  • create_combineStage a combine of two or more documents that share no common base.
  • get_combined_documentBlock until the combined document is generated.

Version history

  • create_version_historyStage a version-history document across an ordered chain.
  • get_version_history_documentBlock until the version-history document is generated.

Session

  • list_projectsList your projects, newest first.
  • list_project_comparisonsList every comparison inside one project.
  • check_connectionReport the access-token lifetime and refresh status.
  • get_instructionsFetch the full connector workflow guide.

Schemas

Your assistant works this out for itself. It connects, asks what is available, and gets the exact shape of every command — so nobody has to keep a list in sync as we add things. The detail below is for whoever wires it up.

The agent-readable rendering rides alongside the download manifest on every result as text_url, with a text_format descriptor so you can dispatch without inspecting the bytes.

The request and response shape of each one is in the MCP reference.

Built for agents to read

Alongside every redline we return a markdown rendering of the same change set, with the changes marked inline. An agent reads it directly — no unzipping a .docx, no re-deriving the diff from two source documents and hoping it matches ours.

Every change carries who made it and which draft it came from, so a multi-way redline stays attributable down to the span.

Insertions and deletions
6. The Recipient will <ins author="counsel@firm.com"
   revision="v2 NDA.docx" date="…">promptly </ins>notify the Company of any
   <del author="counsel@firm.com" revision="v2 NDA.docx" date="…">unauthorized
   </del>disclosure of Confidential Information.

Moves, multi-author merges, and conflicts have their own elements. The full vocabulary, with worked examples, is in Redline format.

And here is how the three formats we return compare for agent use:

Capability.docx.pdf.md
Opens in Word or any PDF viewer
Rendered visual redline (color, strikethrough)
Preserves tables, footnotes, moves, cross-references
An AI assistant can read it directly
Compact enough to read in full, even for long documents
Version Story REST

Redlining, Inside
Your Product

MCP is the fastest way to put redlines in front of an AI assistant. REST is for when you want the engine behind your own software instead — your product, your screens, your workflow, with the redlining handled by us.

Embed redlines in your product

Show redlines inside your own client portal or matter management system, so your people never leave the software they already use.

Redline every draft automatically

Each time a document arrives — from a counterparty, your document management system, an intake form — a comparison runs without anyone having to ask for it.

The same deterministic engine

The same engine behind Compare and the MCP connector, with the same precision and the same four files, wherever you call it from.

How it works, the basics

Send us the documents, ask whether the result is ready, download it when it is. Three requests in total — a small enough job that most teams have it working in an afternoon.

Access is a key your organization issues to itself, from your own settings. It belongs to the organization rather than to whoever created it, so an integration keeps working when people join and leave. There is nothing else to set up.

POST /v1/compare
curl -sS https://api.versionstory.com/v1/compare \
  -H "Authorization: Bearer vs_live_..." \
  -F "original=@NDA v1.docx" \
  -F "modified=@NDA v2.docx"

That comes back immediately with a reference. Ask about it again and, once the redline is ready, you get a download link — name more than one format and the same call returns the Word file alongside the PDF, the changed-pages-only PDF, the Markdown rendering. Merging several people’s revisions of one document is the same shape, at POST /v1/merge.

Reference

Everything Else
Is In The Docs

Every tool signature, request and response shape, parameter, limit, and error code — for both surfaces — lives in the developer documentation. It is written against the code, so it is the copy that stays current.

Two lawyers look out over the city from a corner office

Get started

Test it yourself

Point your agent at our MCP and start generating redlines today. Free to start, no sales call required.