Get the FREE Ultimate OpenClaw Setup Guide →

zed-code-runner

Code Runner MCP Server for Zed

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio formulahendry-zed-code-runner-mcp-server node path/to/server.js \
  --env NPM_PACKAGE="mcp-server-code-runner"

How to use

The zed-code-runner MCP server exposes the Code Runner capabilities from the Code Runner MCP Server to Zed's Agent Panel. It enables executing code snippets across 30+ languages directly from Zed, including JavaScript, Python, Go, Java, C#, Ruby, PHP, Shell, and more. After enabling the extension, you can invoke the run-code tool from the Agent Panel by providing a code snippet and (optionally) specifying the language. Examples of prompts include: 'Run the JavaScript code: console.log(5+6)', 'Run this Python snippet: print("Hello from Zed!")', or 'How many CPUs do I have? Use run-code tool'. The tool handles sending the code to the underlying MCP server, which executes it in the appropriate runtime and returns the result or any errors.

How to install

Prerequisites:

  • Node.js and npm installed on your development machine
  • Zed editor installed
  • Access to install Zed extensions (including development extensions)

Installation steps:

  1. Install Node.js (recommended LTS) and npm from https://nodejs.org
  2. Clone the MCP server repository: git clone https://github.com/formulahendry/zed-code-runner-mcp-server.git
  3. Navigate to the project directory: cd zed-code-runner-mcp-server
  4. Install dependencies (if applicable): npm install
  5. In Zed, install this as a development extension:
    • Extensions → Install Dev Extension → Select this directory
  6. Start the MCP server if required by your setup, or rely on Zed to launch via the extension configuration

Note: The extension wraps the mcp-server-code-runner package and exposes its run-code tool inside Zed. Ensure any language runtimes you want to use are installed and available in your PATH.

Additional notes

Environment and configuration tips:

  • Ensure the interpreters/compilers for desired languages are installed and accessible via PATH.
  • If you encounter permission or port issues, verify that the MCP server can bind to the required port and that the host allows network access for the extension.
  • The run-code tool supports a wide range of languages; consult the underlying Code Runner MCP Server documentation for specific language requirements and compatibility.
  • If using a local development setup, you may need to adjust the path to server.js in the MCP config.
  • When deploying, ensure the NPM package mcp-server-code-runner is available in the runtime environment to support code execution.

Related MCP Servers

Sponsor this space

Reach thousands of developers