Serena MCP Server

Official

Symbol-level code navigation, refactoring and memory for coding agents — the IDE brain your assistant has been missing.

Local + remotestdiostreamable-httpssePythonMIT★ 27.4k

What is the Serena MCP Server?

Serena gives coding agents IDE-grade semantic tools: find symbols and references, rename and move code, edit at the symbol level, and keep project memories.

Configuration and credentials

uv is the only hard prerequisite — install with uv tool install -p 3.13 serena-agent, then run serena init. Some languages need their language server's own dependencies installed separately; the JetBrains backend requires a supported JetBrains IDE and the paid plugin.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

What you can do with it

Cross-file refactoring an agent can be trusted with

Rename a widely used function or class in one semantic operation instead of dozens of search-and-replace edits that silently miss call sites in strings, tests or sibling packages.

Understanding an unfamiliar codebase

Outline a file's symbols, jump to a definition, then list everything that references it — enough to answer 'what breaks if I change this?' without loading the repo into context.

Token-efficient edits in large repos

Symbolic editing replaces whole-file rewrites, which keeps context windows usable on monorepos where a single file can exceed a model's practical read budget.

Carrying knowledge between sessions

Store architectural notes and conventions as Serena memories so the next agent session starts informed rather than re-deriving the same conclusions.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
find_symbolLocate a symbol by name or path anywhere in the activated project.
get_symbols_overviewReturn a structural outline of the top-level symbols in a file.
find_referencing_symbolsEnumerate every symbol that references a given definition, across files.
find_implementationsFind implementations of an interface or abstract member, where the language server supports it.
find_declarationJump to the declaration of a symbol; generally limited to project code rather than external dependencies.
rename_symbolPerform a semantic cross-file rename as a single atomic operation.
replace_symbol_bodyReplace the body of a symbol without touching surrounding code or relying on line numbers.
insert_after_symbolInsert new code immediately after a named symbol.
insert_before_symbolInsert new code immediately before a named symbol.
get_diagnostics_for_fileFetch language-server diagnostics for an entire file.
get_diagnostics_for_symbolFetch diagnostics scoped to a single symbol.
search_for_patternFlexible regular-expression search across the codebase.
replace_contentRegex or literal text replacement tuned for agent use.
read_fileRead a whole file or a specific chunk of one.
list_dirList directory contents within the project.
find_fileFind files by name or pattern.
execute_shell_commandRun a shell command such as a build, test suite or linter.
write_memoryPersist a named project memory for use in later sessions.
read_memoryRead back a previously stored project memory.
list_memoriesList the memories stored for the active project.

How to install the Serena MCP Server

uv tool install -p 3.13 serena-agent && serena init && serena setup claude-code

Configuration

uv is the only hard prerequisite — install with uv tool install -p 3.13 serena-agent, then run serena init. Some languages need their language server's own dependencies installed separately; the JetBrains backend requires a supported JetBrains IDE and the paid plugin.

Example prompts to try

  • “Rename the UserSession class to AuthSession everywhere, including tests.”
  • “Show me every caller of parse_config and tell me which ones would break if I add a required argument.”
  • “Give me an outline of this module's public symbols before we start refactoring.”
  • “Replace the body of handle_webhook with an implementation that validates the signature first, then run the test suite.”

Frequently asked questions

The maintainers explicitly say no. Marketplace entries tend to freeze an old launch command, and Serena's CLI has changed. The supported path is to install the serena-agent package with uv (`uv tool install -p 3.13 serena-agent`), run `serena init` to verify the setup, then add a launch command or HTTP URL to your client — or run `serena setup claude-code` if you use Claude Code.