Skip to main content
Glama
yinxianwei

Element Plus Docs MCP

by yinxianwei

Element Plus Docs MCP

一个通过 MCP 查询 Element Plus 中文组件文档 的本地服务。

服务会实时读取官网,并在内存中缓存一小时。它提供三个工具:

  • list_components:列出或筛选全部组件

  • get_component_doc:按中英文名或 slug 获取组件文档,可指定小节

  • search_component_docs:在全部或指定组件文档中搜索关键词

环境要求

  • Node.js 20 或更高版本

Related MCP server: Docs-MCP

安装和构建

npm install
npm run build

从源码使用时,可以将命令链接到本机:

npm link

完成后可以直接运行 element-plus-docs-mcp 启动服务。

配置 MCP 客户端

在支持 stdio MCP 的客户端配置中加入:

{
  "mcpServers": {
    "element-plus-docs": {
      "command": "element-plus-docs-mcp",
      "args": []
    }
  }
}

使用上述配置前,请先执行 npm run build && npm link

Claude Code VS Code 扩展

Claude Code 的 VS Code 扩展可以管理已经配置的 MCP 服务。添加服务时,可以使用项目级 .mcp.json,或者在 VS Code 集成终端中写入用户级配置。

项目级配置

适合只在当前项目中使用,也可以将配置提交到版本库与团队共享。

  1. 确认本服务已经构建:

    npm install
    npm run build
    npm link
  2. 在需要使用 MCP 的 VS Code 项目根目录创建 .mcp.json

    {
      "mcpServers": {
        "element-plus-docs": {
          "type": "stdio",
          "command": "element-plus-docs-mcp",
          "args": [],
          "env": {}
        }
      }
    }
  3. 在 VS Code 中执行 Developer: Reload Window,然后打开 Claude Code 聊天面板并输入 /mcp

  4. 首次加载项目级 MCP 时确认授权,并检查 element-plus-docs 是否显示为已连接。

用户级配置

如果希望 Claude Code VS Code 扩展在所有项目中都能使用该服务,请在 VS Code 集成终端中运行:

claude mcp add \
  --transport stdio \
  --scope user \
  element-plus-docs \
  -- element-plus-docs-mcp

配置完成后,在 Claude Code 聊天面板输入 /mcp 进行查看、重连或停用。用户级 MCP 配置会同时提供给 Claude Code CLI 和 VS Code 扩展。

可以用下面的问题验证:

使用 element-plus-docs 查询 Table 组件的 span-method 用法

如果连接失败,请检查:

  • dist/index.js 是否存在;不存在时重新运行 npm run build

  • 是否已经执行 npm link,并能在终端中运行 element-plus-docs-mcp

  • 在 Claude Code 面板的 /mcp 中尝试重新连接

工具示例

获取 Button 的基础用法:

{
  "component": "button",
  "section": "基础用法"
}

搜索 Table 的 span-method

{
  "query": "span-method",
  "components": ["table"]
}

配置项

  • ELEMENT_PLUS_DOCS_BASE_URL:文档基础地址,默认 https://cn.element-plus.org/zh-CN/component

  • ELEMENT_PLUS_CACHE_TTL_MS:缓存时间(毫秒),默认 3600000

开发

npm run dev
npm run check

Available Tools

3 tools
get_component_doc获取 Element Plus 组件文档A

根据组件中英文名或 slug 获取中文官网文档,结果为适合模型阅读的 Markdown。

ParametersJSON Schema
NameRequiredDescriptionDefault
sectionNo只返回匹配的小节,例如“属性”“事件”或“基础用法”
componentYes组件名,例如 button、Button、按钮、date-picker
force_refreshNo是否跳过缓存并重新读取官网
max_charactersNo返回正文的最大字符数

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that the result is Chinese official documentation in Markdown format, which is useful behavioral context. However, with no annotations, it does not mention caching, network calls, or potential side effects, even though the force_refresh parameter implies caching behavior. The description adds some value but not comprehensive transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that is front-loaded with the verb '获取' (get). It conveys purpose and output format without any filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and the description adequately covers the core functionality and output format, which is helpful given no output schema exists. It could be more complete by referencing sibling tools or edge cases, but overall it is sufficient for this low-complexity tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description mentions '中英文名或 slug' but the schema's parameter description already provides examples like 'button, Button, 按钮, date-picker', covering this. No additional parameter meaning is added beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the Chinese official Element Plus documentation based on a component's Chinese/English name or slug, with output formatted as Markdown suitable for models. This specific verb-resource-scope pairing distinguishes it from siblings like list_components and search_component_docs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description conveys that this tool is for fetching a specific component's documentation by name/slug, giving clear context. However, it does not explicitly mention alternatives or exclusion criteria, such as using search_component_docs when the exact name is unknown.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_components列出 Element Plus 组件C

