Labsco
firdausmntp logo

Dokumen-Pintar

β˜… 1

from firdausmntp

62 format-aware tools for AI to read and edit Word, Excel, and PDF files with precision β€” plus academic document linting for Indonesian standards.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup
<p align="center"> <img src="assets/icon.svg" width="140" height="140" alt="Dokumen-Pintar logo"> </p> <h1 align="center">Dokumen-Pintar</h1> <p align="center"><b>Universal MCP server for cross-format document CRUD</b></p> <p align="center"> Read, write, search, and manage text, Office, and PDF files<br> from any AI agent that supports the <a href="https://modelcontextprotocol.io/">Model Context Protocol</a>. </p> <p align="center"> <a href="https://pypi.org/project/dokumen-pintar/"><img alt="PyPI" src="https://img.shields.io/pypi/v/dokumen-pintar?style=for-the-badge&logo=pypi&logoColor=white&labelColor=0b1020&color=1e3a5f"></a>&nbsp; <a href="https://python.org"><img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-3776AB?style=for-the-badge&logo=python&logoColor=white&labelColor=0b1020"></a>&nbsp; <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-1e3a5f?style=for-the-badge&labelColor=0b1020"></a>&nbsp; <a href="tests/"><img alt="1403 tests passed" src="https://img.shields.io/badge/tests-1403%20passed-10b981?style=for-the-badge&logo=pytest&logoColor=white&labelColor=0b1020"></a>&nbsp; <a href="htmlcov/"><img alt="100% coverage" src="https://img.shields.io/badge/coverage-100%25-10b981?style=for-the-badge&labelColor=0b1020"></a> </p> <p align="center"> <a href="#features">Features</a> <span>&nbsp;&middot;&nbsp;</span> <a href="#supported-formats">Formats</a> <span>&nbsp;&middot;&nbsp;</span> <a href="#quick-start">Quick Start</a> <span>&nbsp;&middot;&nbsp;</span> <a href="#tools-overview">Tools</a> <span>&nbsp;&middot;&nbsp;</span> <a href="docs/">Docs</a> <span>&nbsp;&middot;&nbsp;</span> <a href="docs/BENCHMARK.md">Benchmark</a> <span>&nbsp;&middot;&nbsp;</span> <a href="AGENTS.md">Contributing</a> </p> <p align="center"><b><a href="README.id.md">Baca dalam Bahasa Indonesia</a></b></p>

Why Dokumen-Pintar

Most filesystem MCP servers stop at "read this file, write that file." Dokumen-Pintar treats documents as structured data the AI can navigate. Tell an agent to update a paragraph by index, set a cell by Sheet1!B2, walk a JSON tree with JSONPath, generate a DOCX from Markdown - it works the same way across every supported format.

Every mutating tool snapshots the file first. Every action lands in an audit log. Every path is sandboxed to roots you opt in. The default config is sensible; the profiles cover the rest.


Features

<table> <tr> <td width="50%" valign="top">

Multi-root Sandbox β€” Define multiple workspace roots with per-root writable control. All paths outside the sandbox are rejected.

10 Formats β€” Plain text, Markdown, LaTeX, JSON / YAML, CSV / TSV, XML / SVG, DOCX, XLSX, PPTX, PDF.

62 MCP Tools - File & content CRUD, structured access, batch operations, search, versioning, metadata, authoring, image extraction, sections, templates, TOC, bibliography, document compare, lint - all exposed as callable tools.

Authoring β€” Generate DOCX or PDF from a JSON spec or Markdown source via compose_docx / compose_pdf / compose_from_markdown.

</td> <td width="50%" valign="top">

Structured Access β€” JSONPath for JSON / YAML, XPath for XML, cell / range / sheet for XLSX, paragraph / table for DOCX, slide for PPTX, page for PDF.

Automatic Versioning β€” Copy-on-write snapshots on every write. Undo, diff, restore, and purge anytime.

Metadata Layer β€” Read, write, delete, or strip EXIF, OOXML core properties, and PDF docinfo through one consistent API.

Audit Trail β€” Every mutation logged to JSONL with timestamp and operation details.

2 Transports β€” stdio (Claude Desktop, Cursor, VS Code, Windsurf) and HTTP / SSE.

</td> </tr> </table>

Supported Formats

