# Serena MCP server

> Give coding agents IDE-like semantic code retrieval, editing and refactoring through language servers.

- Listing: https://mcp.tc/i/serena
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: no API key needed
- Category: [Developer Tools](https://mcp.tc/c/developer-tools)
- Vendor: Oraios AI
- Homepage: <https://oraios.github.io/serena/>
- Repository: <https://github.com/oraios/serena>
- Package: pypi `serena-agent`

## About

Serena adds symbol-level code tools to an MCP client. Agents can find symbols and references, edit code and refactor across files without reading whole files or relying on line numbers. It also includes a memory system for long-running agent workflows.

It runs locally over stdio, started with uvx from the serena-agent PyPI package. By default it uses language servers (over 40 languages listed in the README). An optional paid JetBrains plugin can serve as the backend instead. No API key is documented for the server itself.

## What it can do

- Retrieve code at the symbol level, including references
- Edit code by symbol instead of line numbers
- Refactor across files, such as renames and moves
- Work with over 40 languages via language servers
- Optionally use the JetBrains plugin as the backend
- Keep agent memory for long-lived workflows

## Example prompts

- "Find all references to the processOrder function in this project."
- "Rename the UserService class and update every usage across files."
- "Show me the symbol overview of src/api/client.py."
- "Replace the body of the parse\_config function with this new version."

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio serena -- uvx -p 3.13 --from serena-agent serena start-mcp-server --context claude-code --project-from-cwd
```

2. Start Claude Code and type `/mcp`. **serena** should show as connected.

Add `--scope user` to make it available in every project.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "serena": {
      "command": "uvx",
      "args": [
        "-p",
        "3.13",
        "--from",
        "serena-agent",
        "serena",
        "start-mcp-server",
        "--context",
        "claude-code",
        "--project-from-cwd"
      ]
    }
  }
}
```

2. Save the file and restart Claude Desktop.

Needs uv (Python) on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=serena&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItcCIsIjMuMTMiLCItLWZyb20iLCJzZXJlbmEtYWdlbnQiLCJzZXJlbmEiLCJzdGFydC1tY3Atc2VydmVyIiwiLS1jb250ZXh0IiwiY2xhdWRlLWNvZGUiLCItLXByb2plY3QtZnJvbS1jd2QiXX0%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "serena": {
      "command": "uvx",
      "args": [
        "-p",
        "3.13",
        "--from",
        "serena-agent",
        "serena",
        "start-mcp-server",
        "--context",
        "claude-code",
        "--project-from-cwd"
      ]
    }
  }
}
```

Needs uv (Python) on your computer.

### VS Code

[Install in VS Code](<https://vscode.dev/redirect/mcp/install?name=serena&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22-p%22%2C%223.13%22%2C%22--from%22%2C%22serena-agent%22%2C%22serena%22%2C%22start-mcp-server%22%2C%22--context%22%2C%22claude-code%22%2C%22--project-from-cwd%22%5D%7D>) (opens VS Code)

Or from a terminal:

```bash
code --add-mcp '{"name":"serena","type":"stdio","command":"uvx","args":["-p","3.13","--from","serena-agent","serena","start-mcp-server","--context","claude-code","--project-from-cwd"]}'
```

Or commit it to the repo in `.vscode/mcp.json`:

`.vscode/mcp.json`:

```json
{
  "servers": {
    "serena": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "-p",
        "3.13",
        "--from",
        "serena-agent",
        "serena",
        "start-mcp-server",
        "--context",
        "claude-code",
        "--project-from-cwd"
      ]
    }
  }
}
```

Needs uv (Python) on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "serena": {
      "command": "uvx",
      "args": [
        "-p",
        "3.13",
        "--from",
        "serena-agent",
        "serena",
        "start-mcp-server",
        "--context",
        "claude-code",
        "--project-from-cwd"
      ]
    }
  }
}
```

2. Refresh the MCP server list in Cascade.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add serena -- uvx -p 3.13 --from serena-agent serena start-mcp-server --context claude-code --project-from-cwd
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.serena]
command = "uvx"
args = ["-p", "3.13", "--from", "serena-agent", "serena", "start-mcp-server", "--context", "claude-code", "--project-from-cwd"]
```

Needs uv (Python) on your computer.

### Gemini CLI

```bash
gemini mcp add serena uvx -- -p 3.13 --from serena-agent serena start-mcp-server --context claude-code --project-from-cwd
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

```json
{
  "mcpServers": {
    "serena": {
      "command": "uvx",
      "args": [
        "-p",
        "3.13",
        "--from",
        "serena-agent",
        "serena",
        "start-mcp-server",
        "--context",
        "claude-code",
        "--project-from-cwd"
      ]
    }
  }
}
```

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs uv (Python) on your computer.

## Details

- Server version: 1.5.3
- Last checked: 2026-10-03
- Listed: 2026-10-03
- Updated: 2026-10-03

---
Source: https://mcp.tc/i/serena (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
