YanceLint MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YanceLint MCP ServerCheck src/pages/Home.tsx for lint violations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
YanceLint MCP Server
让 AI(Claude Code)实时感知代码规约违规。
简介
YanceLint MCP Server 是 YanceLint 的 Model Context Protocol (MCP) 接口,让支持 MCP 的 AI 工具(如 Claude Code)能够实时获取代码规约检查结果。
Related MCP server: lsp-mcp
安装
无需手动安装,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 拉取最新版本运行,无需手动安装。
工具列表
工具 | 描述 |
| 获取指定文件的规约违规列表(来自 P3C/ESLint/Stylelint/Checkstyle) |
| 获取项目级扫描摘要,包含各工具违规总数 |
| 检查 YanceLint Server 运行状态 |
前置条件
需要 YanceLint 插件 在 IntelliJ IDEA 中运行:
安装 YanceLint 插件到 IDEA
打开项目时,HTTP Server 自动在
localhost:63742启动确保 ESLint/Stylelint/P3C/Checkstyle 相关工具已配置
使用示例
在 Claude Code 中:
> 检查 src/pages/Home.tsx 有什么规约违规AI 会自动调用 get_file_violations 工具获取违规列表并给出修复建议。
相关项目
yance-idea — YanceLint IntelliJ IDEA 插件
Claude Code — Anthropic 官方 AI 编程助手
许可证
Apache License 2.0
Copyright 2025 Xihe Lab (羲和实验室)
联系方式
Available Tools
3 toolscheck_healthA
检查 YanceLint Server 是否运行,返回可用的扫描工具列表。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries the full burden. It discloses that the tool checks server status and returns a list of scanning tools, which is sufficient for a health check. No side effects are expected. Score 4 for clear but minimal behavioral information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with the key action. No redundant words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema), the description fully covers what the tool does and how it relates to siblings. It mentions the return type (list of scanning tools) which adds completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema coverage is 100% vacuously. Per the rubric, baseline is 4. The description adds meaning by explaining what the tool does, so this score is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: checking if the YanceLint Server is running and returning a list of available scanning tools. It uses a specific verb ('check') and resource, and distinguishes from siblings (get_file_violations, get_project_summary) which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for verifying server status and listing tools, but lacks explicit guidance on when to use versus alternatives, or when not to use it. A 3 is appropriate as it's implied but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_violationsA
获取指定文件的代码规约违规列表。YanceLint 会根据文件类型自动选择 P3C(Java)、ESLint(JS/TS)、Stylelint(CSS/SCSS)、Checkstyle(Java)进行扫描。返回违规消息、严重等级、行号等信息。
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | 文件的绝对路径 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It discloses a key behavior: automatic linter selection based on file type. It also mentions the return fields. However, it does not cover error conditions, rate limits, or authentication needs, which are minor gaps for a simple tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences front-loaded with purpose. No unnecessary words. Every sentence adds value: first states core function, second explains linter selection and return info.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter, no output schema, and no annotations, the description covers essential aspects: purpose, how linter selection works, and what information is returned. Could mention error handling for missing files, but overall complete for typical use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There is only one parameter ('file_path') with full schema coverage (100%). The description does not add additional meaning beyond the schema's 'absolute path' description. Baseline of 3 is appropriate as the schema already provides clear semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves code violation lists for a file, specifies that YanceLint automatically selects the appropriate linter based on file type (P3C, ESLint, etc.), and lists returned information (message, severity, line number). This makes the purpose explicit and distinguishes it from siblings like 'check_health' and 'get_project_summary'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives or provide when-not conditions. However, given sibling tools are unrelated (health check, project summary), usage is implicitly clear. No guidance on prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_project_summaryA
获取项目级代码规约扫描摘要,包含各工具(P3C/ESLint/Stylelint/Checkstyle)的违规总数。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full behavioral burden. It indicates a read operation returning total violations per tool, but does not disclose authentication needs, rate limits, or behavior like caching. Adequate but basic.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, efficient sentence that front-loads the main purpose. No unnecessary words; all information is relevant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and no output schema, the description covers the main content (totals per tool) but lacks details on the return structure or format. Sibling tools provide context, but a slightly more complete description would clarify output format.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the input schema is empty. The description does not need to explain parameters, and with no parameters, baseline is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a project-level summary of code convention violations, including totals per tool (P3C, ESLint, Stylelint, Checkstyle). It distinguishes from siblings like get_file_violations by focusing on aggregated project-level data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for high-level summaries but does not explicitly guide when to use this tool versus siblings (e.g., get_file_violations for per-file details, check_health for health status). No exclusions or alternatives are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.1- First observed
check_health - First observed
get_file_violations - First observed
get_project_summary
TDQS
Scored across 3 tools
Each tool has a distinct purpose: check_health verifies server status and lists scanners, get_file_violations returns violations for a specific file, and get_project_summary provides aggregated totals. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern using snake_case (check_health, get_file_violations, get_project_summary), with clear and predictable naming.
The server has 3 tools, which is reasonable for a focused linting service. While slightly lean, the tools cover the core functionality without unnecessary redundancy.
The set covers health checking, file-level violation retrieval, and project summary. Missing explicit support for per-tool configuration or detailed project-wide results, but the core use cases are addressed.
Maintenance
Related MCP Connectors
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
Research-backed linting + generation for agent context files (CLAUDE.md, AGENTS.md, Cursor rules).
MCP server (stdio): lint OpenAPI specs with Spectral via the AgentForge API
The OpenZeppelin Solidity Contracts MCP server integrates OpenZeppelin's security and style rules into AI-driven development workflows, enabling AI assistants to generate safe, correct, and production-ready smart contracts. It automatically validates generated code against OpenZeppelin standards (including imports, modifiers, naming conventions, and security checks) and supports various contract types including ERC-20, ERC-721, ERC-1155, Stablecoins, RWA, Governor, and Account contracts through prompt-driven workflows.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides clj-kondo linting capabilities for Clojure/ClojureScript/EDN files, useful for environments like Claude code and desktop that lack built-in linting.14 npm4MIT
- AlicenseBqualityDmaintenanceA multi-language code analysis server that helps LLMs or humans automatically lint, type-check, and improve code with minimal installation friction, currently supporting Python with plans for other languages.13MIT
- AlicenseAqualityFmaintenanceBridges Claude Code to Language Server Protocol (LSP) servers to enable semantic code intelligence features like navigation, refactoring, and real-time diagnostics. It supports multiple languages including TypeScript, Python, and Rust with multi-root workspace capabilities.191,373 npm21MIT
- AlicenseAqualityAmaintenanceEnables AI assistants and developers to analyze code for language-specific best practices and idiomatic patterns across programming languages, CI automation, and configuration formats.162MIT