从 Element Plus 中文官网读取组件总览,可按分类或名称过滤。

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo组件中英文名或 slug 的关键词
categoryNo分类关键词,例如“表单”或“Data”
force_refreshNo是否跳过缓存并重新读取官网

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the data source (Element Plus 中文官网) and that it reads an overview, but it omits important behavioral traits such as caching behavior (implied by the force_refresh parameter) and potential network dependency or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, front-loaded with the action and resource. It wastes no words, though it could be more informative without sacrificing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with three optional parameters and no output schema, the description covers the basic purpose and filtering capability. However, it lacks details about the return value (what data is in the overview) and does not position the tool relative to its siblings, making it only minimally complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds a minor context by indicating filtering by category or name, but it does not meaningfully elaborate on the parameters beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb '读取' (read) and a clear resource '组件总览' (component overview), and states it can filter by category or name. It effectively conveys the tool's purpose, though it doesn't explicitly contrast with sibling tools like get_component_doc or search_component_docs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling tools get_component_doc or search_component_docs. The description implies a listing/filtering use case but offers no exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_component_docs搜索 Element Plus 组件文档A

在 Element Plus 中文组件文档中搜索关键词,返回相关组件和上下文片段。首次全库搜索需要抓取所有组件页面。

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes要搜索的 API、属性、事件或中文关键词
componentsNo可选的组件范围;不传则搜索全部组件
max_resultsNo

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral disclosure. It reveals that the first full-library search requires crawling all component pages and indicates the result shape (related components and context snippets). This adds meaningful context beyond the schema, though it omits details like caching or pagination behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences that front-load the core purpose and the critical crawl caveat. Every word earns its place, with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with three parameters and no output schema, the description provides sufficient context: it names the result type (components and snippets) and flags the expensive first search. It could further explain how the components or max_results parameters affect results, but those are partially covered by the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema describes query and components, but max_results lacks a description and the tool description adds no extra parameter semantics. With 67% schema coverage, the description neither compensates for the gap nor repeats the schema, meriting the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states '在 Element Plus 中文组件文档中搜索关键词,返回相关组件和上下文片段' – a specific verb (search), resource (Element Plus component docs), and output (components and snippets). It clearly distinguishes from sibling tools get_component_doc and list_components.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when the tool is used (searching keywords across docs) and includes a practical caveat that '首次全库搜索需要抓取所有组件页面', warning about initial cost. It does not explicitly name alternatives or exclusions, so it falls short of a 5.

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. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedget_component_doc
    • First observedlist_components
    • First observedsearch_component_docs

TDQS

A3.8/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose: listing components, retrieving a specific component's documentation, and searching across documentation. There is no functional overlap between the tools.

Naming Consistency4/5

All tools follow a verb_noun pattern with snake_case, but there is a minor inconsistency in singular vs plural usage ('doc' vs 'docs'). This is a small deviation from an otherwise consistent convention.

Tool Count5/5

Three tools is well-scoped for a documentation server, covering the essential actions of browse, retrieve, and search without unnecessary bloat.

Completeness5/5

The tool surface covers the core documentation needs: list components, fetch a specific doc, and search across all docs. There are no obvious gaps for its stated purpose.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    A documentation server based on MCP protocol designed for various development frameworks that provides multi-threaded document crawling, local document loading, keyword searching, and document detail retrieval.
    3
    48
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that allows users to efficiently search and reference user-configured documents through document listing, grep searching, semantic searching with OpenAI Embeddings, and full document retrieval.
    4
    3
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides a local MCP server for searching and retrieving documentation from 22+ open-source projects, enabling AI coding assistants to access up-to-date docs without network dependency.
    11
    2
    MIT

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/yinxianwei/element-plus-mcp'

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