Skip to main content

MCP server for compressed structured context on .docx and .tex documents

Reason this release was yanked:

use precis-mcp instead

Project description

precis-mcp

A Model Context Protocol (MCP) server that gives LLMs compressed, structured context for .docx and .tex documents. It maintains a heading tree with RAKE keyword summaries so the LLM can navigate and edit documents without flooding context.

Features

  • 5 toolsactivate, toc, get, put, move
  • Dual addressing — 5-char content-hash slugs + positional heading paths (S1.2 = heading, S1.2¶3 = paragraph)
  • RAKE keyword extraction — stateless, zero-dependency precis generation (<5ms)
  • DOCX citations[@key] round-trip with styled hyperlinks and bibliography entries
  • Heading safety# | Title pipe separator + auto-strip of LLM-inserted section numbers
  • Track changesput() writes Word revision markup by default
  • LaTeX support\input/\include resolution, \label{} aliases, .bib parsing
  • Atomic I/O — every call reads fresh from disk, no stale state

Installation

uv pip install -e ".[dev]"

Usage

Run as an MCP server:

precis

Or use with an MCP client:

from precis.tools import Session, activate, toc, get, put

session = Session()
await activate(session, "paper.docx")
await toc(session)
await get(session, id="KR8M2")
await put(session, id="KR8M2", text="Updated text.", mode="replace")

Configuration

~/.config/precis/precis.toml:

[precis]
author = "precis"   # track-changes author name (DOCX only)

Testing

uv run python -m pytest tests/ -v

License

GPL-3.0-or-later — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

precis_mcp-0.4.1.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

precis_mcp-0.4.1-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file precis_mcp-0.4.1.tar.gz.

File metadata

  • Download URL: precis_mcp-0.4.1.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for precis_mcp-0.4.1.tar.gz
Algorithm Hash digest
SHA256 b2d2e8d9c8aaff8ee9e639a48f237976bf7b31c46b12cdb129464269132336b3
MD5 3985397af055596a7cdf621110f6e3e8
BLAKE2b-256 a4e6f08b92f2de117b66aff454f0b722195c81b40aba7ed1413e114bdb155ae7

See more details on using hashes here.

Provenance

The following attestation bundles were made for precis_mcp-0.4.1.tar.gz:

Publisher: publish.yml on retospect/precis-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file precis_mcp-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: precis_mcp-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for precis_mcp-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9594ca06cc49df70f3c1d47e6f044e96a487c87e935c052867979b886b93fb2b
MD5 2aace080798e8df103728fd9cb4d421c
BLAKE2b-256 4c02a15d74485d663f41e32cefb2eeabc711574ce59c8d5a5a68dfe02df18841

See more details on using hashes here.

Provenance

The following attestation bundles were made for precis_mcp-0.4.1-py3-none-any.whl:

Publisher: publish.yml on retospect/precis-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page