# Serena (MCP Server)

> Semantic code retrieval and editing toolkit for coding agents

- Type: MCP server
- Publisher: Oraios AI (official)
- Categories: Development, AI & ML
- Website: https://github.com/oraios/serena
- Docs: https://oraios.github.io/serena/
- Source: https://github.com/oraios/serena
- Transport: stdio
- Launch command: serena start-mcp-server --context ide
- Sign-in: none
- GitHub stars: 29932
- Listed: 2025-03-23

## About

Open-source coding toolkit that gives agents IDE-like symbolic navigation and editing via language servers. Supports finding symbols and references, symbol-level edits, renames and project memories across many languages. Installed with `uv tool install -p 3.13 serena-agent`.

## Install

1. **Add the server to Codex**

   Codex CLI:

   ```bash
   codex mcp add serena -- serena start-mcp-server --context ide
   ```

   config.toml:

   ```toml
   [mcp_servers.serena]
   command = "serena"
   args = ["start-mcp-server", "--context", "ide"]
   ```

   Agents SDK:

   ```python
   from agents import Agent, Runner
   from agents.mcp import MCPServerStdio
   
   async with MCPServerStdio(
       name="Serena",
       params={"command": "serena", "args": ["start-mcp-server", "--context", "ide"]},
   ) as server:
       agent = Agent(name="Assistant", mcp_servers=[server])
       result = await Runner.run(agent, "Find all references to the UserService class")
       print(result.final_output)
   ```

## Tools

- `find_symbol`
- `find_referencing_symbols`
- `get_symbols_overview`
- `replace_symbol_body`
- `insert_after_symbol`
- `insert_before_symbol`
- `rename_symbol`
- `search_for_pattern`
- `read_file`
- `replace_content`
- `write_memory`
- `read_memory`

## Example prompts

- "Find all references to the UserService class"
- "Rename the function parse_config to load_config everywhere"
- "Give me an overview of symbols in src/api"
- "Replace the body of the validate method"

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Context7](https://chatgptplugins.directory/mcp/context7.md): Pull up-to-date, version-specific library docs into your coding agent
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Stripe](https://chatgptplugins.directory/mcp/stripe.md): Query and act on your Stripe account and search Stripe docs from any agent

---
Source: https://chatgptplugins.directory/mcp/serena · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
