Skip to main content
Glama
cmaujean

Codebase MCP Server

by cmaujean

Codebase MCP Server

A Model Context Protocol (MCP) server that analyzes any application codebase with real-time file watching, providing AI assistants like Claude with deep insights into your project structure, code patterns, and architecture.

Features

  • Universal Codebase Analysis: Works with any programming language or framework (not just Vite)

  • Real-time File Watching: Automatically stays synchronized with file system changes

  • Smart Framework Detection: Identifies React, Vue, Svelte, Angular, or vanilla projects

  • Intelligent Filtering: Excludes node_modules, build files, and other non-essential content

  • File Categorization: Organizes files into source, config, test, documentation, and build categories

  • Content Search: Search files by name patterns, content, type, or category

  • Multi-project Support: Switch between different projects seamlessly

  • Global Installation: Install once, use anywhere

Related MCP server: Codebase MCP

Installation

# Install globally with Bun
bun install -g @codebase-mcp/server

# Or install globally with npm
npm install -g @codebase-mcp/server

Local Development Installation

# Clone the repository
git clone https://github.com/your-username/codebase-mcp-server.git
cd codebase-mcp-server

# Install dependencies
bun install

# Build the project
bun run build

# Install globally from local build
bun run install-global

Configuration

With Claude Code (Console/CLI)

Add the MCP server using the Claude Code CLI:

# Add the MCP server (local scope - for current project)
claude mcp add codebase-mcp codebase-mcp

# Or add for user scope (available across all projects)
claude mcp add --scope user codebase-mcp codebase-mcp

# Verify it was added
claude mcp list

With Claude Desktop

Add to your Claude Desktop settings:

{
  "mcps": {
    "codebase-mcp": {
      "command": "codebase-mcp",
      "env": {}
    }
  }
}

Usage

Quick Start

  1. Install the MCP server globally (see installation above)

  2. Configure Claude Code/Desktop with the MCP server

  3. Restart Claude Code/Desktop

  4. Analyze any codebase:

Hey Claude, can you ingest the codebase at /path/to/my-project?

Multi-Project Usage

Single Instance (Project Switching)

Within one Claude Code instance, switch between projects:

Claude, ingest the React app at /Users/me/my-react-app
Claude, now switch to analyze the Python project at /Users/me/my-python-project
Claude, go back to the React app and show me the component structure

Multiple Instances (Concurrent Projects)

Each Claude Code instance runs its own isolated MCP server process:

  • Project A (Claude Code in