Skip to main content

Overview

Recommended: Use the Claude Code Plugin instead. The plugin provides a better experience for Claude Code users — it includes the Context Engine skill, a code exploration subagent, and authentication hooks, all in a single install. The MCP integration described on this page is still supported and can be used alongside the plugin for direct tool access.
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.
Quick install: Run npx @codealive/installer to automatically configure CodeAlive for Claude Code. See the Installation Guide for details.
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

Contextual Analysis

Usage Patterns

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.

Advanced Features

Multi-Repository Support

CodeAlive automatically provides access to all repositories indexed in your dashboard. Use the get_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:
See Multi-Repository & Workspaces for details on organizing repositories.

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

Use slash commands for common operations:
  • /search - Quick code search
  • /explain - Get explanations with context
  • /similar - Find similar implementations
  • /repos - List available repositories
  • Clear context between unrelated tasks
  • Use CodeAlive to establish context for new features
  • Reference specific files when needed
  • Always search for existing patterns first
  • Let Claude Code match your coding style
  • Verify generated code against your conventions

Troubleshooting

Solutions:
  1. Check MCP server status in Claude Code
  2. Verify API key is correct and active
  3. Ensure repositories are indexed
  4. Try reloading Claude Code
Solutions:
  1. Log into CodeAlive dashboard
  2. Verify repositories are indexed
  3. Wait for indexing to complete
  4. Check API key permissions
Solutions:
  1. Use more specific search queries
  2. Limit search to specific repositories
  3. Check CodeAlive service status
  4. Consider upgrading your plan
Solutions:
  1. Regenerate API key in dashboard
  2. Update MCP configuration
  3. Ensure Bearer token format is correct
  4. Test API key with curl
Solutions:
  1. Use Remote HTTP instead — it avoids all WSL path issues
  2. Enable Docker Desktop WSL integration for your distro (Settings → Resources → WSL integration)
  3. Use absolute binary paths (e.g., /usr/bin/docker, /home/user/.nvm/versions/node/v20/bin/npx)
  4. Add missing env vars explicitly in the MCP config env block — non-interactive WSL shells don’t source .bashrc
Solutions:
  1. WSL2 uses NAT networking — localhost in WSL2 differs from Windows localhost
  2. Enable mirrored networking in %USERPROFILE%\.wslconfig (see Windows & WSL section above)
  3. Or use the WSL2 VM IP: run hostname -I inside WSL
For more solutions, see the Troubleshooting Guide.

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 reads CLAUDE.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
Two refinements once the basics work:
  • 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.md is 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:

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 prefer semantic_search and grep_search when exploring indexed code. See Instructing Coding Agents.