S

Serena LSP MCP Server

Semantic code intelligence via Language Server Protocol - navigate symbols, find references, track type hierarchies, and perform targeted code reads. Gives Claude Code deep understanding of your codebase structure without reading every file.

MCPCommunitydevelopmentv1.0.0MIT
0 views0 copies

MCP Server Configuration

{ "mcpServers": { "serena": { "command": "uvx", "args": [ "serena", "--workspace", "/path/to/your/project" ] } } }

Available Tools

ToolDescription
find_symbolFind symbols (functions, classes, variables) by name
get_symbol_definitionJump to the definition of a symbol
find_referencesFind all references to a symbol across the codebase
get_hover_infoGet type information and documentation for a symbol
get_diagnosticsGet current errors and warnings from the language server
read_rangeRead a specific range of lines from a file
get_document_symbolsList all symbols defined in a file
get_type_hierarchyShow type hierarchy (supertypes/subtypes)
get_call_hierarchyShow incoming/outgoing calls for a function

Supported Languages

  • TypeScript/JavaScript: via typescript-language-server
  • Python: via pylsp or pyright
  • Rust: via rust-analyzer
  • Go: via gopls
  • Java: via jdtls
  • C/C++: via clangd

Setup

  1. Install uvx (comes with uv): curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Ensure the relevant language server is installed for your project
  3. Replace /path/to/your/project with your actual project root
  4. Serena auto-detects the project language and launches the appropriate LSP

Why Use Serena?

  • Precise navigation: Find exact definitions instead of grep-based guessing
  • Type awareness: Understand interfaces, generics, and type hierarchies
  • Refactoring support: Find all references before renaming or removing code
  • Error detection: Surface compile-time errors without running the build
  • Efficient context: Read only the relevant code ranges instead of entire files

Security Notes

  • Runs locally - no code leaves your machine
  • Read-only access to your codebase (no file modifications)
  • Language servers may download type definitions or dependencies
  • Workspace path determines the scope of code analysis
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates