Mes Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mes Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
AI agents need a safe way to work with real manufacturing documents. This project provides a production-oriented MCP server and CLI for Excel, PDF, Word, and Markdown files used in MES workflows.
It does not try to make an LLM directly edit office files. It turns documents into a structured DocumentIR, keeps source provenance, requires approved PatchIR edits, validates output artifacts, and exports back to md, docx, pdf, or xlsx.
This repository contains:
uv run python -m mes_doc_mcp.serveruv run mes-doc-mcp ...mes_doc_mcpTypical users:
MES teams often receive business-critical data in Excel, Word, PDF, and Markdown:
LLMs are useful here, but unsafe if they directly mutate files. This server gives the agent controlled tools instead.
source file
→ secure ingest
→ DocumentIR with source refs
→ search / inspect / MES extraction
→ PatchIR proposal
→ dry-run diff
→ human approval
→ apply
→ validate
→ export artifactgit clone https://github.com/sjMun09/MES-mcp.git
cd MES-mcp
uv sync --extra dev
uv run pytest -qCreate sample files:
uv run python scripts/create_examples.pyTry the CLI:
uv run mes-doc-mcp ingest examples/sample_production.xlsx
uv run mes-doc-mcp list
uv run mes-doc-mcp validate DOC_ID
uv run mes-doc-mcp mes DOC_ID
uv run mes-doc-mcp export DOC_ID md examples/out/production_report.mdRun the MCP server:
uv run python -m mes_doc_mcp.serverMore detail:
Use this from the repository root:
{
"mcpServers": {
"mes-doc-mcp": {
"command": "uv",
"args": ["run", "python", "-m", "mes_doc_mcp.server"],
"cwd": "/absolute/path/to/MES-mcp"
}
}
}Then ask your AI client:
Ingest examples/sample_production.xlsx.
Inspect sheets, tables, formulas, merged cells, and source ranges.
Extract MES entities and validate quantity consistency.
Propose fixes as PatchIR only. Do not apply changes until I approve.| Format | Read | Patch | Export | Notes |
|---|---|---|---|---|
.xlsx | sheets, ranges, tables, formulas, comments, hyperlinks, merged cells, hidden rows/cols, image/chart metadata | table cells, Excel cells | md/docx/pdf/xlsx | formula overwrite is blocked unless explicitly allowed |
.xlsm | same as xlsx | restricted | md/docx/pdf/xlsx | macros are detected and never executed |
.csv | rows, encoding fallback | table cells | md/docx/pdf/xlsx | UTF-8, CP949, EUC-KR, Latin-1 fallback |
.md | front matter, headings, paragraphs, lists, fenced code, tables, image links | blocks/table cells | md/docx/pdf/xlsx | best round-trip format |
.docx | headings, paragraphs, tables, headers/footers, run style metadata, image metadata | blocks/table cells | md/docx/pdf/xlsx | complex Word XML is not fully round-tripped |
.pdf | pages, text layer, table candidates, image metadata | IR-level edits then regenerate | md/docx/pdf/xlsx | scanned PDFs require OCR outside this project |
Document:
document_ingestdocument_outlinedocument_searchdocument_read_chunkdocument_extract_tablesdocument_inspect_capabilitiesdocument_propose_editdocument_dry_run_editdocument_apply_editdocument_diffdocument_validatedocument_exportExcel:
excel_inspect_workbookexcel_read_rangeexcel_write_rangeexcel_evaluate_formulasexcel_recalculate_workbookMES:
mes_classify_documentmes_extract_entitiesmes_validate_datames_generate_reportmes_export_jsonDefaults are intentionally conservative:
revision_id and approval_id.allow_formula_overwrite=true.Run before publishing changes:
uv sync --extra dev
uv run pytest -q
uv run python -m compileall -q src tests
uv buildCurrent local status:
14 passed
compileall ok
uv build ok
server import oksrc/mes_doc_mcp/
server.py MCP tool/resource/prompt server
cli.py local CLI
models.py DocumentIR, Block, SourceRef, PatchResult
parsers/ Excel, CSV, Markdown, Word, PDF parsers
patches.py PatchIR validation and application
renderers.py md/docx/pdf/xlsx exporters
validation.py structural validation gates
security.py file risk detection
artifacts.py export artifact validation
mes.py MES classification/extraction/validation
office.py optional LibreOffice recalculation helper
tests/ regression and production-gate tests
docs/ public usage docs
examples/ generated sample documents
scripts/ helper scripts.xls and .xlsb need a conversion layer before full support.MIT. See LICENSE.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.