YanceLint MCP Server

YanceLint MCP Server

Enables AI coding assistants like Claude Code to perform real-time code linting and get violation summaries from tools such as ESLint, Stylelint, P3C, and Checkstyle via a local server.

Category
Visit Server

README

YanceLint MCP Server

npm License

让 AI(Claude Code)实时感知代码规约违规。

简介

YanceLint MCP Server 是 YanceLint 的 Model Context Protocol (MCP) 接口,让支持 MCP 的 AI 工具(如 Claude Code)能够实时获取代码规约检查结果。

安装

无需手动安装,Claude Code 通过 npx 自动拉取最新版本。只需在项目中配置 MCP Server 即可(见下方「注册到 Claude Code」)。

如需手动运行:

npx @xihe-lab/yance-mcp-server

注册到 Claude Code

方式一:项目级配置(推荐)

在项目根目录创建 .mcp.json,团队成员共享:

{
  "mcpServers": {
    "yancelint": {
      "command": "npx",
      "args": ["-y", "@xihe-lab/yance-mcp-server"]
    }
  }
}

方式二:全局配置

在 ~/.claude/settings.json 中添加,所有项目生效:

{
  "mcpServers": {
    "yancelint": {
      "command": "npx",
      "args": ["-y", "@xihe-lab/yance-mcp-server"]
    }
  }
}

方式三:全局安装后使用

npm install -g @xihe-lab/yance-mcp-server

配置中直接使用命令名:

{
  "mcpServers": {
    "yancelint": {
      "command": "yance-mcp-server"
    }
  }
}

npx -y 会自动从 npm 拉取最新版本运行,无需手动安装。

工具列表

工具 描述
get_file_violations 获取指定文件的规约违规列表(来自 P3C/ESLint/Stylelint/Checkstyle)
get_project_summary 获取项目级扫描摘要,包含各工具违规总数
check_health 检查 YanceLint Server 运行状态

前置条件

需要 YanceLint 插件 在 IntelliJ IDEA 中运行:

  1. 安装 YanceLint 插件到 IDEA
  2. 打开项目时,HTTP Server 自动在 localhost:63742 启动
  3. 确保 ESLint/Stylelint/P3C/Checkstyle 相关工具已配置

使用示例

在 Claude Code 中:

> 检查 src/pages/Home.tsx 有什么规约违规

AI 会自动调用 get_file_violations 工具获取违规列表并给出修复建议。

相关项目

许可证

Apache License 2.0

Copyright 2025 Xihe Lab (羲和实验室)

详见 LICENSE 和 NOTICE 文件。

联系方式

  • 网站:https://www.xihe-lab.com
  • 问题反馈:https://github.com/xihe-lab/yance-mcp-server/issues

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured