serena mcp
Serena is a powerful open-source coding agent toolkit that turns any LLM into a fully-featured coding agent with semantic code retrieval and editing powered by the Language Server Protocol (LSP) via the Model Context Protocol (MCP).
Overview
Serena (often referred to as Serena MCP) is a powerful open-source coding agent toolkit developed by Oraios. It transforms large language models (LLMs) into fully-featured coding agents capable of working directly on your codebase with IDE-like intelligence.
Unlike traditional RAG-based tools that rely on plain text search, Serena leverages the Language Server Protocol (LSP) for symbol-level understanding, enabling accurate code navigation, symbol lookup, refactoring, and editing—even in large, complex projects.
It primarily operates as an MCP (Model Context Protocol) server, making it compatible with MCP clients like Claude Code, Claude Desktop, Cursor, Cline, VS Code extensions, and various terminal-based AI coding tools.
Key Features
- Semantic Code Understanding: Uses LSP for precise symbol-based retrieval and editing across 20+ programming languages.
- MCP Server Integration: Seamlessly connects to Anthropic's Model Context Protocol for tool use in LLMs.
- Multi-Context Modes: Supports different contexts (e.g.,
ide-assistant) for optimized performance in IDEs or CLI. - Easy Deployment: Run via
uvxfrom GitHub for quick setup, or install via PyPI (serena-mcp). - Agno Framework Support: Alternative integration mode for broader agent compatibility.
- Docker Support: Production-ready containers with compose configurations.
- IDE Plugins: Available JetBrains plugin to enhance native LSP capabilities.
- Token Efficiency: Reduces context bloat, speeds up responses, and improves output quality.
Installation & Quick Start
The easiest way to run the Serena MCP server:
uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context ide-assistant --project $(pwd)
For Claude Desktop/Code integration, use the built-in claude mcp add command. Full documentation and client guides are available in the repository.
Use Cases
- Complex Codebase Navigation: AI agents quickly locate relevant symbols and dependencies without hallucinating structure.
- Refactoring & Editing: Precise, context-aware code modifications using real language server capabilities.
- Free-Tier Claude Usage: Run locally with Claude Desktop/Code to unlock advanced coding without API costs.
- Multi-IDE Compatibility: Works with Cursor, VS Code, JetBrains IDEs, and terminal clients like Codex or Gemini-CLI.
- Large Project Automation: Semantic understanding scales to enterprise-sized repositories.
Integrations
- MCP Clients: Claude Code, Claude Desktop, Cursor, Cline, Roo-Code, Windsurf, and more.
- LLM Compatibility: Any LLM that supports MCP or Agno framework.
- Language Support: 20+ languages via native LSP servers.
Serena is MIT-licensed and actively maintained. For detailed setup, client connections, and architecture deep-dives, visit the official GitHub repository.
Resources
- GitHub: https://github.com/oraios/serena
- Documentation: https://oraios.github.io/serena
- PyPI: https://pypi.org/project/serena-mcp/