Vale MCP Server

Vale MCP Server

Integrates Vale prose linting into AI coding assistants, enabling users to check text files for style and grammar issues using Vale's powerful linting engine. Provides automated style feedback with smart configuration discovery and rich formatted results.

Category
访问服务器

README

Vale MCP Server

A Model Context Protocol (MCP) server that integrates Vale prose linting into AI coding assistants like Claude Code and Gemini command-line tool.

VS Code MCP Configuration Screenshot

Overview

This MCP server provides AI assistants with the ability to check files for style and grammar issues using Vale's powerful linting engine. It automatically discovers Vale configuration files and provides formatted, actionable feedback about writing quality.

Features

  • ✅ File linting: Check any text file for style issues with Vale.
  • 🔍 Smart config discovery: Automatically finds .vale.ini files using Vale's native upward search.
  • 🎯 Configuration priority: Supports VALE_CONFIG_PATH environment variable for explicit config.
  • 📊 Rich formatting: Returns markdown-formatted results with emojis and severity grouping.
  • 🛡️ Graceful degradation: Provides helpful installation guidance when Vale isn't installed.
  • 🐛 Debug mode: Optional debug logging for troubleshooting.

System requirements

  • Node.js: Version 22 or higher
  • Vale: Version 3.0 or higher

Build from source

# Clone or navigate to the project directory
cd vale-mcp-server

# Build the TypeScript project
make build

Install globally

# Install globally using npm link
make install

This creates a global vale-mcp-server command that you can use from anywhere.

To uninstall:

make uninstall

Using with AI assistants

The Vale MCP server can be integrated with AI coding assistants that support the MCP standard.

Claude Code

Claude Code Screenshot

Add the Vale MCP server to Claude Code using stdio transport:

claude mcp add --transport stdio vale-mcp -- vale-mcp-server

Verify installation:

# List configured servers
claude mcp list

# Check server status
claude mcp get vale-mcp

In Claude Code:

> /mcp
# Shows available MCP tools including vale_status and check_file

See Claude Code MCP documentation for more details.

Gemini CLI

Gemini CLI Screenshot

Add the Vale MCP server to Gemini command-line tool:

gemini mcp add vale vale-mcp-server

Verify installation:

# List configured servers
gemini mcp list

# Check in conversation
/mcp

Refer to the Gemini command-line tool MCP documentation for more details.

GitHub Copilot in VS Code

VS Code MCP Configuration Screenshot

Add the Vale MCP server using VS Code's Command Palette for a quick, no-config setup:

  1. Open the command palette: press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac).

  2. Run Command: Type MCP: Add Server and select it.

  3. Provide Server Information:

    • Name: vale (or any name you prefer)
    • Type: Select stdio
    • Command: vale-mcp-server
    • Arguments: Leave empty or add --debug for debug mode
  4. Choose Scope:

    • User configuration: Available globally across all workspaces
    • Workspace: Available only in the current workspace

Verify in VS Code:

  • Open GitHub Copilot Chat
  • Type /mcp to see available MCP tools
  • The Vale tools should appear in the list

Usage examples

  • "Check docs/guide.md using Vale"
  • "Lint this markdown file: @README.md"
  • "What style issues does Vale find in the documentation?"

Available tools

The server provides three MCP tools:

vale_status

Check if you have installed Vale and can access it.

Returns:

  • Installation status (installed/not installed)
  • Vale version (if installed)
  • Platform-specific installation instructions (if not installed)

Example usage in AI:

"Is Vale installed on this system?"

vale_sync

Download Vale styles and packages by running vale sync. Use this when you encounter errors about missing styles directories.

Parameters:

  • config_path (optional): Path to .vale.ini file. If not provided, uses the server's configured path or searches in the current directory.

Returns:

  • Success/failure status
  • Output from the sync operation
  • Helpful error messages if sync fails

When to use:

  • When you see E100 errors: "The path '/path/to/styles' does not exist"
  • After creating or updating a .vale.ini file
  • When adding new packages to your Vale configuration

Example usage in AI:

"Run vale_sync to download the required styles" "The styles directory is missing, can you sync Vale?"

check_file

Lint a file at a specific path against Vale style rules.

Parameters:

  • path (required): Absolute or relative path to the file

Returns:

  • Formatted markdown with issues grouped by severity
  • Detailed issue information (line, column, rule, message, suggestion)
  • Summary statistics (errors, warnings, suggestions)

Example usage in AI:

"Check the README.md file for style issues"

Command-line options

vale-mcp-server [options]

Options:
  --debug, --verbose, -v    Enable debug logging
  --help, -h                Show help message
  --version                 Show version number

Development

Project structure

vale-mcp-server/
├── src/
│   ├── index.ts         # Main MCP server
│   ├── vale-runner.ts   # Vale execution wrapper
│   ├── config.ts        # Configuration management
│   └── types.ts         # TypeScript type definitions
├── build/               # Compiled JavaScript (generated)
├── tests/               # Test files and fixtures
├── package.json         # Node.js package configuration
├── tsconfig.json        # TypeScript compiler configuration
├── Makefile            # Build and installation tasks
└── README.md           # This file

Building for development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Or use Make
make build

Linting

# TypeScript compilation check
npx tsc --noEmit

# Strict unused code check
npx tsc --noUnusedLocals --noUnusedParameters --noEmit

AI usage disclosure

I've created this project using Claude Code with the Claude 4.5 model.

License

This project is licensed under the MIT License. Refer to the LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选