grammar-police
Provides automated grammar checking by intercepting user input and returning correction instructions for MCP-compatible clients like Claude Desktop and Claude Code.
README
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:
- You configure Claude to send your raw input to this tool first.
- The tool returns your text along with correction instructions.
- 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.
✅ Prerequisites
- Node.js (v18 or higher)
- npm (usually comes with Node.js)
- One of the following clients:
- Claude Desktop App (GUI)
- Claude Code (CLI)
📦 Installation
Option 1: Install from npm (Recommended)
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)
- Open your Project in Claude.
- Click Project Settings (or Edit).
- 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 thecheck_grammartool 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 servernpm run dev: Watch mode for development
📄 License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。