# Serena — Semantic Code Agent via MCP > Serena is a coding agent MCP server with semantic code retrieval and editing. 22K+ stars. Understands classes, functions, symbols for precise context-aware edits. MIT. ## Install Merge the JSON below into your `.mcp.json`: # Serena — Semantic Code Agent via MCP > A coding agent MCP server that understands code structure — classes, functions, symbols — for precise, context-aware edits. 22K+ GitHub stars. ## Quick Use ```bash pip install serena serena init ``` Add to your Claude Code MCP config (`.claude/mcp.json`): ```json { "mcpServers": { "serena": { "command": "serena", "args": ["serve", "--project", "."] } } } ``` Now Claude Code can navigate, understand, and edit your codebase at the symbol level — not just files. ## Intro Serena is a semantic code retrieval and editing toolkit that works as an MCP server. Unlike basic filesystem MCP tools that operate on raw files, Serena understands your code's structure: - **Symbol-level navigation**: Jump to class definitions, function signatures, method implementations across files - **Semantic search**: Find code by meaning, not just string matching — "find the authentication middleware" works - **Precise edits**: Edit specific functions or classes without touching surrounding code - **Multi-language**: Python, TypeScript, JavaScript, Go, Rust, Java, and more via tree-sitter - **Context windows**: Automatically provides relevant context (imports, types, related functions) to the AI agent This makes AI coding agents significantly more effective — instead of reading entire files, they can surgically navigate to exactly what they need. ## FAQ **Q: How is this different from the Filesystem MCP Server?** A: Filesystem MCP operates on raw files (read/write/list). Serena operates on code symbols (classes, functions, imports). It's the difference between a text editor and an IDE. **Q: Does it work with Claude Code?** A: Yes, as an MCP server. Add it to your `.claude/mcp.json` and Claude Code gains semantic code understanding. **Q: What languages does it support?** A: Python, TypeScript/JavaScript, Go, Rust, Java, C/C++, Ruby, and more. Uses tree-sitter for parsing, so language support is broad and accurate. **Q: Does it require an index?** A: It builds a lightweight index on first run (`serena init`). Incremental updates are fast — typically < 1 second for file changes. ## Works With - Claude Code (MCP server) - Cursor, Windsurf (MCP integration) - Any MCP-compatible AI agent - Python, TypeScript, Go, Rust, Java, C/C++, Ruby ## Source & Thanks - GitHub: https://github.com/oraios/serena (22K+ stars) - License: MIT - Docs: https://serena.dev --- Source: https://tokrepo.com/en/workflows/5c63d696-1d73-4e33-994a-8d7d7151c640 Author: MCP Hub