codemogger MCP

The MCP server finds definitions and meaningful code fragments through a local index with vector and full-text search.

  • 349 ★ on the repository
  • Last commit
  • MIT
MCP serverOfficial

Extended access

Why this level

  • The indexer reads source and stores local fragments; a connected agent receives retrieved code.
All reasons and checks

glommer/codemogger

Install

Manual install

npm install -g codemogger

First Install option; adds the CLI, followed by MCP and index configuration.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The indexer reads source and stores local fragments; a connected agent receives retrieved code.

This is third-party code. Review the repository files before installing.

What it does

codemogger MCP lets agents search indexed source code. It splits files into functions, classes and other definitions, computes embeddings locally and stores them with text. Agents can search exact identifiers or describe the logic they need. The server also builds and refreshes indexes. Subsequent runs process changed files while respecting project exclusions. The same data can be searched directly through the CLI.

Who it is for. Maintainers exploring unfamiliar codebases where behavior is easier to describe than a function name.

Good fit when

  • An agent knows the behavior but not the identifier.
  • A large project needs direct access to class or function definitions.
  • Edited files should refresh only affected index content.
  • A private project needs local search without an external API key.

Not a fit when

  • The task needs runtime execution analysis.
  • The project uses languages outside the supported parsers.
  • The machine must not retain additional source fragments.

Example request

Find retry handling in codemogger and show matching functions with file paths.

MCP

Transport
stdio
Authentication
not required

Limitations

Build an index before searching; the first pass parses source and computes embeddings. Parsing relies on supported tree-sitter grammars, so check your language and extracted fragments. The database contains source and vectors; exclude `.codemogger/` from Git and restrict file access. A Turso dependency is pinned to a pre-release version, so check index compatibility during upgrades and retain the ability to rebuild it.

How to disable. Remove codemogger from the MCP client and stop the process. Its index remains with the project and can be removed separately from source code.

FAQ

How do I build the first index?

Run `codemogger index ./my-project` with your project directory.

Do embeddings require a cloud API key?

No. CLI and MCP use the local all-MiniLM-L6-v2 model.

What happens after editing a file?

Refresh the index; subsequent passes reprocess changed files.

How do I list indexed projects?

Use `codemogger list`.

Why do results differ from grep?

Semantic search matches descriptions to code embeddings. Use keyword search for an exact identifier.

Discussion

No questions or reviews yet.

An MCP server that indexes code with tree-sitter and returns individual functions and classes to the agent instead of whole files

MCP serverExtended access2.8KRepository stars

An MCP server that indexes a local repository with tree-sitter and gives the agent code search, file lookup and a structure summary of a file

MCP serverExtended access1KRepository stars

A local MCP server and CLI for agents: semantic code search, call graphs and change-impact analysis

MCP serverExtended access760Repository stars

A local codebase index for agents: hybrid search, dependency graphs and change impact analysis

MCP serverExtended access3.4KRepository stars

An MCP server that builds a code graph of functions, classes, calls and routes and answers the agent's structural queries locally

MCP serverExtended access48.2KRepository stars

Source search ranks matches using code structure and gives agents relevant snippets without a separate search index.

CLIExtended access1.1KRepository stars

README in short

Storage combines SQLite full-text and vector search. During parsing, codemogger splits long definitions into smaller fragments.

README badge

Report a problem

Foxx AIcodemogger
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.