FormatReadWriteStructured QuerySearch
Plain text / Markdownβœ…βœ…β€”βœ…
JSONβœ…βœ…JSONPath $.keyβœ…
YAMLβœ…βœ…JSONPath $.keyβœ…
CSV / TSVβœ…βœ…row:N Β· col:NAME Β· cell:row:N,col:NAMEβœ…
XML / SVGβœ…βœ…XPath //nodeβœ…
DOCXβœ…βœ…paragraph:N Β· table:Nβœ…
XLSXβœ…βœ…cell:Sheet!A1 Β· range: Β· sheet:βœ…
PPTXβœ…βœ…slide:N Β· slide_title:Nβœ…
PDFβœ…β€”page:N Β· outline Β· metadataβœ…

Tools Overview

62 MCP tools organized by category:

CategoryTools
Workspaceworkspace_list_roots Β· workspace_stat Β· workspace_tree Β· workspace_diagnose
File CRUDfile_create Β· file_delete Β· file_rename Β· file_copy Β· file_move
Contentcontent_read Β· content_write Β· content_append Β· content_insert Β· content_replace Β· content_delete_range Β· content_patch Β· content_diff
Structuredstruct_get Β· struct_set Β· struct_delete Β· struct_meta
Metadatametadata_read Β· metadata_write Β· metadata_delete Β· metadata_strip Β· metadata_read_batch
Authoringvalidate_spec Β· compose_docx Β· compose_pdf Β· compose_from_markdown Β· compose_to_markdown
Sectionssection_extract Β· section_merge
Imagesimage_list Β· image_extract Β· image_extract_all Β· image_replace
Templatestemplate_list Β· template_install Β· template_render Β· template_render_named
TOC & Bibliographytoc_generate Β· bibliography_check Β· bibliography_format
Compare & Lintdocument_compare Β· document_lint Β· document_lint_fix
Batchbatch_rename Β· batch_replace_content Β· batch_replace_structured Β· batch_delete
Searchsearch_filename Β· search_content Β· search_in_format
Versioningversion_list Β· version_diff Β· version_restore Β· version_undo Β· version_purge
Semantic *search_semantic Β· semantic_index_path Β· semantic_stats

<sub>* Only registered when <code>semantic_search.enabled = true</code> and the <code>[semantic]</code> extra is installed.</sub>

Full parameter reference: docs/TOOLS.md


Architecture

Copy & paste β€” that's it
flowchart TD
    Client["AI Client\n(Claude, Cursor, VS Code, ...)"]
    Client -->|"MCP protocol\n(stdio or HTTP/SSE)"| Server

    subgraph Server["dokumen-pintar server"]
        PG["PathGuard\nsandboxed multi-root"]
        H["Handlers\n9 format parsers"]
        V["Versions\ncopy-on-write snapshots"]
        A["AuditLog\nJSONL mutation log"]
        S["Search\nfilename + content"]
        SE["Semantic\nvector index (optional)"]
    end

    Server --> FS["Filesystem\n(sandboxed workspace roots)"]

Full details: docs/ARCHITECTURE.md


Testing

Copy & paste β€” that's it
pip install -e ".[dev]"
pytest
<table align="center"> <tr> <td align="center" width="25%"> <h2>1403</h2> <sub>Tests passed</sub> </td> <td align="center" width="25%"> <h2>100%</h2> <sub>Line + branch coverage</sub> </td> <td align="center" width="25%"> <h2>100%</h2> <sub>Minimum threshold</sub> </td> <td align="center" width="25%"> <h2>-n auto</h2> <sub>Parallel via xdist</sub> </td> </tr> </table>

HTML coverage report: htmlcov/index.html

Performance numbers and methodology: docs/BENCHMARK.md


Documentation

DocumentContents
USAGE.mdWorkspace URIs, tool examples, practical recipes
CONFIG.mdAll config fields with types, defaults, and notes
TOOLS.mdFull reference for all 62 tools
ARCHITECTURE.mdModule map, request flow, versioning, safety
BENCHMARK.mdPerformance baselines and methodology
profiles/Six pre-tuned config profiles (personal, developer, research, ...)
AGENTS.mdContributor guide: conventions, dev workflow, PR process

Contributing

Copy & paste β€” that's it
git clone https://github.com/firdausmntp/Dokumen-Pintar.git
cd Dokumen-Pintar
pip install -e ".[dev]"

ruff check src/             # lint
mypy src/dokumen_pintar/    # type check
pytest                      # test + coverage

PRs welcome. All tests must pass and coverage must stay at 100%. Read AGENTS.md before submitting - it covers conventions, the handler protocol, and how to add a new format or tool.


License

MIT β€” 2026 firdausmntp


<p align="center"> <sub>Built by <a href="https://github.com/firdausmntp">firdausmntp</a></sub> </p>