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 MCP server exists for a simple reason — assistants are far more useful when they can act on Serena directly instead of describing what you should do. 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.

What you get

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.

Setting it up

The server ships on PyPI as serena-agent, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

What the assistant can call

Once Serena is connected, these are the calls the assistant has available:

  • find_symbol — Locate a symbol by name or path anywhere in the activated project
  • get_symbols_overview — Return a structural outline of the top-level symbols in a file
  • find_referencing_symbols — Enumerate every symbol that references a given definition, across files
  • find_implementations — Find implementations of an interface or abstract member, where the language server supports it
  • find_declaration — Jump to the declaration of a symbol; generally limited to project code rather than external dependencies
  • rename_symbol — Perform a semantic cross-file rename as a single atomic operation
  • replace_symbol_body — Replace the body of a symbol without touching surrounding code or relying on line numbers
  • insert_after_symbol — Insert new code immediately after a named symbol
  • insert_before_symbol — Insert new code immediately before a named symbol
  • get_diagnostics_for_file — Fetch language-server diagnostics for an entire file
  • get_diagnostics_for_symbol — Fetch diagnostics scoped to a single symbol
  • search_for_pattern — Flexible regular-expression search across the codebase

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.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 20 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Serena.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the serena mcp server does with a few real requests.

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Serena's toolset — find_symbol, get_symbols_overview, find_referencing_symbols and 17 more — is a fair guide to whether it matches your workflow. It is maintained by Oraios AI rather than a third party, which usually means auth handling and breaking changes are dealt with faster.

This entry was verified against Serena's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

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.

Available tools

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.