Labsco
MCP SERVER

Give an agent a searchable memory of your codebase, so it finds the function that already exists instead of writing it again.

Code Intelligence & Repository Indexing
Summary
Aimed squarely at the duplicate-function problem, not at code search in general.

The failure it targets is specific: an agent that cannot find createUser writes newUser next to it. Chunking by function and searching by meaning is what stops that, and the committed codemap means a teammate's checkout starts with the same memory rather than rebuilding it. update_project is the part people skip and then wonder why answers are stale — the index only reflects what it last scanned, which is why the file watcher exists. Local embedding through Transformers.js or Ollama keeps private code off a vendor's servers.

What it is

A Node server that chunks a repository function by function, embeds each chunk, and serves semantic search over a local SQLite index — with a codemap file you commit so the context travels with the repo.

What you get
  • search_code — natural-language search across the indexed project, with similarity scores and a SHA per result
  • get_code_chunk — the complete source of one chunk, fetched by the SHA search returned
  • index_project and update_project — build the index, then re-scan after changes so new, modified and deleted functions stay in sync
  • get_project_stats, analyze_code and find_similar_functions for looking at the index itself
  • Hybrid retrieval: BM25 and vector search fused, with a cross-encoder re-ranker on top
  • Scoped filters — path_glob, tags and lang — so a search can be narrowed to part of the tree
  • Automatic semantic tagging from the code's own context, with optional @pampa-tags and @pampa-intent comments to sharpen it further
  • An intention cache that answers repeat searches instantly once a phrasing has proven itself
  • A file watcher for incremental re-indexing as you work
  • JavaScript, TypeScript, PHP, Python, Go and Java indexed out of the box
Requirements

Run with npx as pampa mcp — no account needed if you embed locally. The embedding provider is your choice: Transformers.js or Ollama run free and keep everything on your machine, while OpenAI or Cohere need their API keys and bill per run. The index lives under .pampa in the project, and pampa.codemap.json is meant to be committed.

Setup effort

One command — npx pampa mcp