CodemoggerSAFE
Codemogger is a code indexing library and MCP server for AI coding agents
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Code indexing library for AI coding agents. Parses source code with tree-sitter, chunks it into semantic units (functions, structs, classes, impl blocks), embeds them locally, and stores everything in a single SQLite file with vector + full-text search.
No Docker, no server, no API keys. One .db file per codebase.
Why
Coding agents need to understand codebases. They need to find where things are defined, discover how concepts are implemented across files, and navigate unfamiliar code quickly. This requires both keyword search (precise identifier lookup) and semantic search (natural language queries when you don't know the exact names).
As AI coding tools become more composable - agents calling agents, MCP servers plugging into different hosts - this capability needs to exist as a library that runs locally. No external servers, no API keys, no Docker containers. Just a function call that returns results.
codemogger is that library. Embedded SQLite (via Turso) with FTS + vector search in a single .db file.
Install
npm install -g codemogger
Or use npx to run without installing.
Quick start
# Index a project codemogger index ./my-project # Search codemogger search "authentication middleware"
Add to your coding agent's MCP config (Claude Code, OpenCode, etc.):
{
"mcpServers": {
"codemogger": {
"command": "npx",
"args": ["-y", "codemogger", "mcp"]
}
}
}The MCP server exposes three tools:
codemogger_search- semantic and keyword search over indexed codecodemogger_index- index a codebase for the first timecodemogger_reindex- update the index after modifying files
Add the local db to .gitignore:
# codemogger db .codemogger/
SDK
codemogger is also usable as a library. The SDK has no model dependency - you provide your own embedd
51537aeb1bd7OBSERVED · 2026-10-03Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add codemogger -- npx -y [email protected]
{
"mcpServers": {
"codemogger": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (3)
3 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
codemogger_index | read | |
codemogger_reindex | read | |
codemogger_search | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- declared (5 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc
@huggingface/transformers, @modelcontextprotocol/sdk, @tree-sitter-grammars/tree-sitter-zig, @tursodatabase/database, commander, tree-sitter-c, tree-sitter-c-sharp, tree-sitter-cpp
// Load embedding model (runs locally, no API keys)
Gates applied: no_behavioural_pass.
51537aeb1bd7full audit observations/trust-audit/mcp-server/glommer__codemogger.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-03 | 51537aeb1bd7 | SAFE | B | 89 | first audit |
Questions
What is the Codemogger MCP server?
Codemogger is a code indexing library and MCP server for AI coding agents
What tools does Codemogger expose?
3 in total: 3 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Codemogger safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Codemogger need?
No credential environment variables were found in its source, so it appears to need none.
How does Codemogger run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as codemogger at 0.1.5.
How current is this page?
The grade is for one exact copy of the source (51537aeb1bd7), read on 2026-10-03. The repository is watched and re-audited when it changes.