
MCP server for Grammarly AI detection and plagiarism scoring via Stagehand + Browserbase browser automation, with Claude-powered text optimization
概览
Single-tool Model Context Protocol (MCP) server for AI detection and plagiarism scoring via Grammarly's web interface. Supports two browser automation providers: (default) and (fallback). - Automates Grammarly's docs UI to get AI detection and plagiarism percentages - Rewrites text via Claude to reduce AI detection scores - Exposes one MCP tool: grammarly_optimize_text This server interacts with app.grammarly.com through browser automation. It does not use Grammarly APIs. Node.js 18+, Grammarly Pro account, Browserbase account Node.
README
以下为原文 README 节选,完整内容请查看原文。
Grammarly MCP Server
Single-tool Model Context Protocol (MCP) server for AI detection and plagiarism scoring via Grammarly’s web interface. Supports two browser automation providers: Stagehand + Browserbase (default) and Browser Use Cloud (fallback).
What it does
- Automates Grammarly’s docs UI to get AI detection and plagiarism percentages
- Rewrites text via Claude to reduce AI detection scores
- Exposes one MCP tool:
grammarly_optimize_text
Note: This server interacts with app.grammarly.com through browser automation. It does not use Grammarly APIs.
Table of Contents
- Quick Start
- Features
- Requirements
- Installation
- Provider Selection
- Environment Variables
- Running the Server
- Client Configuration
- Tool: grammarly_optimize_text
- Session Persistence
- How It Works
- Development
- Troubleshooting
- Security Considerations
- Notes and Limitations
- License
Quick Start
Option A: Stagehand + Browserbase (Recommended)
Prerequisites: Node.js 18+, Grammarly Pro account, Browserbase account
# 1. Clone and build
git clone https://github.com/BjornMelin/grammarly-mcp.git
cd grammarly-mcp
pnpm install && pnpm build
# 2. Get Browserbase credentials
# - Sign up at https://www.browserbase.com
# - Create a project, note the Project ID
# - Generate an API key
# 3. Set up Claude Code CLI (for text rewriting)
npm install -g @anthropic-ai/claude-code
claude login
# 4. Configure environment
cp .env.example .env
# Edit .env with your Browserbase credentials
# 5. Add to Claude Code
claude mcp add grammarly -- node $(pwd)/dist/server.js
# 6. Test
claude "Use grammarly_optimize_text with mode score_only on: Hello world test"
Option B: Browser Use Cloud (Legacy)
Prerequisites: Node.js 18+, Grammarly Pro account, Browser Use Cloud account
# 1. Clone and build
git clone https://github.com/BjornMelin/grammarly-mcp.git
cd grammarly-mcp
pnpm install && pnpm build
# 2. Get Browser Use credentials
# - Sign up at https://cloud.browser-use.com
# - Create API key (bu_...)
# - Create profile and sync Grammarly login (profile_...)
# 3. Set up Claude Code CLI
npm install -g @anthropic-ai/claude-code
claude login
# 4. Configure environment
cp .env.example .env
# Set BROWSER_PROVIDER=browser-use and Browser Use credentials
# 5. Add to Claude Code
claude mcp add grammarly -- node $(pwd)/dist/server.js
Features
- Dual provider support: Stagehand + Browserbase (default) or Browser Use Cloud (fallback)
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"grammarly": {
"command": "node",
"args": ["/path/to/grammarly-mcp/dist/server.js"],
"env": {
"BROWSER_PROVIDER": "stagehand",
"BROWSERBASE_API_KEY": "bb_xxx",
"BROWSERBASE_PROJECT_ID": "xxx"
}
}
}
}