Zed MCP Server Serena
Zed editor extension for Serena MCP server - semantic code analysis toolkit
Ask AI about Zed MCP Server Serena
Powered by Claude Β· Grounded in docs
I know everything about Zed MCP Server Serena. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Serena Context Server Extension for Zed
A Zed editor extension that integrates Serena - a powerful coding agent toolkit with semantic code analysis capabilities - via the Model Context Protocol (MCP).
About Serena
Serena is a free & open-source coding agent toolkit that provides semantic code retrieval and editing tools. It works like an IDE for coding agents, enabling them to:
- Find and edit code at the symbol level using tools like
find_symbol,find_referencing_symbols, andinsert_after_symbol - Perform efficient semantic code analysis using Language Server Protocol (LSP)
- Work with large codebases without reading entire files or performing basic grep searches
- Support 20+ programming languages out of the box
Features
This Zed extension provides seamless integration with Serena's MCP server, offering:
- Automatic Installation: Downloads and installs
serena-agentvia pip if not present - Smart Python Detection: Automatically finds Python 3.11-3.12 interpreter (required by Serena)
- Zero Configuration: Works out-of-the-box without manual server setup
- Cross-Platform Support: Works on macOS, Linux, and Windows
- 19 Semantic Tools: Complete toolkit for AI-powered code analysis and manipulation
- Error Handling: Clear error messages for missing dependencies
Installation
Prerequisites
- Zed Preview/Dev: Extension system requires Zed Preview or Dev channel (not Stable)
- Python 3.11-3.12: Serena specifically requires Python 3.11 or 3.12
- pip: Package manager for Python dependencies
Quick Install Steps
-
Install Compatible Python (if needed):
# macOS with Homebrew brew install python@3.11 # Verify installation python3.11 --version -
Install as Dev Extension:
- Download/clone this repository
- In Zed:
Cmd+Shift+Pβ "zed: install dev extension" - Select:
path/to/zed-mcp-server-serena/serena-context-serverdirectory - The extension installs automatically without manual configuration
-
Verify Installation:
- Check Extensions panel in Zed for "Serena Context Server"
- No manual server configuration needed - it's handled automatically!
Published Extension (Coming Soon)
When published to the Zed extension marketplace:
- Open Zed
- Go to Extensions (
Cmd+Shift+X) - Search for "Serena Context Server"
- Click Install
Usage
Automatic Operation
Once installed, the extension works automatically:
- Automatic Setup: Extension detects Python 3.11/3.12 and installs Serena if needed
- Zero Configuration: Context server registers automatically in Zed
- Ready to Use: AI features immediately gain access to 19 Serena tools
Testing Serena Integration
To verify Serena is working, ask your AI assistant in Zed:
List the MCP tools available to you right now
You should see 19 Serena tools including:
get_symbols_overview,find_symbol,find_referencing_symbolslist_dir,find_file,search_for_patternreplace_symbol_body,insert_after_symbol,insert_before_symbolwrite_memory,read_memory,list_memories,delete_memory- Plus workflow and analysis tools
Example Usage
Semantic Code Analysis:
Use Serena to analyze the symbols in this project and show me an overview
Symbol Search:
Find all functions related to "authentication" in this codebase using Serena
Code Manipulation:
Use Serena to add error handling to the login function
Available Serena Tools
The extension provides 19 specialized MCP tools:
π File Operations
list_dir- List directory contentsfind_file- Locate files by name/patternsearch_for_pattern- Search file contents with regex
π Semantic Analysis
get_symbols_overview- Get project symbol summaryfind_symbol- Locate specific symbols (functions, classes, etc.)find_referencing_symbols- Find references to symbols
βοΈ Code Manipulation
replace_symbol_body- Replace function/class implementationsinsert_after_symbol- Add code after symbolsinsert_before_symbol- Add code before symbols
π§ Memory Management
write_memory- Store information for later useread_memory- Retrieve stored informationlist_memories- List all stored informationdelete_memory- Remove stored information
π€ Agent Workflow
onboarding- Initialize project understandingthink_about_collected_information- Analyze gathered datathink_about_task_adherence- Verify task completionthink_about_whether_you_are_done- Assess completion statuscheck_onboarding_performed- Verify initializationinitial_instructions- Get project context
Configuration (Optional)
The extension works without configuration, but you can customize it in Zed settings (Cmd+,):
{
"context_servers": {
"serena-context-server": {
"settings": {
// Optional: Specify Python executable path
"python_executable": "/opt/homebrew/bin/python3.11",
// Optional: Additional environment variables
"environment": {
"SERENA_LOG_LEVEL": "debug"
}
}
}
}
}
Note: Manual configuration is only needed if automatic detection fails.
Troubleshooting
Extension Not Loading
- β Use Zed Preview/Dev: Extensions don't work in Zed Stable
- β Check Python Version: Serena requires Python 3.11-3.12 specifically
- β
Verify Path: Install to
serena-context-server/directory, not root
Python Detection Issues
# Test Python detection manually
python3.11 --version
python3.11 -c "import serena; print('Serena:', serena.__version__)"
# Install Serena manually if needed
python3.11 -m pip install serena-agent
Missing Tools
If Serena tools don't appear:
- Check Extensions panel shows "Serena Context Server" with β
- Restart Zed completely
- Ask AI: "List available MCP tools" to verify
Manual Installation Fallback
If automatic setup fails, add manual configuration:
{
"serena-context-server": {
"command": "/opt/homebrew/bin/serena",
"args": ["start-mcp-server"],
"env": {
"SERENA_LOG_LEVEL": "debug"
}
}
}
Supported Languages
Serena provides semantic analysis for 20+ languages:
Primary Support: Python, TypeScript/JavaScript, PHP, Go, Rust, C/C++, Java, C#, Swift Additional: Ruby, Kotlin, Clojure, Dart, Bash, Lua, Nix, Elixir, Erlang, Zig, R
Development
See DEVELOPING.md for:
- Building the extension from source
- Testing locally
- Contributing guidelines
- Detailed troubleshooting
Related Projects
- Serena - The main Serena coding agent toolkit
- Zed - The Zed code editor
- Model Context Protocol - The protocol enabling AI-editor integration
License
MIT
Contributing
Contributions are welcome! Please see DEVELOPING.md for development setup and contribution guidelines.
