mcp-grammar-checker
mcp-grammar-checker
LanguageTool の文法・スタイルチェックをツールとして公開する小さな MCP サーバーです。MCP クライアント(Claude Code、Claude Desktop、その他 MCP 互換ホスト)からテキストの問題を直接チェックできます。
なぜ
AI コーディングアシスタントに、モデル自身の判断だけに頼るのではなく、実際のツールを介した文法・スタイルチェック機能を提供するために作成しました。また、Solution Architect AI アプリケーション向けに MCP を実践的に学ぶことも目的としています。
Related MCP server: Writing Tools MCP Server
プロセスノート
最初は手作業で(公式の mcp SDK を直接使い、チュートリアルに従うのではなく、インストール済みパッケージを調べて現在の API を発見しながら)構築しました。その後、Anthropic 公式の mcp-server-dev:build-mcp-server スキルのガイド付きプロセスに沿って再構築しました。このプロセスにより、デプロイ方法の選択(ローカル stdio — これは個人用の単一ユーザーツールであり、配布を意図したものではない)は確認できましたが、フレームワークは変更されました。Python サーバーには、mcp SDK に同梱されている凍結された FastMCP 1.0 ではなく、FastMCP 3.x(PyPI の fastmcp パッケージ、jlowin 作)を推奨しています。このリポジトリは、その2回目のガイド付きパスを反映しています。
ツール
check_grammar(text: str, language: str = "de-DE") -> str
指定されたテキストを公開 LanguageTool API でチェックし、見つかった問題の整形済みリスト(メッセージ、提案された置換、周囲のコンテキスト)を返します。問題が見つからなかった場合はその旨を返します。
セットアップ
Python 3.12 以上と uv が必要です。
git clone <this-repo>
cd mcp-grammar-checker
uv sync単体での実行
uv run python server.pyサーバーは stdio で通信し、MCP クライアントから起動されることを想定しています。対話的に実行するものではありません。
Claude Code / Claude Desktop での使用
MCP 設定(例: .claude/settings.json または Claude Desktop の設定ファイル)に追加します:
{
"mcpServers": {
"grammar-checker": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/mcp-grammar-checker", "python", "server.py"]
}
}
}クライアントを再起動すると、check_grammar ツールが利用可能になります。
注意事項
公開 LanguageTool API(
api.languagetool.org)を使用しており、レート制限があります。より頻繁に使用する場合は、LanguageTool をセルフホストできます。LanguageTool がサポートする任意の言語(例:
en-US、de-DE、fr)をlanguageパラメータで指定できます。
Available Tools
1 toolcheck_grammarB
Check text for grammar, spelling, and style issues using LanguageTool.
Inputs: text (required), language. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of ambiguity or misselection. The purpose is clearly singular and distinct.
There is only one tool, so the naming is trivially consistent. The verb-noun pattern ('check_grammar') is clear and follows a predictable convention.
A single tool feels thin for a server, though the scope is narrow (grammar checking). It is borderline per the calibration, likely sufficient for its stated purpose but minimal.
The tool covers grammar, spelling, and style checking, which appears to be the entire domain. There are no obvious missing operations for a grammar-checking service.
Maintenance
Related MCP Connectors
MCP server for Speech-to-Text
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
MCP server for Text-to-Speech
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceGrammar Fix AI - MCP server providing AI-powered tools and automation by MEOK AI Labs7 npm38 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceMCP server offering text analysis tools for writing improvement, including spellcheck, readability, keyword analysis, passive voice detection, and AI-generated content detection.11MIT
- FlicenseNot gradedqualityDmaintenanceA professional MCP server for analyzing content against the official Microsoft Writing Style Guide, enabling style, grammar, terminology, and accessibility checks via AI tools like VS Code and GitHub Copilot.1-
- AlicenseAqualityDmaintenanceThis MCP server provides direct access to ruff linting, formatting checks, and ty type-checking for Python projects, with token-efficient, structured output.9MIT