# Serena MCP
[GitHub - oraios/serena: A powerful coding agent toolkit providing semantic retrieval and editing capabilities (MCP server & other integrations)](https://github.com/oraios/serena)
## Add MCP
### Claude Code
```sh
claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context ide-assistant --project $(pwd)
```
- web dashboard を開かないようにするには `--enable-web-dashboard false` を追加
- `--context` で tool set の切り替え
### Codex
`~/.codex/config.toml`
```sh
[mcp_servers.serena]
command = "uvx"
args = ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "codex"]
```
## Onboarding
```
プロジェクトの全体像を把握してください。
```
これやらなくても、初回は `check_onboarding_performed()` が走るっぽい。
## 仕組み
[話題のSerenaMCPの仕組みを解説! - izanami](https://izanami.dev/post/725d69ba-890d-4d0d-a06b-c81b77ccbc72)
- Serena MCP Serverの革新性は、MCP(Model Context Protocol)を通じてLSPの機能をAIに開放することにある
- AIはRAGで発見したコードに対して、IDE相当の構造解析を適用できるようになる