MCP Server

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.

Installation

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
Configure a client

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.

Streamable HTTP

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"
    }
  }
}

Network access The HTTP transport is stateless and has no authentication. It listens on loopback by default; only bind it to a network interface you trust. Available tools

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.

Component catalog The server reads the Custom Elements Manifest from its resolved @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. CLI options

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.

On this page MCP Server