Codemogger

v0.1.5Search & Data Extractionstable

A local code indexing and search library that enables AI agents to perform semantic and keyword searches across codebases using tree-sitter and SQLite. It provides tools for indexing projects and finding precise code definitions without requiring ext

codemoggermcpai-integration
Share:
315
Stars
0
Downloads
0
Weekly
0/5

What is Codemogger?

Codemogger is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to local code indexing and search library that enables ai agents to perform semantic and keyword searches across codebases using tree-sitter and sqlite. it provides tools for indexing projects and findin...

A local code indexing and search library that enables AI agents to perform semantic and keyword searches across codebases using tree-sitter and SQLite. It provides tools for indexing projects and finding precise code definitions without requiring ext

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A local code indexing and search library that enables AI age

Use Cases

Perform semantic search in codebases.
Index projects with tree-sitter.
Find code definitions quickly.
glommer

Maintainer

LicenseMIT License
Languagetypescript
Versionv0.1.5
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y codemogger

Manual Installation

npx -y codemogger

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Codemogger

Codemogger is a local code indexing and search library that uses tree-sitter for language-aware parsing and SQLite for fast storage, enabling AI agents to perform both semantic and keyword searches across large codebases without uploading code to external services. It supports Rust, C, C++, Go, Python, Java, TypeScript, JavaScript, PHP, Ruby, and more. When used as an MCP server it exposes `codemogger_search`, `codemogger_index`, and `codemogger_reindex` tools directly to Claude and other MCP-compatible clients.

Prerequisites

  • Node.js 18 or later and npx installed
  • npm (for optional global install)
  • Claude Desktop or another MCP-compatible client
  • A codebase directory you want to index (no external API keys required)
1

Install codemogger

Install codemogger globally via npm for use as a CLI tool and MCP server, or use npx to run it without installing.

# Global install
npm install -g codemogger

# Or run directly with npx (no install needed)
npx codemogger --help
2

Index a codebase

Point codemogger at a project directory. It parses all supported source files with tree-sitter and stores the index in a local SQLite database inside `.codemogger/`.

codemogger index ./my-project
3

Search the index from the CLI

Test that the index works with a search query before connecting to Claude.

# Semantic search (natural language)
codemogger search "authentication middleware"

# Keyword / identifier search
codemogger search "BTreeCursor"

# List all indexed projects
codemogger list
4

Add codemogger to your .gitignore

The index database is stored under `.codemogger/`. Add this directory to `.gitignore` so index files are not committed.

echo '.codemogger/' >> .gitignore
5

Configure Claude Desktop

Add the codemogger MCP server to Claude Desktop's configuration. Pass `mcp` as the subcommand to run it in MCP server mode.

{
  "mcpServers": {
    "codemogger": {
      "command": "npx",
      "args": ["-y", "codemogger", "mcp"]
    }
  }
}
6

Reindex after code changes

When files change, ask Claude to reindex or run the CLI command. Codemogger only reprocesses modified files for efficiency.

codemogger reindex ./my-project

Codemogger Examples

Client configuration

Claude Desktop config for codemogger running in MCP server mode. No API keys or environment variables are required.

{
  "mcpServers": {
    "codemogger": {
      "command": "npx",
      "args": ["-y", "codemogger", "mcp"]
    }
  }
}

Prompts to try

Example prompts for searching and navigating a codebase through Claude with codemogger.

- "Index the project at /home/user/my-app and then search for the database connection logic"
- "Find all functions related to JWT token validation in this codebase"
- "Where is BTreeCursor defined in the indexed code?"
- "Search for error handling patterns in the authentication module"
- "Reindex the project and then find all usages of the UserRepository class"

Troubleshooting Codemogger

Index command fails with tree-sitter parse errors

Ensure the files you are indexing use one of the supported languages: Rust, C, C++, Go, Python, Zig, Java, Scala, JavaScript, TypeScript, TSX, PHP, Ruby. Files with unrecognised extensions are silently skipped. Check Node.js version is 18+ (`node --version`).

Search returns no results after indexing

Confirm the index completed without errors (`codemogger list` should show your project). Run a keyword search for a known identifier first to verify the index is populated before testing semantic search.

MCP server not appearing in Claude after config change

Fully quit and restart Claude Desktop (not just close the window). On macOS use Cmd+Q. Verify the JSON in claude_desktop_config.json is valid with a JSON linter — a single trailing comma will prevent the server from loading.

Frequently Asked Questions about Codemogger

What is Codemogger?

Codemogger is a Model Context Protocol (MCP) server that local code indexing and search library that enables ai agents to perform semantic and keyword searches across codebases using tree-sitter and sqlite. it provides tools for indexing projects and finding precise code definitions without requiring ext It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Codemogger?

Install via npm with the command: npx -y codemogger. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Codemogger?

Codemogger works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Codemogger free to use?

Yes, Codemogger is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "codemogger": { "command": "npx", "args": ["-y", "codemogger"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Codemogger?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides