jp-keigo-guard
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jp-keigo-guard check this Japanese email for double keigo and fix it: 部長がお読みになられました"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JP Keigo Guard
Find double honorifics (二重敬語) and mismatched honorific chains in AI-written Japanese business text, by the rules of the Japanese government guideline 「敬語の指針」. Returns a fix for each one. MCP server, CLI and Python library. Standard library only, no network, MIT.
Language models write polite Japanese that is sometimes too polite in the wrong way: お読みになられる, おっしゃられる, ご覧になられましたか. A Japanese business-writing guide lists "sending AI-generated text without checking it" as one cause of keigo mistakes in email (uravation, updated 2026-10-19). Asking another model to proofread gives a different answer each time. This tool applies fixed rules and gives the same answer every time.
The rules come from 文化審議会答申「敬語の指針」(2007-02-02), chapter 2, section 2-6(2), p.31-32 (PDF):
二重敬語 is one word with the same kind of honorific applied twice. Example from the guideline: お読みになられる. It is generally not appropriate.
The guideline lists forms settled by custom: お召し上がりになる, お見えになる, お伺いする, お伺いいたす, お伺い申し上げる. These are not flagged.
Two honorific words joined by て (敬語連結) are basically allowed: お読みになっていらっしゃる. The guideline lists 伺ってくださる, 伺っていただく, 御案内してくださる, 御案内していただく as inappropriate.
text naive search ("なられ" etc.) this tool
部長がお読みになられました flagged E_DOUBLE_KEIGO → お読みになりました
社長がおっしゃられた件 flagged E_DOUBLE_KEIGO → おっしゃった
ご覧になられましたか flagged E_DOUBLE_KEIGO → ご覧になりました
会場までご案内していただけますか flagged E_BAD_KEIGO_LINK → ご案内いただけますか
明日伺っていただけますか flagged E_BAD_KEIGO_LINK (rewrite: お越しいただけますか)
先生になられる方 flagged (wrong) ok (なる → なられる is a single honorific)
お客様になられる方 flagged (wrong) ok
お召し上がりになってください not flagged ok, listed as accepted by the guidelineOn the 30 bundled cases this tool matches the expected codes 30/30; the naive search gets 25/30. The cases and the rules come from the same author, so treat this as a regression suite, not proof.
Codes
Code | Severity | Example | Fix |
| error | お読みになられる, おっしゃられる, いらっしゃられる, ご覧になられる, 召し上がられる, なさられる | drop the extra られ, keep the tense: お読みになりました |
| warning | ご出席になられる | ご出席になる. Warning only: after a plain noun (ご両親になられる) なられる is correct |
| error | 伺っていただく, ご案内していただく (listed in the guideline) | ご案内いただく; 伺う needs a different verb (お越し), so no automatic fix |
| warning | ご説明していただけますか, お送りしてくださる | ご説明いただけますか, お送りくださる |
ok is false when any error is found. Each issue has text, start, end, fix, reason and source (the guideline page).
Related MCP server: readability-mcp-server
Limits
It checks word forms, not meaning. It cannot tell whether a 尊敬語 is used for the writer's own action (私がおっしゃった), whether the reader is a superior, or whether the tone fits. Use it as a fast first pass before a person or a model reads the text.
MCP server (for AI agents)
{"mcpServers": {"jp-keigo-guard": {"command": "python", "args": ["-m", "keigoguard.server"], "cwd": "/path/to/jp-keigo-guard"}}}Tool | Input | Returns |
|
|
|
|
|
|
Both tools are read-only and offline. Suggested agent rule: after writing a Japanese email or notice, call jp_keigo_check, fix every error and rewrite the items in unfixed before sending.
MCP protocol: the stdio server speaks both the classic initialize flow (2025-06-18 and earlier) and the stateless 2026-07-28 revision (server/discover, per-request _meta). Tested in tests/test_mcp_2026.py.
MCP の新しい版(2026-07-28・server/discover)と従来の initialize の両方で動きます。
CLI and Python
python -m keigoguard mail.txt # JSON report, exit 1 on an error
python -m keigoguard --fix mail.txt # print the fixed text
python -m keigoguard.bench # score on data/jp_keigo_cases_v1.jsonlfrom keigoguard import check, fix
check("部長がおっしゃられた件です")["issues"][0]["fix"] # 'おっしゃった'
fix("ご案内していただけますか")["text"] # 'ご案内いただけますか'Files
keigoguard/guard.py: check(text), fix(text, apply_warnings=False)
keigoguard/server.py: MCP stdio server
data/jp_keigo_cases_v1.jsonl: 30 fictional sentences with expected codes
tests/test_keigoguard.py
日本語
AIが書いた日本語のメール・案内文から、二重敬語(お読みになられる・おっしゃられる・ご覧になられる)と、「敬語の指針」(文化審議会答申、平成19年)が不適切とする敬語連結(伺っていただく・ご案内していただく)を見つけ、直し案を返します。指針が「習慣として定着している」とする お召し上がりになる・お見えになる・お伺いする などは指摘しません。決まった規則なので、同じ文には毎回同じ答えを返します。標準ライブラリだけ・外部通信なし・MIT。
できないこと
文の形だけを見ます。自分の動作に尊敬語を使っていないか、相手が目上か、といった意味の判断はしません。送る前の最初の確認として使ってください。
License
MIT
Available Tools
2 toolsjp_keigo_checkFind double honorifics (二重敬語) and mismatched honorific chains in Japanese textARead-onlyIdempotent
Before you send a Japanese business email, notice or reply you wrote, pass the text here. Finds 二重敬語 (お読みになられる, おっしゃられる, いらっしゃられる, ご覧になられる, 召し上がられる) and the honorific chains that the Japanese government guideline 「敬語の指針」 (文化審議会答申 2007, p.31-32) lists as inappropriate (伺っていただく, ご案内していただく, ご説明してくださる). Forms the guideline accepts as settled by custom (お召し上がりになる, お見えになる, お伺いする/いたす/申し上げる) are not flagged. Returns ok, issues (code, severity, text, start, end, fix, reason, source), accepted, counts. Codes: E_DOUBLE_KEIGO, W_DOUBLE_KEIGO_NOUN (ご+noun+になられる, may be correct), E_BAD_KEIGO_LINK, W_BAD_KEIGO_LINK. Deterministic, offline. It checks word forms only, not whether 尊敬語 is used for the writer's own action. 二重敬語と不適切な敬語連結を見つけて直し案を返す。
Inputs: text (required).
jp_keigo_fixRewrite double honorifics in Japanese text to the single formARead-onlyIdempotent
Returns the text with error-level fixes applied (お読みになられました → お読みになりました, おっしゃられた → おっしゃった, ご案内していただけますか → ご案内いただけますか). Warning-level fixes only when apply_warnings is true. Issues that need a different verb (伺っていただく → お越しいただく) are returned in unfixed for you to rewrite. Returns text, applied, unfixed, remaining.
Inputs: text (required), apply_warnings.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
jp_keigo_check is read-only diagnosis (returns issues, codes, severities) while jp_keigo_fix applies those fixes and returns the rewritten text. The descriptions make the analyze-vs-mutate split explicit, and the fix tool even references the same issue model, so an agent cannot reasonably pick the wrong one.
Both tools follow an identical namespace_verb pattern (jp_keigo_check, jp_keigo_fix) with the same domain prefix and a clear action verb. No mixing of conventions or vague verbs anywhere in the set.
Two tools is thin in the abstract, but this server is a single-purpose linter and the detect/fix pair is exactly the surface such a utility needs. Nothing is padded or redundant; a third tool would only be justified by a new capability, not a new wrapper.
The check-then-fix lifecycle is closed: detection returns codes, fixes, reasons and sources, and the fixer reports both applied and unfixed items so the agent knows where to rewrite manually. Minor gaps remain (no batch/multi-paragraph mode, no way to filter severity from the check call, no explanation-only output for teaching), but agents can work around all of these.
Maintenance
Related MCP Connectors
Cutting AI slop is real productivity. Editorial and artifact linter for docs, web UI & slides.
DraftCheck: flags AI-writing patterns in prose with fix hints. Deterministic linter, not a detector.
Estimates automation time savings, drafts automation specs, and checks Japanese ad copy. Read-only.
Audits outbound emails for clarity, respect, and higher reply rates
Related MCP Servers
- AlicenseAqualityCmaintenanceL1-aware grammar, style, translation & tone tools with 70 local rules. Zero API keys needed.4MIT
- AlicenseAqualityDmaintenanceLets any AI agent score and simplify its own text before it reaches a human, using Flesch readability metrics and plain-language rewrites entirely on the local machine.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables 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
- AlicenseAqualityCmaintenanceEnables 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.515 npmMIT