Skip to main content
Version: 2.30.0

Model Context Protocol (MCP)

The Edge CLI comes with an MCP server that allows Chat agents to communicate with Edge and other applications using the Model Context Protocol (MCP).

Once the MCP server is configured for the chat agent of your choice, you can interact with Edge applications using natural language prompts.

Configuring the MCP Server

Before it can be used, the Edge CLI MCP server needs to be running inside of the tool of your choice.

Visual Studio Code

  1. Bring up the command palette with Ctrl-Shift-P (or Cmd-Shift-P on Mac).
  2. Search for MCP: Add Server and select it.
  3. For the variation, select Command (stdio).
  4. For the command, enter: wsl.exe edm run -e edm -- edge mcp
  5. When the MCP server view appears, save it.
  6. Press Start to launch the MCP server.

Verify, Start, or Restart the MCP Server

  1. Bring up the command palette with Ctrl-Shift-P (or Cmd-Shift-P on Mac).
  2. Search for MCP: Open User Configuration and select it.
  3. From that file, you can see any MCP errors, Start, or Restart the server.

Claude

Claude Desktop Pro

Supported Versions

Note that custom MCP servers only work in Claude Desktop Pro.

  1. Navigate to File - Settings.
  2. Navigate to the Developer section.
  3. Edit Config shows where the configuration file is.
  4. Open the configuration file in a text editor.
  5. Add the following JSON snippet to the mcpServers section:
"edge_cli": {
"type": "stdio",
"command": "wsl.exe",
"args": [
"edm",
"run",
"-e",
"edm",
"--",
"edge",
"mcp"
]
}
  1. Save the configuration file and restart Claude Desktop.

Claude Code on Linux

For Claude Code on Linux, you can add the server using the following command:

claude mcp add -s project -t stdio edge_cli -- edm run -e edge -- edge mcp

JetBrains PyCharm

  1. Navigate to File - Settings (or PyCharm - Preferences on Mac).
  2. Select Tools - GitHub Copilot - Model Context Protocol (MCP).
  3. Click the Configure button.
  4. Inside the servers section, add:
"edge-cli": {
"type": "stdio",
"command": "wsl.exe",
"args": [
"edm",
"run",
"-e",
"edm",
"--",
"edge",
"mcp"
],
"env": {}
}
  1. Save the configuration.

Verify, Start, or Restart the MCP Server

In PyCharm, the MCP Server starts automatically and restarts any time you edit the configuration and save the file. You can see the MCP logs by navigating to the MCP Configuration:

  1. Navigate to File - Settings (or PyCharm - Preferences on Mac).
  2. Select Tools - GitHub Copilot - Model Context Protocol (MCP).
  3. Click the Configure button.

GitHub Copilot CLI

Theoretical

Copilot CLI supports external MCP tools, and this is the process to add such a tool, but it does not seem to work currently. Future updates may fix this.

  1. Start the Copilot CLI:
$ copilot
  1. Then, inside the Copilot CLI, run:
/mcp add
  1. Enter the values:
  • Unique Name: edge-cli
  • Server Type: 1 (local)
  • Command: wsl.exe
  • Arguments: edm run -e edm -- edge mcp
  1. Ctrl-S to save

Example Prompts

Here are some example prompts you can use to interact with Edge applications via MCP:

note

These prompts have been tested in Visual Studio Code Agent with Claude Sonnet 4.

"Create a new Edge application called 'myapp' using the 'React' framework."

"Build the Docker image for the Edge application 'myapp'."

"Deploy the Edge application 'myapp' to the production environment."

"List the versions of 'myapp'."

"Run the Edge application 'myapp' locally for testing."

Troubleshooting

  • Make sure your MCP Server is running.
  • Outside the LLM Agent, do a edge docker login to ensure you are logged into Docker Hub. This will make the other commands operate more smoothly, especially as the LLM doesn't give the login feedback by default.
  • The application is created in your home directory, and an application configuration setting records this location. For Agent future commands to work against the application, you should not move it anywhere. If you need it to live in a new location, edit ~/.edge/cli_apps.yaml to point the application to the new location.
  • If a command appears to hang, locate the MCP logs for your system and see if there is any feedback there. Some commands are just slow; others need you to log in before they can work.