Overview
Integrate CodeAlive with Claude Code to enhance your AI coding assistant with deep contextual understanding of your entire codebase. This integration uses the Model Context Protocol (MCP) to provide Claude Code with semantic search and code intelligence capabilities.Claude Code defaults to its built-in
Grep/Glob for exploration. Connecting the MCP server alone won’t change that — add routing rules to your project’s CLAUDE.md so Claude reaches for CodeAlive first. See Custom Instructions below for a complete snippet.Prerequisites
- Claude Pro, Max, Team, or Enterprise subscription (required for MCP support)
- Claude Code installed
- CodeAlive account (Sign up here)
- Indexed repositories in your CodeAlive dashboard
Installation Steps
Claude Code supports both local and remote MCP servers with OAuth authentication.
1
Add via CLI (Recommended)
Run this command in your terminal:Start Claude Code, run
/mcp, select codealive, and complete browser sign-in. Claude Code stores and refreshes the OAuth credential automatically.Existing API-key configurations remain supported. Add
--header "Authorization: Bearer YOUR_API_KEY_HERE" only when you intentionally choose that fallback.2
Alternative: Docker (STDIO)
For local development or enhanced privacy:
3
Verify Integration
Test the integration by asking Claude Code:
- “What CodeAlive repositories are available?”
- “Search for authentication code in my codebase”
- “Explain the architecture of my project”
Available Commands
Once integrated, Claude Code can use these CodeAlive capabilities:Repository Management
Semantic Code Search
Contextual Analysis
Usage Patterns
- Code Understanding
- Bug Investigation
- Code Generation
- Refactoring
Windows & WSL
Claude Code on Windows runs inside WSL (Windows Subsystem for Linux). The Remote HTTP option above works perfectly in WSL without any extra configuration — it’s the recommended approach.- Claude Code in WSL (Recommended)
- Docker STDIO in WSL
- Self-Hosted in WSL2
When Claude Code runs inside WSL, it operates as a normal Linux environment. Use the same Remote HTTP command:This avoids all WSL-specific issues (path translation, Docker socket, networking).
Advanced Features
Multi-Repository Support
CodeAlive automatically provides access to all repositories indexed in your dashboard. Use theget_data_sources tool to discover available repositories and workspaces — pass your task as its query argument to get only the relevant ones — then target specific ones in your searches:
Custom Search Scopes
Focus searches on specific parts of your codebase:Intelligent Code Reviews
Best Practices
Keep Repos Updated
Regularly sync repositories in CodeAlive dashboard for accurate context
Use Specific Queries
Be precise with technical terms for better search results
Leverage Context
Reference CodeAlive when working with large codebases
Iterate Quickly
Use CodeAlive to validate ideas before implementing
Productivity Tips
Quick Commands
Quick Commands
Use slash commands for common operations:
/search- Quick code search/explain- Get explanations with context/similar- Find similar implementations/repos- List available repositories
Context Management
Context Management
- Clear context between unrelated tasks
- Use CodeAlive to establish context for new features
- Reference specific files when needed
Code Generation
Code Generation
- Always search for existing patterns first
- Let Claude Code match your coding style
- Verify generated code against your conventions
Troubleshooting
CodeAlive not responding
CodeAlive not responding
Solutions:
- Check MCP server status in Claude Code
- Verify API key is correct and active
- Ensure repositories are indexed
- Try reloading Claude Code
No repositories found
No repositories found
Solutions:
- Log into CodeAlive dashboard
- Verify repositories are indexed
- Wait for indexing to complete
- Check API key permissions
Slow responses
Slow responses
Solutions:
- Use more specific search queries
- Limit search to specific repositories
- Check CodeAlive service status
- Consider upgrading your plan
Authentication errors
Authentication errors
Solutions:
- Regenerate API key in dashboard
- Update MCP configuration
- Ensure Bearer token format is correct
- Test API key with curl
WSL: docker or npx not found
WSL: docker or npx not found
Solutions:
- Use Remote HTTP instead — it avoids all WSL path issues
- Enable Docker Desktop WSL integration for your distro (Settings → Resources → WSL integration)
- Use absolute binary paths (e.g.,
/usr/bin/docker,/home/user/.nvm/versions/node/v20/bin/npx) - Add missing env vars explicitly in the MCP config
envblock — non-interactive WSL shells don’t source.bashrc
WSL2: Connection refused to self-hosted server
WSL2: Connection refused to self-hosted server
Solutions:
- WSL2 uses NAT networking —
localhostin WSL2 differs from Windowslocalhost - Enable mirrored networking in
%USERPROFILE%\.wslconfig(see Windows & WSL section above) - Or use the WSL2 VM IP: run
hostname -Iinside WSL
Integration with Claude Code Features
Projects
- CodeAlive automatically understands your project structure
- Provides context across multiple files and folders
- Maintains awareness of dependencies and imports
Custom Instructions
Claude Code readsCLAUDE.md from the repo root (and ~/.claude/CLAUDE.md globally) on every run; it also picks up a repo-root AGENTS.md. Add a CodeAlive section with explicit routing rules — naming the built-in tools you are overriding is what makes the instruction stick:
CLAUDE.md — CodeAlive section
- Isolate heavy exploration in a subagent. Search-heavy CodeAlive sessions fill the main context with tool output. A dedicated subagent (
.claude/agents/) that owns CodeAlive exploration and returns only conclusions keeps the main conversation clean — this is exactly what the Claude Code Plugin ships out of the box. - Keep the section short.
CLAUDE.mdis injected into every request; 10–15 lines is the sweet spot. General patterns and rationale live in Instructing Coding Agents.
Code Review Mode
When reviewing code:Related Resources
Instructing Coding Agents
Patterns that make agents prefer CodeAlive tools
MCP Protocol
Learn about Model Context Protocol
API Reference
Direct API integration guide
Dashboard
Manage your repositories
Support
Get help from our team
Instruct Your Agent
Connecting CodeAlive makes its tools available, but the agent may still default to its built-in search. For reliable results, add a short instruction in the agent’s native format telling it to prefersemantic_search and grep_search when exploring indexed code. See Instructing Coding Agents.