The @m3e/mcp package provides a
Model Context Protocol (MCP)
server that gives AI assistants access to the M3E Web Components catalog, API details, and documented
examples.
Requires Node.js 22 or later.
Install the package in your project, or use npx to run it without a separate installation.
npm install @m3e/mcp
The default transport is standard input/output (stdio). Add the following to a portable
.mcp.json file in your workspace root. The m3e key is the server name in your client
configuration and can be changed.
{
"mcpServers": {
"m3e": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@m3e/mcp"]
}
}
}
In VS Code, the guided setup offers workspace-root configuration when the experimental
chat.mcp.workspaceRootConfig.enabled setting is enabled. For use across workspaces, use
$COPILOT_HOME/mcp-config.json, or ~/.copilot/mcp-config.json if
COPILOT_HOME is unset.
The legacy VS Code configuration uses .vscode/mcp.json and a top-level
servers object instead. See the
VS Code MCP configuration reference
for differences between formats.
Alternatively, start the HTTP server in a terminal:
npx -y @m3e/mcp --http
Then configure a client to connect to the default local URL:
{
"mcpServers": {
"m3e": {
"type": "http",
"url": "http://127.0.0.1:3333/mcp"
}
}
}
list_components lists custom elements and their short descriptions.search_components searches component names and documentation.get_component returns a component's API and detailed description.get_usage_example returns documented examples for a component.get_react_wrapper provides React import, wrapper, and event prop information.list_css_properties lists CSS custom properties with optional filters.These tools provide catalog information and snippets; they do not execute or modify your project. You can ask your assistant to find a component, explain its API, or show an example.
@m3e/web dependency when it
starts. This is not necessarily the version installed in your project. Restart the server after updating that
manifest to load the changes.
The m3e-mcp command accepts options to select a transport and configure its HTTP address. Pass
these options when starting the server directly or through an MCP client's command arguments.
m3e-mcp [--http] [--port 3333] [--host 127.0.0.1]
Use --port and --host to configure HTTP, or --help to show usage.
Without --http, the server uses stdio.