Code MCP Server

Local semantic code search with Git history. Works offline, no API key needed.

Local serverstdioPython

What is the Code MCP Server?

Local semantic code search with Git history. Works offline, no API key needed.

What you get

A deterministic, high-precision code intelligence layer exposed as a Model Context Protocol (MCP) server.

Configuration and credentials

  • Python ≥ 3.13 - uv package manager (recommended) or pip Install uv if you don't have it:

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
index_codebaseIndexes or re-indexes source files and documentation in the given directory. Run this before using search_code or search_docs to ensure the database is up to date. Uses tree-sitter for language-agnostic structural extrac
search_codePerform semantic search and find structural code definitions, locate where functions/classes are defined, or map out dependency references (call graphs). Uses hybrid retrieval (BM25 + vector embeddings) to find exact mat
search_docsUnderstand the codebase conceptually — how things work, architectural patterns, SOPs. Searches markdown documentation, READMEs, and docstrings extracted from code.
search_historyDebug regressions and understand developer intent through Git history.

How to install the Code MCP Server

claude mcp add code-memory --env EMBEDDING_MODEL=your-value -- uvx code-memory

Configuration

  • Python ≥ 3.13 - uv package manager (recommended) or pip Install uv if you don't have it:
VariableDescriptionRequired
EMBEDDING_MODELConfiguration value read at startup.Optional

Example prompts to try

  • “Use Code to Prerequisites.”
  • “Use Code to Development.”
  • “Use Code to index codebase.”

Frequently asked questions

Local semantic code search with Git history. Works offline, no API key needed. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.