Skip to main content
Glama

mcp-grammar-checker

一个小型 MCP 服务器,将 LanguageTool 的语法和风格检查作为工具暴露出来,使 MCP 客户端(Claude Code、Claude Desktop 或任何其他兼容 MCP 的主机)可以直接检查文本问题。

为什么

构建目的是为 AI 编码助手提供一种真实的、由工具支持的语法/风格检查方式——而不是仅依赖模型自身的判断——同时为 Solution Architect AI 应用动手学习 MCP。

Related MCP server: estonian-mcp

构建过程说明

最初手工构建(直接针对官方 mcp SDK,通过检查已安装的包来发现其当前 API,而不是遵循教程)。后来按照 Anthropic 官方 mcp-server-dev:build-mcp-server 技能的引导流程重新构建,该流程确认了部署选择(本地 stdio——这是一个单用户个人工具,并非用于分发),但改变了框架:它推荐使用 FastMCP 3.x(PyPI 上的 fastmcp 包,作者为 jlowin)来编写 Python 服务器,而不是 mcp SDK 中捆绑的冻结版 FastMCP 1.0。本仓库现在反映的是第二次、引导式的构建过程。

工具

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),该 API 有速率限制。对于更重的使用场景,LanguageTool 可以自托管

  • 通过 language 参数支持 LanguageTool 支持的任何语言(例如 en-USde-DEfr)。

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    An MCP server that integrates EstNLTK to provide Estonian language tools (morphology, spell-check, synonyms, etc.) for AI agents, enabling correct Estonian text processing and generation.
    26
    17
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server offering text analysis tools for writing improvement, including spellcheck, readability, keyword analysis, passive voice detection, and AI-generated content detection.
    10
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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

View all related MCP servers

Related MCP Connectors

  • MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.

  • MCP server for generating rough-draft project plans from natural-language prompts.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/olga1988olga/mcp-grammar-checker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server