Skip to main content
Glama

Grammar Police MCP Server 👮‍♂️✍️

An MCP (Model Context Protocol) server that provides automated grammar checking capabilities to MCP-compatible clients like Claude Desktop and Claude Code.

📖 How It Works

This server exposes a check_grammar tool. The workflow is designed as a "middleware" style interception:

  1. You configure Claude to send your raw input to this tool first.

  2. The tool returns your text along with correction instructions.

  3. Claude (the LLM) performs the actual correction based on the tool's output before answering your technical question.

This design keeps the server lightweight while leveraging the LLM's full language understanding capabilities.

Related MCP server: Grammar Fix AI MCP

✅ Prerequisites

📦 Installation

No manual download required. You can run it directly via npx.

npm install -g grammar-police-mcp

Option 2: Clone from GitHub (For Development)

# Clone the repository
git clone [https://github.com/acforu/grammar-police-mcp.git](https://github.com/acforu/grammar-police-mcp.git)
cd grammar-police-mcp

# Install dependencies
npm install

# Build the project
npm run build

⚙️ Configuration

⚠️ Important: Claude Desktop (GUI) and Claude Code (CLI) use different config files. Please follow the section matching your tool.

🖥️ For Claude Desktop (GUI)

Config File Location:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Add grammar-police to the mcpServers object.

If using npm (Option 1):

macOS:

{
  "mcpServers": {
    "grammar-police": {
      "command": "npx",
      "args": ["-y", "grammar-police-mcp"]
    }
  }
}

Windows:

{
  "mcpServers": {
    "grammar-police": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "grammar-police-mcp"]
    }
  }
}

(Note: On Windows, cmd /c is required to invoke npx correctly.)

If using Source Code (Option 2):

macOS:

{
  "mcpServers": {
    "grammar-police": {
      "command": "node",
      "args": ["/absolute/path/to/grammar-police-mcp/build/index.js"]
    }
  }
}

Windows:

{
  "mcpServers": {
    "grammar-police": {
      "command": "node",
      "args": ["C:\\absolute\\path\\to\\grammar-police-mcp\\build\\index.js"]
    }
  }
}

(Note: Replace paths with your actual project location. Ensure your build output folder is build.)


⌨️ For Claude Code (CLI)

Config File Location:

  • Windows: %USERPROFILE%\.claude.json

  • macOS/Linux: ~/.claude.json

  • *Or configure per-project in your project's .claude.json*

Add the server configuration using the same JSON format as the Desktop version above.

🚀 Usage

Since this tool is passive (it doesn't fix things unless you ask it to), you must instruct Claude to use it on every message.

Method A: Claude Desktop (Project Instructions)

  1. Open your Project in Claude.

  2. Click Project Settings (or Edit).

  3. Add the following to Project Instructions (System Prompt):

GLOBAL INSTRUCTION: You have access to a tool named grammar-police. For every user message, you MUST first run the check_grammar tool on the raw input to check for errors. Display the corrections if any, then proceed to answer the user's request.

Method B: Claude Code (CLAUDE.md)

Create or edit the CLAUDE.md file in your project root:

## Tool Usage
You have access to a tool named `grammar-police`. Call the `check_grammar` tool with the user's raw input to check for English grammar errors before generating your response.

Verify It Works

Restart Claude. Type a message with intentional errors:

"i write code good."

Claude should call the tool and respond with a correction before answering.

🛠️ Development

  • npm run build: Compile TypeScript to JavaScript (outputs to /build)

  • npm start: Run the compiled server

  • npm run dev: Watch mode for development

📄 License

MIT

Available Tools

1 tool
check_grammarA

Check and correct English grammar in the provided text. Returns corrections in a structured format.

When you receive the text, analyze it for grammar errors and respond with:

  • "original" -> "corrected" for each error found

  • Corrected: "full corrected sentence"

  • If no errors: "No grammar issues."

IGNORE: Capitalization, punctuation, technical terms/variable names, error/warning logs.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text to check for grammar errors

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains exactly what the tool returns: per-error original-to-corrected pairs, a full corrected sentence, and a no-errors message. It also documents the tool's scope by listing ignored categories. This is transparent for a text-processing tool, though it does not mention side effects or whether the tool is read-only (likely irrelevant here).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the primary purpose. It uses bullets to present output format details and an IGNORE section for scope boundaries. Every sentence contributes value, and there is no fluff or redundancy. It is appropriately sized for the information it conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Since there is no output schema, the description fully explains return values, including the structured correction format, the full corrected sentence, and the no-errors case. It also covers edge cases through the IGNORE list. Nothing an agent would need to know to call this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% because the single parameter 'text' is described as 'The text to check for grammar errors.' The tool description does not add substantial new meaning beyond the schema; it only repeats that the text is provided and indicates the analysis flow. Baseline 3 is appropriate since the schema already fully documents the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Check and correct English grammar in the provided text.' It names the specific verb (check/correct), resource (English grammar in text), and even specifies the output format. No siblings exist, so differentiation is not needed; the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool: whenever grammar checking of English text is needed. It also gives explicit guidance on what to ignore (capitalization, punctuation, technical terms, logs), which helps the agent know what not to expect from the tool. Since there are no sibling tools, exclusion guidance is not required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev1.0.2
    • First observedcheck_grammar

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

There is only one tool, so there are no overlapping purposes to confuse. An agent can unambiguously select check_grammar for any grammar-related request.

Naming Consistency5/5

The single tool name 'check_grammar' follows a clean verb_noun convention and accurately reflects its function. With only one tool, there are no inconsistent naming patterns to weigh against it.

Tool Count3/5

A single tool is minimal and, by the rubric, feels thin for a server-level surface. However, grammar checking is a narrow domain, so the count is borderline rather than an extreme mismatch.

Completeness5/5

The tool covers both detection and correction of grammar errors and returns a structured result, including an explicit no-errors case. No obvious operations are missing for the stated grammar-checking purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    Offline spell check and BYOK grammar checking for AI assistants. 100% offline spell check via nspell (zero tokens, zero API calls). BYOK grammar checking with your own Gemini, OpenAI, or Claude API key. Works with Claude Desktop, Cursor, ChatGPT, and any MCP-compatible tool. 8 languages supported.
    -
  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that gives Claude AI the ability to read, analyze, modify, and debug ANTLR4 grammars, enabling grammar debugging and manipulation for Claude Desktop.
    55
    -