nesbo/dotnet-claude-code-skills/add-serena
Claude Code and agent skill by nesbo/dotnet-claude-code-skills
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install nesbo/dotnet-claude-code-skills/add-serenaSKILL.md
Add Serena MCP to Any Project
This skill helps you add Serena MCP (Model Context Protocol) to any software project, providing IDE-like semantic code understanding and navigation capabilities with true multi-project support.
What is Serena MCP?
Serena is a coding agent toolkit that provides:
- Language Server Protocol (LSP) integration for semantic code understanding
- Symbol-level navigation (find definitions, references, implementations)
- Precise code editing tools (insert after symbol, replace symbol body)
- Project-aware search and file operations
- Memory system for storing project-specific context
- Onboarding and project structure analysis
Supported languages: C#, Python, TypeScript, JavaScript, Go, Rust, Java, and more.
Multi-Project Philosophy
This skill enables you to add Serena to ANY project independently.
Key principles:
- Project-specific configuration - Each project has its own
.mcp.jsonand.serena/folder - Complete isolation - Projects don't interfere with each other
- Separate memory and state - Each project maintains its own context
- No global installation - No hardcoded paths in
~/.claude.json - Team-friendly - Configuration can be version controlled for team sharing
How it works:
- You add Serena to Project A → Works in Project A
- You add Serena to Project B → Works in Project B
- Both projects maintain separate Serena instances with isolated state
- You can work on multiple projects without reconfiguration
Prerequisites Check
Before adding Serena, verify:
1. uv (Python package manager) is installed
If not installed, see: https://github.com/astral-sh/uv
2. Python 3.11 is available
3. Language-specific requirements
- C#: Requires .sln file in project directory
- Python: Requires pyproject.toml or setup.py
- TypeScript/JavaScript: Requires tsconfig.json or package.json
- Go: Requires go.mod
- Rust: Requires Cargo.toml
- Java: Requires Maven or Gradle project file
4. Git repository (optional but recommended)
For .gitignore integration and version control benefits.
Installation Approach Overview
Per-Project Configuration with Helper Script
This approach creates three main components in your project:
- `.mcp.json` - Tells Claude Code to load Serena MCP server for this project
- `.serena/start-mcp.sh` - Portable helper script that auto-detects project root
- `.serena/project.yml` - Project-specific Serena configuration
Benefits:
- ✅ Each project is self-contained and independent
- ✅ Completely portable across team members
- ✅ No manual path configuration needed
- ✅ Can be version controlled for team consistency
- ✅ Works reliably regardless of where you start Claude Code
Why helper script?
- MCP servers can't reliably detect current working directory when launched via
uvx - Helper script ensures Serena always knows the correct project root
- More portable than hardcoded absolute paths
Interactive Setup Guide
When using this skill, Claude Code will ask you several questions to customize the setup:
Question 1: Programming Language
"Which programming language is this project?"
Options: C#, Python, TypeScript, JavaScript, Go, Rust, Java, Other
This determines:
- Language server configuration in
.serena/project.yml - Which project files to look for (.sln, pyproject.toml, etc.)
- LSP features available
Question 2: Version Control
"Should Serena configuration be version controlled and committed to git?"
Option A: Yes, commit for team (Recommended for team projects)
.mcp.json,.serena/start-mcp.sh, and.serena/project.ymlare committed- Entire team gets the same Serena setup
- No manual configuration per developer
- Best for: Team projects, shared codebases
Option B: No, keep it local (Recommended for personal tooling)
- Add Serena files to
.gitignore - Each developer configures independently
- Optional tooling, not required for the project
- Best for: Solo projects, experimental tools
Question 3: Permissions
"Should Serena tools be pre-approved?"
Option A: Yes, create settings.local.json with common tools
- Pre-approves frequently used Serena tools
- Less interactive prompting during use
- Still safe - only Serena tools are pre-approved
- Best for: Frequent Serena users
Option B: No, I'll approve interactively
- Claude Code prompts for each tool use
- More explicit control
- More clicking required
- Best for: Security-conscious users, occasional use
Installation Steps
Step 1: Navigate to Your Project
Ensure you're in the project root directory where you want to add Serena.
Step 2: Use the add-serena Skill
In Claude Code, say:
or
Claude Code will then ask you the interactive questions (language, version control, permissions) and create all necessary files.
Step 3: Files Created
The skill creates the following structure:
.mcp.json
This tells Claude Code: "When running in this directory, start the Serena MCP server using the helper script."
.serena/start-mcp.sh
This script:
- Auto-detects the project root directory
- Launches Serena with
uvx(downloads and runs from GitHub) - Passes the correct project path to Serena
.serena/project.yml
Configuration options:
language: Programming language for LSP integrationignore_all_files_in_gitignore: Respect .gitignore patternsignored_paths: Additional paths to ignoreread_only: If true, disables editing toolsexcluded_tools: List of tools to disableproject_name: Human-readable project identifier
.claude/settings.local.json (Optional)
Only created if you chose to pre-approve Serena tools.
Step 4: Update .gitignore
The skill will update (or create) .gitignore based on your version control choice:
If you chose to version control Serena config:
If you chose NOT to version control:
Step 5: Restart Claude Code
After the skill creates the files:
- Exit Claude Code completely (Ctrl+C or exit command)
- Navigate to your project directory:
``bash cd /path/to/your/project ``
- Start Claude Code:
``bash claude . ` or `bash claude code ``
Step 6: Approve Project-Scoped MCP Server
When Claude Code starts, you'll see a prompt:
Choose "Always for this project" to avoid being asked again.
Security Note: Claude Code prompts for approval because project-scoped MCP servers can execute code. Only approve servers you trust.
Verification & Testing
Check MCP Server Status
Run the /mcp command in Claude Code:
You should see:
Test Basic Functionality
Try these commands to verify Serena is working:
- List directory contents:
`` Use mcp__serena__list_dir to list files in src/ ``
- Find a symbol:
`` Use mcp__serena__find_symbol to find the definition of MyClass ``
- Search for pattern:
`` Use mcp__serena__search_for_pattern to search for "TODO" in the codebase ``
- Onboard project:
`` Use mcp__serena__onboard to analyze the project structure ``
Verify Project Isolation
To confirm multiple projects work independently:
- Add Serena to Project A
- Add Serena to Project B
- Start Claude Code in Project A - Serena should work
- Start Claude Code in Project B - Serena should work independently
- Check
.serena/.state/in each project - should be different
Available Serena Tools
Once configured, these tools are available through Claude Code:
File & Project Navigation
mcp__serena__list_dir- List directory contentsmcp__serena__find_file- Find files by patternmcp__serena__read_file- Read file contentsmcp__serena__search_for_pattern- Search for text patterns
Symbol-Level Code Understanding
mcp__serena__get_symbols_overview- Get overview of symbols in a filemcp__serena__find_symbol- Find symbol definitionsmcp__serena__find_referencing_symbols- Find all references to a symbolmcp__serena__get_document_symbols- Get all symbols in a documentmcp__serena__get_symbol_definition- Get symbol definition
Code Editing (if read_only: false)
mcp__serena__insert_after_symbol- Insert code after a symbolmcp__serena__replace_symbol_body- Replace symbol implementationmcp__serena__delete_symbol- Delete a symbol
Memory & Context
mcp__serena__write_memory- Store project-specific informationmcp__serena__read_memory- Retrieve stored informationmcp__serena__think_about_collected_information- Analyze collected data
Project Understanding
mcp__serena__onboard- Analyze and understand project structure
Decision Guides
Should I Version Control Serena Config?
Commit Serena config (.mcp.json, .serena/) when:
- ✅ Working on a team project
- ✅ Want all developers to have same tools
- ✅ Serena is essential to project workflow
- ✅ Want to onboard new developers faster
- ✅ Team agrees on using Claude Code + Serena
Gitignore Serena config when:
- ❌ Solo project or personal experimentation
- ❌ Team doesn't use Claude Code
- ❌ Serena is optional tooling, not required
- ❌ Developers have different tool preferences
Should I Pre-Approve Serena Tools?
Pre-approve (create settings.local.json) when:
- ✅ You trust Serena and use it frequently
- ✅ Want faster workflow with less clicking
- ✅ Comfortable with Serena's capabilities
- ✅ Project is your own or trusted team project
Approve interactively (skip settings.local.json) when:
- ❌ First time using Serena
- ❌ Want explicit control over each tool use
- ❌ Working on sensitive or unfamiliar codebase
- ❌ Prefer security through explicit approval
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingadd-serena/SKILL.md
Popularity
- Repository stars
- 46
- Repository forks
- 2
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nesbo/dotnet-claude-code-skills/add-serena)