Skip to main content
Glama
obper-mcp
by masoudroot

persian-writing-mcp

tests License: MIT

این چیست؟

مغز دوم یک ویراستار حرفه‌ای فارسی.

۱۵۷۷ نکتهٔ ویراستاری در خودش دارد؛ از رسم‌الخط و نشانه‌گذاری و دستور زبان تا جمله‌بندی، واژه‌گزینی، لحن، ساختار متن و قالب‌های آماده. چیزهایی که یک ویراستار حرفه‌ای در سال‌ها کار یاد می‌گیرد، این‌جا یک‌جا جمع شده است. این دانش به هر برنامهٔ هوش مصنوعی وصل می‌شود؛ مثل Claude Desktop، Cursor و n8n.

کافی است متن را بدهی. اول خودش متن را می‌خواند و ایرادهایش را پیدا می‌کند؛ بعد از میان این نکته‌ها، برای همان ایرادها یک چک‌لیست مخصوص می‌سازد. هوش مصنوعی با همان چک‌لیست متن را ویراستاری می‌کند، یک بازبینِ دیگر آن را کنترل می‌کند، و در آخر، خودش یک بررسی نهایی هم می‌کند. در آخر یک متن تمیز تحویل می‌گیری؛ همراه با گزارشی که نشان می‌دهد چه چیزهایی درست شد.

Related MCP server: circe-mcp

این ۱۵۷۷ نکته چه چیزهایی را پوشش می‌دهد؟

حوزهٔ دانش

تعداد نکته

تمرین‌ها و نمونه‌های تحلیلی

۲۱۸

نویسندگی خلاق و ادبی

۱۸۴

بلاغت و آرایه‌های ادبی

۱۵۲

نثر کاربردی معاصر

۱۳۰

آموزشگاه ویراستار

۱۲۱

تولید محتوای دیجیتال

۱۱۵

رسم‌الخط و نشانه‌گذاری

۹۳

دستور زبان فارسی

۹۳

فرایند حرفه‌ای نوشتن

۷۶

واژه‌گزینی و درست‌نویسی

۷۲

ویرایش و بازنویسی

۷۰

جمله و پاراگراف

۵۷

سبک و نثر فارسی

۵۳

چک‌لیست‌ها و برگه‌های تقلب

۴۸

قالب‌ها و الگوهای آماده

۴۵

واژه‌نامه و نمایه

۲۳

منابع و کتاب‌شناسی

۱۴

راهنمای استفاده و نقشهٔ راه

۱۳

چه چیزهایی را درست می‌کند؟

در چهار لایه، از سطح خط تا سطح فکر:

  • خط و نشانه: حروف عربیِ قاطی‌شده (ي، ك)، نشانه‌گذاری لاتین، نیم‌فاصله‌های جاافتاده («می شود» به‌جای «می‌شود»).

  • جمله: جمله‌های بلند و خسته‌کننده، حشو اداری («می‌باشد»، «لذا»، «گردید»)، مجهول‌های بی‌جا، شروع‌های تکراری که ریتم متن را یکنواخت می‌کند.

  • واژه و لحن: واژهٔ نامناسب، لحن ناهماهنگ با مخاطب، کلیشه‌های فرسوده («در دنیای امروز»، «شایان ذکر است»).

  • کل متن: بندهای شلوغ و بی‌سروته، پرش از موضوعی به موضوع دیگر، شروع و پایان ضعیف، ساختاری که به نوع متن نمی‌خورد.

نکتهٔ مهم: بازبینی عمیق (انسجام، ریتم، وحدت بند، ساختار) برای هر متن انجام می‌شود؛ حتی اگر غلط سطحی نداشته باشد. ویراستار حرفه‌ای فقط دنبال غلط املایی نیست.

یک نمونه. این جمله:

این گزارش می‌باشد که توسط تیم ما تهیه گردیده است و لذا جهت استحضار مدیریت ارسال می شود.

این‌طور تمیز می‌شود.

تیم ما این گزارش را تهیه کرده و برای مدیریت فرستاده است.

چطور کار می‌کند؟

