Skip to main content
Glama

Element Plus MCP

A stdio Model Context Protocol server that answers Element Plus questions from a local documentation checkout: component APIs (props, events, slots, exposed), usage sections, runnable examples, and guide pages, in English and Chinese.

It is a documentation index over markdown that already exists on disk. It does not download or redistribute Element Plus documentation, model weights, or generated indexes, and it never sends your code anywhere.

This project is not affiliated with the Element Plus project.

Tools

Tool

Purpose

list_components

Catalogue of documented components, grouped by category, with bilingual titles.

get_index

Compact catalogue overview (the llms.txt-style listing).

search_docs

Keyword or semantic search across components, guides, and examples; supports kind and locale filters.

get_component_docs

Structured API and usage sections for one component.

get_component_examples

Example sources for one component.

get_guide

Guide pages such as installation, quickstart, theming, i18n, and migration.

read_page

Read any docs markdown page by path relative to the docs root.

refresh_index

Rebuild the in-memory index after documentation files change.

refresh_index is for a long-running server whose docs changed underneath it; restarting the server is normally better.

Related MCP server: Reflex Docs MCP Server

Requirements

  • Node.js 20 or newer.

  • An Element Plus documentation checkout (the docs directory of an element-plus repository, which contains en-US/, zh-CN/, and examples/).

Install

Preferred, from npm (no Node build toolchain required):

npm install -g @lsrweb/element-plus-mcp
# or run without installing:
npx -y @lsrweb/element-plus-mcp

From source:

git clone https://github.com/lsrweb/element-plus-mcp.git
cd element-plus-mcp
npm install --omit=dev,optional --ignore-scripts

dist/ is committed, so no build step is required. Use --omit=optional to skip the optional local-embeddings dependency; keyword search works without it.

Maintainers working on the source run pnpm install (which does install dev dependencies), pnpm run build, and pnpm run e2e.

Point it at your documentation

The docs root is resolved in this order, and the first usable directory wins:

  1. ELEMENT_PLUS_DOCS_ROOT — an explicit path to a checkout's docs directory.

  2. $ELEMENT_PLUS_MCP_HOME/docs.

  3. ~/.element-plus-mcp/docs.

  4. E:/element-plus/docs — a conventional local checkout path.

A directory is usable only when en-US/component/button.md exists. If none matches, the server exits with the list of paths it tried. Use the checkout that matches the Element Plus version your project depends on; a fork with custom components should be indexed from that fork.

Runtime state — the call log, the embedding model cache, and the vector index — is written under ELEMENT_PLUS_MCP_HOME (default ~/.element-plus-mcp), not into the installed package.

Register the server

Any MCP client can start it over stdio. Replace /abs/path with this repository's location; for an npm install use "command": "npx", "args": ["-y", "@lsrweb/element-plus-mcp"] in place of the node form below.

Generic JSON (mcpServers), used by Claude Desktop, Claude Code project config, Cline, and many other clients:

{
  "mcpServers": {
    "element-plus": {
      "command": "node",
      "args": ["/abs/path/element-plus-mcp/dist/index.js"]
    }
  }
}

VS Code .vscode/mcp.json:

{
  "servers": {
    "element-plus": { "type": "stdio", "command": "node", "args": ["/abs/path/element-plus-mcp/dist/index.js"] }
  }
}

Codex (~/.codex/config.toml):

[mcp_servers.element-plus]
command = "node"
args = ["/abs/path/element-plus-mcp/dist/index.js"]

Claude Code:

claude mcp add --scope user element-plus -- node /abs/path/element-plus-mcp/dist/index.js

Environment

Variable

Default

Meaning

ELEMENT_PLUS_DOCS_ROOT

resolved as above

Documentation checkout to index.

ELEMENT_PLUS_MCP_HOME

~/.element-plus-mcp

Runtime state: call log, model cache, vector index, provisioned docs.

ELEMENT_PLUS_EMBEDDINGS

enabled

Set to off to skip local embeddings and load no model.

ELEMENT_PLUS_EMBED_MODEL

Xenova/multilingual-e5-small

Embedding model when embeddings are enabled.

ELEMENT_PLUS_MODELS_DIR

$ELEMENT_PLUS_MCP_HOME/models

Where embedding models are cached.

Behaviour and privacy

  • The MCP protocol uses stdout; all diagnostics use stderr, so run it with stdio transport only.

  • Every tool call is appended as JSON Lines to $ELEMENT_PLUS_MCP_HOME/logs/calls.jsonl (~/.element-plus-mcp/logs/calls.jsonl by default). Send documentation queries, not secrets, credentials, or real user data.

  • With embeddings enabled the server downloads a model on first use into the model cache. The model is optional; the server falls back to keyword search when it is unavailable.

Publishing

Releases are published to npm from package.json:

npm publish

publishConfig pins access: public and the public npm registry, and prepack rebuilds dist/ before packing. Bump version first, then commit and tag the release so the published tarball and the repository agree.

License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables semantic search and retrieval over local Markdown/MDX documentation using Node.js-based embeddings. Supports multi-language documentation with offline vector indexing and MCP tool exposure for AI assistants.
      16 npm
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables searching and retrieving Reflex documentation, including full-text search, code examples, error analysis, changelog, migration guides, API reference, component props, and recipes.
      14
      33 PyPI
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables semantic search over local markdown documentation by indexing files and ranking results using vector similarity and BM25 fusion.
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables semantic and hybrid search over documents and codebases backed by a Qdrant vector database, with collection management, document CRUD, metadata filtering, and AST-aware code indexing using local or cloud embedding providers. Supports natural language queries, incremental re-indexing of changed files, and custom configurable prompts for guided workflows.
      MIT