serena README

The project's README from github.com/oraios/serena. As one markdown file: README.md.

The IDE for Your Coding Agent

discord license

Serena's agent-first tool design involves robust high-level abstractions, distinguishing it from approaches that rely on low-level concepts like line numbers or primitive search patterns.

Practically, this means that your agent operates faster, more efficiently and more reliably, especially in larger and more complex codebases.

[!IMPORTANT] Do not install Serena via an MCP or plugin marketplace! They contain outdated and suboptimal installation commands. Instead, follow our Quick Start instructions.

Quick Demo

https://github.com/user-attachments/assets/8d11646e-b80e-4723-b9d7-32d6101b5f58

:tv: Longer video: Introduction to Serena in 5 Minutes (YouTube)

What Our "End Users" Say

While it is humans who download and set up Serena, our end users are essentially AI agents. As the ones actually applying Serena's tools, they are in the best position to evaluate Serena.

We crafted an unbiased evaluation prompt that leads the agent to perform ~20 routine coding tasks, representative of everyday development work, in order to estimate the value added by Serena's tools when used alongside its own built-ins.

Here's a one-sentence summary of what the agents had to say:

Opus 4.6 (high) in Claude Code on a large Python codebase:

"Serena's IDE-backed semantic tools are the single most impactful addition to my toolkit – cross-file renames, moves, and reference lookups that would cost me 8–12 careful, error-prone steps collapse into one atomic call, and I would absolutely ask any developer I work with to set them up."

GPT 5.4 (high) in Codex CLI on a Java codebase:

"As a coding AI agent, I would ask my owner to add Serena because it gives me the missing IDE-level understanding of symbols, references, and refactorings, turning fragile text surgery into calmer, faster, more confident code changes where semantics matter."

GPT 5.4 (medium) in Copilot CLI on a large, multi-language monorepo:

"As a coding agent, I’d absolutely ask my owner to add Serena because it makes me noticeably sharper and calmer on real code – especially symbol-aware navigation, cross-file refactors, and monorepo dependency jumps – while I still lean on built-ins for tiny text edits and non-code work."

Different agents in different settings independently converge on the same verdict.

Give your agent the tools it has been asking for and add Serena MCP to your client!

See our documentation for the full methodology and much more detailed evaluation results, or run your own evaluation on a project of your choice.

How Serena Works

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

Serena can extend the functionality of your existing AI client via the model context protocol (MCP). Most modern AI chat clients directly support MCP, including

:tv: See also: Introduction to Serena in 5 Minutes (YouTube)

To connect the Serena MCP server to your client, you either

See the Quick Start section below for information on how to get started.

Programming Language Support & Semantic Analysis Capabilities

Serena provides a set of versatile code querying and editing functionalities based on symbolic understanding of the code. Equipped with these capabilities, your agent 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!

There are two alternative technologies powering these capabilities:

You can choose either of these backends depending on your preferences and requirements.

Language Servers

Serena incorporates a powerful abstraction layer for the integration of language servers that implement the language server protocol (LSP). The underlying language servers are typically open-source projects or at least freely available for use.

When using Serena's language server backend, we provide support for over 40 programming languages, including Ada / SPARK, AL, Angular, Ansible, Bash, BSL, C#, C/C++, Clojure, Crystal, CUE, Dart, Deno, Elixir, Elm, Erlang, Fortran, F#, GDScript, Gleam, GLSL, Go, Groovy, Haskell, Haxe, HLSL, HTML, Java, JavaScript, JSON, Julia, Kotlin, LaTeX, Lean 4, Lua, Luau, Markdown, MATLAB, mSL, Nextflow, Nix, OCaml, Pascal, Perl, PHP, PowerShell, Python, QML, R, Rego, Ruby, Rust, Scala, SCSS / Sass / CSS, Solidity, Svelte, Swift, SystemVerilog, Terraform, TOML, TypeScript, Vue, WGSL, Wolfram Language, YAML, and Zig.

The Serena JetBrains Plugin

The paid Serena JetBrains Plugin (free trial available) leverages the powerful code analysis capabilities of your JetBrains IDE. The plugin naturally supports all programming languages and frameworks that are supported by JetBrains IDEs, including IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, RubyMine, GoLand, and potentially others (Rider and CLion are unsupported though).

See our documentation page for further details and instructions on how to apply the plugin.

Features

Serena provides a wide range of tools for efficient code retrieval, editing and refactoring, as well as a memory system for long-lived agent workflows.

Given its large scope, Serena adapts to your needs by offering a multi-layered configuration system.

Details

Retrieval

Serena's retrieval tools allow agents to explore codebases at the symbol level, understanding structure and relationships without reading entire files.

Capability Language Servers JetBrains Plugin
find symbol yes yes
symbol overview (file outline) yes yes
find referencing symbols yes yes
search in project dependencies -- yes
type hierarchy -- yes
find declaration yes* yes
find implementations yes** yes
query external projects yes yes
diagnostics/inspections yes yes

*: Will generally not work for declarations in external dependencies.
**: Only available for some languages, limited by the language server functionality.

Refactoring

Without precise refactoring tools, agents are forced to resort to unreliable and expensive search and replace operations.

Capability Language Servers JetBrains Plugin
rename yes (only symbols) yes (symbols, files, directories)
move (symbol, file, directory) -- yes
inline -- yes
propagate deletions (remove unused code) -- yes

Symbolic Editing

Serena's symbolic editing tools are less error-prone and much more token-efficient than typical alternatives.