۱. تمیزکاری اولیه: ایرادهای ساده و مشخص (مثل حروف عربی) خودکار درست می‌شوند. ۲. معاینه: ایرادهای متن پیدا می‌شود؛ بعد همهٔ حوزه‌های دانش (از رسم‌الخط تا ساختار) یکی‌یکی متن را می‌سنجند و برای هر حوزه نکته‌های مخصوص همان متن آورده می‌شود. ۳. ویراستاری: هوش مصنوعی با چک‌لیست، متن را ویراستاری می‌کند. ۴. بازبینی: یک بازبینِ دیگر، تک‌تک بندهای چک‌لیست را روی متن کنترل می‌کند؛ اگر چیزی جا مانده باشد، برمی‌گردد برای اصلاح (تا ۴ بار). ۵. کنترل نهایی: آخرش هم خودش بررسی می‌کند که چیزی جا نمانده باشد؛ اگر موردی نیاز به نظر انسان داشته باشد، در گزارش اعلام می‌شود.

شروع سریع

به پایتون ۳.۱۰ یا بالاتر نیاز دارید.

اگر داکر نداری، با pip نصبش کن.

pip install git+https://github.com/masoudroot/persian-writing-mcp.git
obper-mcp

یا با داکر؛ از ریشهٔ ریپو بیلد بگیر.

docker build -t persian-writing-mcp .
docker run -p 8060:8060 -e OP_MCP_API_KEY=<redacted>

وصل شدن به برنامه‌ها

  • Claude Desktop و Cursor: همین دستور obper-mcp را به‌عنوان ابزار اضافه کنید؛ بعد در هر گفت‌وگو می‌توانید بخواهید متنتان را ویراستاری کند.

  • n8n: دو ورک‌فلوی آمادهٔ ایمپورت در پوشهٔ examples هست (یکی ساده برای کار روزمره، یکی کامل با همهٔ مرحله‌های بالا)؛ راهنمایش در docs/n8n.md است.

  • کد خودتان: راهنمای کامل الگو با نمونه‌کد در docs/deep-edit.md است.

اگر برنامه‌تان روی شبکه است، این دستور سرور را راه می‌اندازد.

obper-mcp --transport streamable-http --port 8060 --api-key SECRET

برای توسعه‌دهندگان

۱۱ ابزار دارد؛ مهم‌ترین‌ها این‌هایند.

ابزار

چه می‌کند

smart_rules

متن را می‌خواند و برای ایرادهایش چک‌لیست مخصوص می‌سازد

mechanical_pass

تمیزکاری خودکارِ بدونِ حدس + کنترل نهایی

verify_regression

چک می‌کند ایرادهای پیدا شده واقعاً حل شده‌اند یا نه

diff_report

فهرست دقیق همهٔ تغییرها، برای حسابرسی

rule_pack

چک‌لیست کوتاه برای یک نوع متن (مثلاً گزارش رسمی)

search / ruling / read_note

جست‌وجو و خواندن نکته‌ها

مشارکت

ایده و پول‌ریکوئست (درخواست ادغام) خوش می‌آید. پیش از پوش، تست‌ها را با این دو دستور اجرا کنید.

python tests/test_smoke.py
python tests/test_golden.py

لایسنس

لایسنس MIT است؛ فایل LICENSE را ببینید.

Available Tools

11 tools
deep_rulesDeep RulesA

Build the full multi-dimensional checklist for deep Persian editing.

General-purpose (not n8n-specific): any agent calls this once, then runs the deep-edit loop itself —

  1. edit the text against checklist (all rules),

  2. review the edited text rule-by-rule, list remaining issues as JSON,

  3. fix only those issues; repeat 2-3 until clean (max ~4 passes),

  4. final read-through for rhythm, typos, native ear. Combines the task-type rule_pack with the five fixed editorial dimensions (نیم‌فاصله، نشانه‌گذاری، جمله، واژه، لحن); dedupes by note id. Returns checklist as a ready-to-paste string plus structured rules.

Inputs: task_type (required), per_dim. Returns: object

diff_reportDiff ReportB

Deterministic change ledger: every span the pipeline changed.

Word-level diff with context. Lets any human audit exactly what the system did to the text, without trusting the model's own account.

Inputs: after_text (required), before_text (required). Returns: object

map_vaultMap VaultB

The vault's section tree (numbered sections) with note counts.

Inputs: no named parameters. Returns: object

mechanical_passMechanical PassA

Deterministic mechanical fix + verification gate for Persian text.

Fixes what needs no judgment (Arabic ي/ك, Latin , ; ? %, straight quotes, ZWNJ on می/نمی, spacing) and proves the result: remaining lists any mechanical issue left, clean is true only when none remain. Use it as the first step (so the LLM works on a clean base) and as the final gate (so nothing ships with mechanical errors). Ambiguous cases (em/en dashes) are flagged in remaining, never guessed.

Inputs: text (required). Returns: object

