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
- Bring up the command palette with
Ctrl-Shift-P(orCmd-Shift-Pon Mac). - Search for
MCP: Add Serverand select it. - For the variation, select
Command (stdio). - For the command, enter:
wsl.exe edm run -e edm -- edge mcp - When the MCP server view appears, save it.
- Press
Startto launch the MCP server.
Verify, Start, or Restart the MCP Server
- Bring up the command palette with
Ctrl-Shift-P(orCmd-Shift-Pon Mac). - Search for
MCP: Open User Configurationand select it. - From that file, you can see any MCP errors, Start, or Restart the server.
Claude
Claude Desktop Pro
Note that custom MCP servers only work in Claude Desktop Pro.
- Navigate to
File - Settings. - Navigate to the
Developersection. Edit Configshows where the configuration file is.- Open the configuration file in a text editor.
- Add the following JSON snippet to the
mcpServerssection:
"edge_cli": {
"type": "stdio",
"command": "wsl.exe",
"args": [
"edm",
"run",
"-e",
"edm",
"--",
"edge",
"mcp"
]
}
- 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
- Navigate to
File - Settings(orPyCharm - Preferenceson Mac). - Select
Tools - GitHub Copilot - Model Context Protocol (MCP). - Click the
Configurebutton. - Inside the
serverssection, add:
"edge-cli": {
"type": "stdio",
"command": "wsl.exe",
"args": [
"edm",
"run",
"-e",
"edm",
"--",
"edge",
"mcp"
],
"env": {}
}
- 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:
- Navigate to
File - Settings(orPyCharm - Preferenceson Mac). - Select
Tools - GitHub Copilot - Model Context Protocol (MCP). - Click the
Configurebutton.
GitHub Copilot CLI
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.
- Start the Copilot CLI:
$ copilot
- Then, inside the Copilot CLI, run:
/mcp add
- Enter the values:
- Unique Name: edge-cli
- Server Type:
1 (local) - Command:
wsl.exe - Arguments:
edm run -e edm -- edge mcp
Ctrl-Sto save
Example Prompts
Here are some example prompts you can use to interact with Edge applications via MCP:
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 loginto 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.yamlto 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.