Skip to main content
Glama

pravopys

Python 3.10+ Rust: 2021 (Pure Safe) License: Apache-2.0 Dependencies: Zero Standard: 2026 §§ 1–168 MCP: 12 Stdio Tools

Ukrainian Orthography 2026 (§§ 1–168) catches spelling, apostrophe, euphony, and typography drift before publication — without corrupting Markdown code, LaTeX, URLs, or citations. Built in zero-dependency Python 3.10+ with an optional Pure Safe Rust (#![forbid(unsafe_code)]) scanner, Stdio LSP, and 12-tool MCP server.

Tutorial · Rules Reference (§§ 1–168) · Configuration & Settings · Integrations (LSP / MCP / CI) · Architecture & Rationale · Usage & Examples · Specification & Limitations


Before & After in One Deterministic Pass

RAW DRAFT:
Цей проект обєктно-орієнтованого веб-сайту обєднав пів-Києва,
пів’яблука, грунтовий ганок, тиждневий звіт, группа експертів,
самий кращий вибір за 10 млн. у 2010-2026 рр. з `code` [1].

FIXED & FORMATTED (`pravopys check --fix` + `pravopys format`):
Цей проєкт об’єктно-орієнтованого вебсайту об’єднав пів Києва,
пів яблука, ґрунтовий ґанок, тижневий звіт, група експертів,
найкращий вибір за 10 млн у 2010–2026 рр. з `code` [1].

Notice that inline code `code` and citation [1] stay byte-identical.


Related MCP server: text-integrity

Architecture

flowchart TD
    IN["Input Text (.md, .txt, .wiki, .docx, stdin)"] --> WIRE{"Machine Wire Format?"}
    WIRE -->|"JSON-RPC / SQL / QLOOM / QUIPU"| BYPASS["Bypass Untouched (Law 01)"]
    WIRE -->|"Ukrainian Prose"| RUST["Pure Safe Rust / Python O(N) Scanner"]
    RUST --> SPANS["Protected Spans (Code, URL, LaTeX, Wiki, Citations)"]
    SPANS --> LINT["16 Rule Prefixes (VOW..VUE) covering §§ 1–168"]
    LINT --> FMT["Idempotent Span-Safe Formatter"]
    FMT --> FSM["7-Law Orthographic FSM + SVG Scorecard + SHA-256 Receipt"]

Installation

Install directly from GitHub (Python 3.10+, dependencies = []):

pip install "git+https://github.com/skupriienko/pravopys.git"

For local development with the optional std-only Pure Safe Rust (#![forbid(unsafe_code)]) accelerator:

git clone https://github.com/skupriienko/pravopys.git
cd pravopys
cargo build --release --manifest-path rust/Cargo.toml
pip install -e ".[dev]"

30-Second Quickstart

CLI (Ruff-Compatible Ergonomics)

# Lint files or directories (or '-' for stdin)
pravopys check docs/ --output-format concise
pravopys check article.md --fix --diff

# Check or apply idempotent typographic formatting
pravopys format docs/ --check
pravopys format article.md --range 1:1-20:1

# Inspect rules, defaults, preview rules, and 8,942-entry Покажчик
pravopys default-rules
pravopys preview
pravopys rule APO007
pravopys index пів
pravopys section 36

# Export JSON Schema or inspect resolved config
pravopys config --schema
pravopys config --profile vue-manuscript

# Launch Stdio LSP or 12-tool Stdio MCP server
pravopys server
pravopys mcp

Python SDK

from pravopys import check_text, format_text, lookup_index, preset_defaults, run_pravopys_chain

res = check_text("Цей проект обєднав пів-Києва у 2010-2026 рр.", fix=True)
print(res.fixed_text)
# Цей проєкт об’єднав пів Києва у 2010–2026 рр.

formatted = format_text('Тест - "лапки" , слово  слово.')
print(formatted)
# Тест — «лапки», слово слово.

entries = lookup_index("пів", limit=5)
chain = run_pravopys_chain("Борзна — місто.", profile="vue-manuscript")

Rule Families (100% Coverage of SDM-2026 §§ 1–168)

Prefix

Domain

Official Standard Mapping

VOW

Vowels (і/и/е/о/а, и on word start, alternation)

§§ 1–5, 8–22

CON

Consonants (ґ, assimilation, чн/шн)

§§ 6, 38

EUP

Euphony (у/в, і/й/та, з/із/зі)

§§ 23–25

APO

Apostrophe (м’яч, об’єкт, пів’яблука)

§§ 7, 138

SFT

Soft sign (ь)

§§ 26–27

ALT

Consonant simplification & gemination

§§ 28–30

FOR

Compounding, prefixoids, пів

§§ 35–42

PRE

Prefixes (з-/с-, роз-/без-, пре-/при-)

§§ 31–34

SUF

Suffixes & patronymics

§§ 43–55, 143

CMP

Complex orthograms & hyphenation

§§ 35–42

CAP

Capitalization & DSTU 3582:2013 abbreviations

§§ 56–65

INF

Inflection, degrees, morphological calques

§§ 66–119

LOAN

Loanwords (проєкт, г/ґ, т/ф, аудієнція)

§§ 120–139

PRP

Proper names & Ukrainian surnames

§§ 140–152

PNC

Punctuation & spacing

§§ 153–168

TYP

Typography (’ U+2019, « », —, –, homoglyphs)

Editorial Typographic Canon

VAR

Parallel norm policy (preserve / academic-main / consistent-per-doc)

SDM-2026 Doublet Variants

VUE

Great Ukrainian Encyclopedia Canon (U+0301, NPOV, DSTU 8302:2015)

VUE Editorial Standards

See docs/RULES_REFERENCE.md for the complete reference and docs/CONFIGURATION_AND_SETTINGS.md for pravopys.toml / [tool.pravopys] settings.


MCP Server (12 Tools)

Add to any MCP client (Antigravity, Claude Desktop, Cursor):

{
  "mcpServers": {
    "pravopys": {
      "command": "pravopys",
      "args": ["mcp"]
    }
  }
}

Tools exposed: pravopys_check, pravopys_fix, pravopys_format, pravopys_chain, pravopys_rule, pravopys_rules_catalog, pravopys_lookup_index, pravopys_explain_section, pravopys_fsm, pravopys_config, pravopys_scorecard_svg, pravopys_benchmark.


When NOT to Use

  • Full morphological or syntactic parsing: pravopys is a deterministic span-safe rule linter and typographic formatter, not a statistical POS tagger or dependency parser.

  • Pre-2019 historical orthography preservation: Use variant-policy = "preserve" or skip LOAN/APO rules when archiving historical texts verbatim.

License

Licensed under Apache-2.0 with NOTICE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Zero-dependency stdio bridge to Moltline Studio's fleet of 14 hosted MCP servers covering code review, time operations, data transforms, business ops, education, research, outreach and more. Free tier requires no registration; premium tools unlock with a license. Independently audited, MCPize Verified A.
      10
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides deterministic Unicode 17 text integrity operations—inspection, normalization, comparison, transcoding, security observation, difference explanation, indexing, and protocol profiles—over explicit strings and byte arrays via eight read-only MCP tools.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides deterministic local development tools over stdio MCP, including repository mapping, code review, secret and dependency scanning, release checks, whitelisted checks, scaffolding, and workflow state tracking.
      716 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP-compatible clients and agents to drive SpectraProbe's static analysis engine over stdio, exposing twelve tools for probing targets, inspecting metadata, strings, dependencies, symbols, imports, resources and JavaScript, searching evidence, creating reports, listing providers and checking analysis status.
      2
      MIT