read_noteRead NoteA

Read a full note from the vault by its id (as returned by search).

Inputs: note_id (required), max_chars. Returns: object

reindexReindexA

Rebuild the search index (run after notes are added/edited).

Inputs: no named parameters. Returns: object

rule_packRule PackA

Build the compact «بستهٔ قاعده» checklist for a Persian writing task.

task_type is one of: گزارش رسمی، ایمیل اداری، لندینگ، مقاله، کپشن، نامهٔ اداری، پروپوزال، خبر، مصاحبه، متن وب، پست شبکهٔ اجتماعی، جواب چت. (Any other value is used as a free-form search query.) Runs seed queries through the vault, keeps only status=verified notes, and returns up to max_rules items as «عنوان: حکم کوتاه». This is step 2-3 of the «حالت کامل» pipeline in the Persian OS.

Inputs: task_type (required), max_rules. Returns: object

rulingRulingB

Get the vault's short editorial ruling for a question/doubt.

Searches the vault, takes the best note, and returns its short ruling (پاسخ کوتاه / نکتهٔ ویرایشی / قاعده یا سازوکار) with the note id. Use this as the virtual editor's verdict before finalizing Persian text.

Inputs: query (required). Returns: object

smart_rulesSmart RulesA

Diagnose Persian text, then build a tailored deep-edit checklist.

Smarter than deep_rules: instead of a fixed checklist, the text is first scanned for editorial risk signals (long sentences, bureaucratic fossils, Arabic chars, Latin punctuation, ZWNJ issues, quotes, numbers, cliches, repetition, ...). Rules are then pulled for the issues actually present, ordered by signal weight; every rule carries why (the evidence that selected it). Layer 1 is always the task-type rule_pack. General-purpose: any agent runs the edit -> review loop itself.

Inputs: text (required), task_type (required), max_rules. Returns: object

verify_regressionVerify RegressionA

Objective regression gate: every problem signal diagnosed in the input text must be gone in the output text.

Pure diagnose() comparison, no LLM. Returns resolved/remaining lists and a boolean pass. This is the pipeline's proof of work — "everything we detected, we fixed."

Inputs: after_text (required), before_text (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 11 tools

    Disambiguation3/5

    The three rule-building tools (rule_pack, deep_rules, smart_rules) overlap heavily — all produce editing checklists for Persian text, and the distinctions (compact vs full vs diagnostic-driven) are subtle enough that an agent could easily misselect. Similarly, search, ruling, and rule_pack all query the same vault, with boundaries explained only in prose. The mechanical_pass/verify_regression/diff_report trio is more clearly separated by their distinct gate/ledger roles.

    Naming Consistency4/5

    All names are lowercase snake_case with no camelCase mixing, which is a solid baseline. However, the pattern shifts between verb_noun (read_note, map_vault, verify_regression, diff_report) and bare noun/verb forms (search, reindex, ruling), so the convention is mostly but not fully predictable.

    Tool Count4/5

    Eleven tools is a reasonable scope for a Persian editing pipeline plus vault access. It is slightly heavy given that three of them (rule_pack, deep_rules, smart_rules) occupy nearly the same slot, suggesting some consolidation is possible, but nothing is wildly out of range.

    Completeness4/5

    The editing pipeline is well-covered end to end: diagnose (smart_rules), fix (mechanical_pass), verify (verify_regression), and audit (diff_report), plus vault access via search/read_note/map_vault/reindex. The vault side is read-only with no note creation or update, but that may be intentional if notes are authored elsewhere, so the gap is minor.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI hosts to check text for grammar, spelling, and style errors, measure readability, and generate tone-adjusted rewrites through structured tool calls. Every tool returns predictable, typed output for reliable routing and results.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables deterministic, LLM-free checking of text against a prose editorial standard, returning violations with rule IDs, locations, severity, confidence, and suggested fixes, while also supporting safe fixes and writing measurements.
      5
      14 npm
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to work with Iran-specific data and Persian/RTL frontends fully offline, covering Jalali date conversion, national ID, card, Sheba and mobile validation, Persian text and number formatting, bank and operator lookup, VAT and price handling, plus RTL auditing and CSS/Tailwind conversion. All tools run locally with no API keys.
      56
      54 npm
      5
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Lints English and Persian marketing copy for AI tells, puffery, facts missing from the brief, and channel limits, and loads copywriting playbooks and brand voice profiles. Runs locally with the Python standard library and makes no network calls. Made by Whalya, a product-led venture studio.
      2
      6
      -