LabscoMCP early access ↗
fkeshehMCP SERVER · OFFICIAL PROJECT

Code Context MCP Server

Point at any git repository and ask a question about its code — cloned locally, chunked, embedded and searched by meaning.

by fkesheh ↗Code Intelligence & Repository Indexing✓ Official

LABSCO SUMMARY

Local clone and local embeddings, so it works on private repositories and costs nothing per query.

Working from a git clone rather than a hosted code API means private repositories, any branch, and no rate limit; embedding through Ollama means the code is never sent to a vendor. The cost is setup — Ollama has to be installed and a model pulled before the first query — and the first run on a large repository pays for cloning and embedding the whole thing before it answers. After that the SQLite cache carries it.

What it is

A TypeScript server with one tool, queryRepo, that clones a repository, splits it into semantic chunks, embeds them with a local Ollama model, and answers a search query over them.

What you get

  • Semantic search over a whole repository, not a filename or grep match
  • Any git repository by URL, on the branch you name — or its default branch if you do not
  • filePatterns and excludePatterns as glob filters, so you can search only the TypeScript sources or skip vendored directories
  • Keywords as an extra filter, keeping only chunks that contain at least one of them, matched case-insensitively
  • Limit to control how many chunks come back, defaulting to 10
  • Everything cached in a local SQLite database — repositories, branches, files and chunk embeddings — so a second query on the same repo is fast

Requirements

Ollama running locally with an embedding model pulled — unclemusclez/jina-embeddings-v2-base-code is the recommended one — plus git and Node.js v16 or higher. No API key and no data leaving your machine. DATA_DIR and REPO_CACHE_DIR decide where the database and the clones live.

Setup effort

Build from source — git clone https://github.com/fkesheh/code-context-mcp.git