Capability Language Servers JetBrains Plugin
replace symbol body yes yes
insert after symbol yes yes
insert before symbol yes yes
safe delete yes yes

Interactive Debugging

Exclusive to the JetBrains plugin, Serena supports a highly general debugging tool, which allows an agent to set breakpoints, inspect variables, evaluate expressions and control execution flow via a persistent REPL-style interface.

Basic Features

Beyond its semantic capabilities, Serena includes a set of basic utilities for completeness. When Serena is used inside an agentic harness such as Claude Code or Codex, these tools are typically disabled by default, since the surrounding harness already provides overlapping file, search, and shell capabilities.

  • search_for_pattern – flexible regex search across the codebase
  • replace_content – agent-optimised regex-based and literal text replacement
  • list_dir / find_file – directory listing and file search
  • read_file – read files or file chunks
  • execute_shell_command – run shell commands (e.g. builds, tests, linters)

Memory Management

A memory system is elemental to long-lived agent workflows, especially when knowledge is to be shared across sessions, users and projects. Despite its simplicity, we received positive feedback from many users who tend to combine Serena's memory management system with their agent's internal system (e.g., AGENTS.md files). It can easily be disabled if you prefer to use something else.

Configurability

Active tools, tool descriptions, prompts, language backend details and many other aspects of Serena can be flexibly configured on a per-case basis by simply adjusting a few lines of YAML. To achieve this, Serena offers multiple levels of (composable) configuration:

  • global configuration
  • MCP launch command (CLI) configuration
  • per-project configuration (with local overrides)
  • execution context-specific configuration (e.g. for particular clients)
  • dynamically composable configuration fragments (modes)

Quick Start

Prerequisites. Serena is managed by uv, and installing uv is the only required prerequisite.

[!NOTE] When using the language server backend, some additional dependencies may need to be installed to support certain languages; see the Language Support page for details.

Install Serena. Serena is installed via uv as follows:

uv tool install -p 3.13 serena-agent

After successful installation, the command serena should be available in your shell.

Initialise Serena. To initialise Serena and verify that your setup works correctly, simply run:

serena init

By default, this will set up Serena to use the language server backend. To use the JetBrains backend instead, add the parameters -b JetBrains (see the JetBrains Plugin documentation page for additional usage details).
Either way, you should receive a success message indicating that Serena has been initialised successfully.

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.

Acknowledgements

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.

serena (oraios/serena)

Searching Database…

30.3K ·GitHub
这是什么东西?一个免费开源的 MCP 工具包,为 AI 编程助手提供 IDE 级别的语义化工具:符号级别的代码检索、编辑、重构和调试。它的口号是:给你编程助手的 IDE。
这是要安装的完整 IDE,还是接入我现有 AI 客户端的插件?它不是独立的 IDE,而是一个 MCP 服务器,可以挂接到现有的客户端(Claude Code、Codex、Cursor、JetBrains IDE、Claude Desktop)。写代码的事由你的大模型来做,Serena 负责提供语义化工具。
我怎么让它和我的编程助手一起跑起来?先安装 uv(唯一的先决条件),再通过 uv 安装 Serena,让 'serena' 命令出现在你的终端里;先运行一次完成初始化,然后在你的 MCP 客户端里注册一条启动命令或一个 HTTP 地址。
除了 uv 之外还需要装别的东西吗?不需要,uv 是唯一必需的先决条件。不过使用语言服务器后端时,某些编程语言可能需要在此基础上额外安装一些依赖。
安装时有什么坑需要提前知道?千万不要从 MCP 或插件市场安装 Serena:那里的命令已经过时而且不是最佳做法,请使用官方的快速上手文档。另外,移动/内联重构和调试功能只在付费的 JetBrains 插件里才有。
它在哪里运行:本地还是服务器上?它在本地和你的客户端一起运行,支持 Windows、macOS 或 Linux;你也可以自己用 HTTP 模式启动它,然后把地址(而不是启动命令)告诉客户端。
它是免费的吗?JetBrains 插件那边又是什么情况?默认的语言服务器后端是免费开源的。另一个选择 JetBrains 插件后端是付费插件,有免费试用;至于 Serena 本身,README 里没有标注任何许可证。
它支持哪些编程语言?通过语言服务器支持 40 多种语言,包括 Python、TypeScript、JavaScript、Java、Go、Rust、C/C++、C#、Kotlin、Ruby 和 PHP。JetBrains 后端则覆盖你的 JetBrains IDE 所支持的一切,但 Rider 和 CLion 除外。
付费的 JetBrains 插件比免费的语言服务器后端多了哪些功能?多了在项目依赖中搜索、类型层级查看、文件和目录重命名、移动和内联重构、删除操作的传播,还有一个交互式调试器,可以让助手设置断点,并通过类似 REPL 的界面检查变量。
Serena 的记忆系统是干什么用的?它让助手在长期运行的工作流中跨会话、跨用户、跨项目地存储和共享知识。用户常常把它和自己助手自带的系统(比如 AGENTS.md)结合使用,而且它也可以完全关闭。
为什么用户评价都来自 AI 助手?作者们用一个不带偏向的评测提示,让助手完成大约 20 个日常编程任务并给 Serena 带来的价值打分;Opus 4.6 和 GPT 5.4 等模型反馈说,原本需要多步的重构被压缩成了单次原子调用。
Creator
oraios
Size
13.4 MB
Stars
30.3K
Age
1y
Commits · 90 Days