Serena MCP
Lets your AI agent find, edit and refactor code at the symbol level, like an IDE does.
31k stars on GitHubby OraiosLicense NOASSERTIONUpdated 26 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add serena -- uvx -p 3.13 start-mcp-server --project-from-cwd --context desktop-app serena-agent
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Find everywhere this function is used and rename it to a clearer name
Show me an outline of this file's classes and methods
What it is
Serena gives your coding agent IDE-style tools: it can find symbols, see who references them, rename them and replace or insert code, instead of working with line numbers and text search. It uses language servers for over 40 languages, or a paid JetBrains plugin. This helps agents work faster and more reliably in large codebases.
What it can do
- Find a symbol and get a file outline
- Find referencing symbols
- Rename symbols across files
- Replace a symbol body or insert code before or after it
search_for_pattern: regex search across the codebasereplace_content: regex or literal text replacementlist_dir/find_file: list folders and find filesexecute_shell_command: run builds, tests or linters
When to use
- βΊWhen you work in a large codebase and want safe cross-file renames
- βΊWhen your agent wastes effort reading whole files to find one function
- βΊWhen you want an agent with memory that persists across sessions
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
refactorHas your agent refactor code to make it better and easier to maintain. It can rename variables, extract functions, and improve clarity without changing what the code does.gitnexus-refactoringHelps your agent rename, extract, split, or move code safely, checking what depends on it before any file is changed.lspLets your agent get diagnostic information and code definitions. It's used to check references, symbols, and rename safety in the project.Frequently asked questions
Is it free?
The language server backend is free and open source and is used by default. The JetBrains plugin is paid, with a free trial.
Which languages are supported?
Over 40 with language servers, including Python, TypeScript, Java, Go, Rust, C#, PHP and Ruby.
Which clients work with it?
Claude Code, Codex, OpenCode, Gemini CLI, VS Code, Cursor, JetBrains assistants, Claude Desktop and others.
Should I install it from a marketplace?
The readme says not to. Marketplaces have outdated commands, so install with uv instead.
Does it have memory?
Yes. It has a memory system for long-lived workflows, and you can turn it off.
Can it debug?
Interactive debugging with breakpoints is exclusive to the JetBrains plugin.
If it does not work
- βΊInstall uv first, then run the uv tool install command from the readme and check that the serena command works in your shell.
- βΊDo not install through an MCP or plugin marketplace, as the readme warns they are outdated.
- βΊRestart your MCP client fully after adding the launch command.
5 new skills a week. 1 minute to read.