Get the FREE Ultimate OpenClaw Setup Guide →

zed -serena

Zed editor extension for Serena MCP server - semantic code analysis toolkit

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio delano-zed-mcp-server-serena python -m serena start-mcp-server \
  --env SERENA_LOG_LEVEL="debug"

How to use

This MCP server integrates Serena, a semantic code analysis and editing toolkit, with the Zed editor via the Model Context Protocol. When the Serena MCP server is running, Zed automatically registers the context server and exposes 19 specialized MCP tools that Serena provides for semantic code retrieval, analysis, and manipulation. You can query tools like get_symbols_overview, find_symbol, and find_referencing_symbols to understand code structures, or use file operations such as list_dir and find_file to navigate a project. For code manipulation, tools like replace_symbol_body, insert_after_symbol, and insert_before_symbol let you programmatically modify code. Memory tools (write_memory, read_memory, list_memories, delete_memory) enable storing and reusing contextual data across sessions. The agent workflow tools (onboarding, think_about_collected_information, think_about_task_adherence, etc.) guide the agent through project understanding and task execution. To verify the integration, you can ask the AI in Zed to list available MCP tools, which should reveal all 19 Serena tools, indicating the MCP server is active and ready for use.

How to install

Prerequisites

  • Zed Preview/Dev channel installed (not the Stable release)
  • Python 3.11 or 3.12 installed
  • pip available to install Python packages

Installation steps

  1. Install Serena (via pip) if not already present

    python3.11 -m pip install --upgrade serena-agent
    
  2. Install and set up the Serena MCP server (as part of the Zed extension workflow)

    • Ensure you have the Zed extension that provides the Serena context integration installed or cloned from the repository.
    • The extension handles automatic installation and zero-configuration wiring, but you can verify manually that Serena is available in your Python environment.
  3. Run the MCP server (manual verification)

    python -m serena start-mcp-server
    

    This starts the MCP server exposed to Zed via the MCP protocol. The extension may automatically start and register this server for you, so manual startup is only needed for verification or troubleshooting.

  4. Optional: configure environment variables or Python executable path if automatic detection fails

    • You can set SERENA_LOG_LEVEL or other SERENA_* environment variables as needed.
    • If you have a custom Python path, ensure the extension points to the correct python executable.
  5. In Zed, ensure the Serena Context Server extension is enabled and detected in the Extensions panel. The server should register automatically with zero manual configuration.

Additional notes

Tips and common issues:

  • If the extension cannot detect Python or Serena automatically, you can provide a manual configuration using the context server settings in Zed. For example, set the command to the path of your Python interpreter and the arguments to -m serena start-mcp-server, with optional SERENA_LOG_LEVEL for debugging.
  • Ensure you are using the Dev/Preview channel of Zed for extension compatibility.
  • If you encounter missing tools after installation, restart Zed completely and query the available MCP tools again.
  • The environment variable SERENA_LOG_LEVEL can be set to debug or info to increase verbosity for troubleshooting.
  • The MCP server name in your configuration can be any identifier you choose; serena-context-server is used here as a conventional name.
  • The Serena MCP server starts with zero configuration, but if automatic detection fails, you can fallback to manual wiring as shown in the troubleshooting example in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers