Serena

Serena

Coding agent toolkit with IDE-like semantic code retrieval and editing for LLM integration.

15,643
Stars
1,038
Forks
15,643
Watchers
86
Issues
Serena is a free and open-source coding agent toolkit that enhances large language models with advanced semantic code retrieval and editing tools. It enables integration through the Model Context Protocol (MCP), allowing seamless operation with various coding agents, IDEs, and interfaces. Serena extracts code entities at the symbol level, supports context-aware operations, and improves token efficiency for coding tasks. The tools can be incorporated into diverse LLM-driven environments for more efficient and precise code editing.

Key Features

Semantic code retrieval at the symbol level
Efficient code editing tools analogous to IDE functions
Model Context Protocol (MCP) server for standard integration
Framework-agnostic and LLM-agnostic design
Integration with popular IDEs and coding platforms
Token-efficient operations for larger codebases
Support for code-centric tool usage (e.g., find_symbol, insert_after_symbol)
Open-source and free to use
Decoupled tool implementation for flexible adoption
Extensive documentation and integration guides

Use Cases

Enabling advanced code search and editing for LLM-based agents
Integrating LLMs with IDEs for code automation tasks
Building custom coding agents with semantic code understanding
Orchestrating efficient context management in large projects
Enhancing token efficiency for LLM-powered code assistance
Supporting tool-calling workflows in various chat and agent UIs
Automating symbol-level code modifications
Simplifying integration of LLMs with terminal and desktop clients
Improving accuracy and speed in code reviews or refactoring tasks
Providing a standard interface for LLM-driven code automation tools

README

  • :rocket: Serena is a powerful coding agent toolkit capable of turning an LLM into a fully-featured agent that works directly on your codebase. Unlike most other tools, it is not tied to an LLM, framework or an interface, making it easy to use it in a variety of ways.
  • :wrench: Serena provides essential semantic code retrieval and editing tools that are akin to an IDE's capabilities, extracting code entities at the symbol level and exploiting relational structure. When combined with an existing coding agent, these tools greatly enhance (token) efficiency.
  • :free: Serena is free & open-source, enhancing the capabilities of LLMs you already have access to free of charge.

You can think of Serena as providing IDE-like tools to your LLM/coding agent. With it, the agent no longer needs to read entire files, perform grep-like searches or basic string replacements to find the right parts of the code and to edit code. Instead, it can use code-centric tools like find_symbol, find_referencing_symbols and insert_after_symbol.

LLM Integration

Serena provides the necessary tools for coding workflows, but an LLM is required to do the actual work, orchestrating tool use.

In general, Serena can be integrated with an LLM in several ways:

  • by using the model context protocol (MCP). Serena provides an MCP server which integrates with
    • Claude Code and Claude Desktop,
    • terminal-based clients like Codex, Gemini-CLI, Qwen3-Coder, rovodev, OpenHands CLI and others,
    • IDEs like VSCode, Cursor or IntelliJ,
    • Extensions like Cline or Roo Code
    • Local clients like OpenWebUI, Jan, Agno and others
  • by using mcpo to connect it to ChatGPT or other clients that don't support MCP but do support tool calling via OpenAPI.
  • by incorporating Serena's tools into an agent framework of your choice, as illustrated here. Serena's tool implementation is decoupled from the framework-specific code and can thus easily be adapted to any agent framework.

Serena in Action

Demonstration 1: Efficient Operation in Claude Code

A demonstration of Serena efficiently retrieving and editing code within Claude Code, thereby saving tokens and time. Efficient operations are not only useful for saving costs, but also for generally improving the generated code's quality. This effect may be less pronounced in very small projects, but often becomes of crucial importance in larger ones.

https://github.com/user-attachments/assets/ab78ebe0-f77d-43cc-879a-cc399efefd87

Demonstration 2: Serena in Claude Desktop

A demonstration of Serena implementing a small feature for itself (a better log GUI) with Claude Desktop. Note how Serena's tools enable Claude to find and edit the right symbols.

https://github.com/user-attachments/assets/6eaa9aa1-610d-4723-a2d6-bf1e487ba753

Programming Language Support & Semantic Analysis Capabilities

Serena's semantic code analysis capabilities build on language servers using the widely implemented language server protocol (LSP). The LSP provides a set of versatile code querying and editing functionalities based on symbolic understanding of the code. Equipped with these capabilities, Serena discovers and edits code just like a seasoned developer making use of an IDE's capabilities would. Serena can efficiently find the right context and do the right thing even in very large and complex projects! So not only is it free and open-source, it frequently achieves better results than existing solutions that charge a premium.

Language servers provide support for a wide range of programming languages. With Serena's LSP library, we provide support for over 30 programming languages, including AL, Bash, C#, C/C++, Clojure, Dart, Elixir, Elm, Erlang, Fortran, Go, Haskell, Java, Javascript, Julia, Kotlin, Lua, Markdown, Nix, Perl, PHP, Python, R, Ruby, Rust, Scala, Swift, TypeScript and Zig.

[!IMPORTANT] Some languages require additional dependencies to be installed; see the Language Support page for details.

Quick Start

Prerequisites. Serena is managed by uv. If you don’t already have it, you need to install uv before proceeding.

Starting the MCP Server. The easiest way to start the Serena MCP server is by running the latest version from GitHub using uvx. Issue this command to see available options:

bash
uvx --from git+https://github.com/oraios/serena serena start-mcp-server --help

Configuring Your Client. To connect Serena to your preferred MCP client, you typically need to configure a launch command in your client. Follow the link for specific instructions on how to set up Serena for Claude Code, Codex, Claude Desktop, MCP-enabled IDEs and other clients (such as local and web-based GUIs).

[!TIP] While getting started quickly is easy, Serena is a powerful toolkit with many configuration options. We highly recommend reading through the user guide to get the most out of Serena.

Specifically, we recommend to read about ...

User Guide

Please refer to the user guide for detailed instructions on how to use Serena effectively.

Community Feedback

Most users report that Serena has strong positive effects on the results of their coding agents, even when used within very capable agents like Claude Code. Serena is often described to be a game changer, providing an enormous productivity boost.

Serena excels at navigating and manipulating complex codebases, providing tools that support precise code retrieval and editing in the presence of large, strongly structured codebases. However, when dealing with tasks that involve only very few/small files, you may not benefit from including Serena on top of your existing coding agent. In particular, when writing code from scratch, Serena will not provide much value initially, as the more complex structures that Serena handles more gracefully than simplistic, file-based approaches are yet to be created.

Several videos and blog posts have talked about Serena:

Acknowledgements

Sponsors

We are very grateful to our sponsors who help us drive Serena's development. The core team (the founders of Oraios AI) put in a lot of work in order to turn Serena into a useful open source project. So far, there is no business model behind this project, and sponsors are our only source of income from it.

Sponsors help us dedicating more time to the project, managing contributions, and working on larger features (like better tooling based on more advanced LSP features, VSCode integration, debugging via the DAP, and several others). If you find this project useful to your work, or would like to accelerate the development of Serena, consider becoming a sponsor.

We are proud to announce that the Visual Studio Code team, together with Microsoft’s Open Source Programs Office and GitHub Open Source have decided to sponsor Serena with a one-time contribution!

Community Contributions

A significant part of Serena, especially support for various languages, was contributed by the open source community. We are very grateful for the many contributors who made this possible and who played an important role in making Serena what it is today.

Technologies

We built Serena on top of multiple existing open-source technologies, the most important ones being:

  1. multilspy. A library which wraps language server implementations and adapts them for interaction via Python. It provided the basis for our library Solid-LSP (src/solidlsp). Solid-LSP provides pure synchronous LSP calls and extends the original library with the symbolic logic that Serena required.
  2. Python MCP SDK
  3. All the language servers that we use through Solid-LSP.

Without these projects, Serena would not have been possible (or would have been significantly more difficult to build).

Customizing and Extending Serena

It is straightforward to extend Serena's AI functionality with your own ideas. Simply implement a new tool by subclassing serena.agent.Tool and implement the apply method with a signature that matches the tool's requirements. Once implemented, SerenaAgent will automatically have access to the new tool.

It is also relatively straightforward to add support for a new programming language.

We look forward to seeing what the community will come up with! For details on contributing, see contributing guidelines.

Star History

Star History Chart

Repository Owner

oraios
oraios

Organization

Repository Details

Language Python
Default Branch main
Size 4,497 KB
Contributors 30
License MIT License
MCP Verified Nov 11, 2025

Programming Languages

Python
86.83%
JavaScript
3.65%
AL
1.39%
Elixir
1.18%
CSS
1.08%
Erlang
1.08%
Nix
0.84%
HTML
0.79%
Lua
0.51%
Ruby
0.43%
Dart
0.42%
HCL
0.27%
Shell
0.26%
Zig
0.24%
R
0.14%
Dockerfile
0.12%
Haskell
0.11%
Swift
0.09%
Fortran
0.09%
Elm
0.08%
C
0.08%
Open Policy Agent
0.07%
Rust
0.04%
Scala
0.04%
Java
0.04%
Clojure
0.03%
Kotlin
0.03%
Julia
0.02%
Perl
0.02%
PHP
0.02%
TypeScript
0.02%
Go
0.01%

Tags

Topics

agent ai ai-coding claude claude-code language-server llms mcp-server programming vibe-coding

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • MCP Claude Code

    MCP Claude Code

    Claude Code-like functionality via the Model Context Protocol.

    Implements a server utilizing the Model Context Protocol to enable Claude Code functionality, allowing AI agents to perform advanced codebase analysis, modification, and command execution. Supports code understanding, file management, and integration with various LLM providers. Offers specialized tools for searching, editing, and delegating tasks, with robust support for Jupyter notebooks. Designed for seamless collaboration with MCP clients including Claude Desktop.

    • 281
    • MCP
    • SDGLBL/mcp-claude-code
  • MCP Language Server

    MCP Language Server

    Bridge codebase navigation tools to AI models using MCP-enabled language servers.

    MCP Language Server implements the Model Context Protocol, allowing MCP-enabled clients, such as LLMs, to interact with language servers for codebase navigation. It exposes standard language server features—like go to definition, references, rename, and diagnostics—over MCP for seamless integration with AI tooling. The server supports multiple languages by serving as a proxy to underlying language servers, including gopls, rust-analyzer, and pyright.

    • 1,256
    • MCP
    • isaacphi/mcp-language-server
  • Sourcerer MCP

    Sourcerer MCP

    Semantic code search & navigation MCP server for efficient AI agent context retrieval.

    Sourcerer MCP provides a Model Context Protocol (MCP) server that enables AI agents to perform semantic code search and navigation. By indexing codebases at the function, class, and chunk level, it allows agents to retrieve only the necessary code snippets, greatly reducing token consumption. The tool integrates with Tree-sitter for language parsing and OpenAI for generating code embeddings, supporting advanced contextual code understanding without full file ingestion.

    • 95
    • MCP
    • st3v3nmw/sourcerer-mcp
  • Sequa MCP

    Sequa MCP

    Bridge Sequa's advanced context engine to any MCP-capable AI client.

    Sequa MCP acts as a seamless integration layer, connecting Sequa’s knowledge engine with various AI coding assistants and IDEs via the Model Context Protocol (MCP). It enables tools to leverage Sequa’s contextual knowledge streams, enhancing code understanding and task execution across multiple repositories. The solution provides a simple proxy command to interface with standardized MCP transports, supporting configuration in popular environments such as Cursor, Claude, VSCode, and others. Its core purpose is to deliver deep, project-specific context to LLM agents through a unified and streamable endpoint.

    • 16
    • MCP
    • sequa-ai/sequa-mcp
  • Exa MCP Server

    Exa MCP Server

    Fast, efficient web and code context for AI coding assistants.

    Exa MCP Server provides a Model Context Protocol (MCP) server interface that connects AI assistants to Exa AI’s powerful search capabilities, including code, documentation, and web search. It enables coding agents to retrieve precise, token-efficient context from billions of sources such as GitHub, StackOverflow, and documentation sites, reducing hallucinations in coding agents. The platform supports integration with popular tools like Cursor, Claude, and VS Code through standardized MCP configuration, offering configurable access to various research and code-related tools via HTTP.

    • 3,224
    • MCP
    • exa-labs/exa-mcp-server
  • Semgrep MCP Server

    Semgrep MCP Server

    A Model Context Protocol server powered by Semgrep for seamless code analysis integration.

    Semgrep MCP Server implements the Model Context Protocol (MCP) to enable efficient and standardized communication for code analysis tasks. It facilitates integration with platforms like LM Studio, Cursor, and Visual Studio Code, providing both Docker and Python (PyPI) deployment options. The tool is now maintained in the main Semgrep repository with continued updates, enhancing compatibility and support across developer tools.

    • 611
    • MCP
    • semgrep/mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results