codebase-memory
Allows GitHub Copilot in Agent mode to search the codebase semantically, analyze code quality, and access project memory through the codebase-memory MCP server.
Enables Hermes agents to use codebase-memory tools for semantic indexing, hybrid search, and clean code analysis to enhance code understanding.
Supports JetBrains IDEs to connect the codebase-memory MCP server via Copilot, enabling semantic code search and analysis within the IDE.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codebase-memorysearch the codebase for how authentication is implemented"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codebase-memory
Serveur MCP de mémoire de codebase : index sémantique + analyse "clean code", 100 % local, pensé pour être scalable à des machines modestes.
Ce que ça fait
Indexation : découpe un dépôt en chunks (AST pour Python, structurel sinon), les plonge en embeddings (fastembed ONNX par défaut — CPU, portable ; backend llama.cpp GPU en option), et les stocke dans un SQLite unique (FTS5 + BLOBs).
Recherche hybride : fusion RRF entre BM25 (FTS5) et cosinus sémantique.
Analyse clean code : règles statiques (complexité cyclomatique, longueur, TODO, exceptions avalées, duplicats…) + revue LLM (Hermes 4 14B via llama.cpp, ou Gemma 2B via OpenVINO GenAI en fallback CPU léger).
Mémoire de conventions : notes projet retrievables sémantiquement.
Related MCP server: mcp-context
Démarrage rapide
cd D:\codebase-memory
uv sync # installe les dépendances
uv sync --extra openvino # + fallback Gemma 2B OpenVINO
uv run codebase-memory index D:\mon\repo # CLI
uv run python -m codebase_memory # serveur MCP (stdio)Plug dans Hermes
# ~/.hermes/config.yaml (clé mcp_servers)
mcp_servers:
codebase-memory:
command: "D:\\codebase-memory\\.venv\\Scripts\\python.exe"
args: ["-m", "codebase_memory"]
env:
CODEBASE_MEMORY_EMBED_BACKEND: "fastembed"
CODEBASE_MEMORY_LLM_BACKEND: "openvino"
CODEBASE_MEMORY_OV_MODEL_DIR: "D:\\gemma-2b-int4-ov"
timeout: 300Outils exposés : mcp_codebase_memory_index_codebase, search_code,
analyze_code, remember_note, recall_notes, memory_status.
GitHub Copilot (VS Code)
Copilot Chat / Agent mode sait consommer des serveurs MCP. Dans le workspace
que tu veux analyser, crée .vscode/mcp.json (copie de
.vscode/mcp.json.example fourni dans ce repo) :
{
"servers": {
"codebase-memory": {
"type": "stdio",
"command": "uv",
"args": ["run", "python", "-m", "codebase_memory"],
"cwd": "${workspaceFolder}/../codebase-memory"
}
}
}Ajuste
cwd: chemin du clone decodebase-memory(ou clone-le dans le workspace).Recharge VS Code (Reload Window) puis accepte la connexion MCP quand Copilot le propose (onglet Copilot → section "MCP" pour vérifier que le serveur est vert).
Indexe d'abord le code :
uv run codebase-memory index "C:/chemin/de/ton/workspace".Ensuite, en Agent mode : "cherche où les patches WSI sont extraits", "analyse la qualité de ce fichier" → Copilot appelle
mcp_codebase_memory_search_code/analyze_code.
Notes : les outils MCP ne sont utilisables que dans Chat / Agent mode (pas en complétion classique). JetBrains (2025.2+) sait aussi brancher des serveurs MCP pour Copilot (Settings → Tools → MCP Servers).
Installation sur une autre machine
git clone https://github.com/H-Gelender/codebase-memory
cd codebase-memory
uv sync # dépendances de base (fastembed ONNX, mcp, radon)
uv sync --extra openvino # + fallback Gemma 2B OpenVINO (optionnel)
uv run codebase-memory index "C:/chemin/de/mon/repo" # 1er run : télécharge bge-small (~130 Mo)
uv run codebase-memory search "comment X est implémenté"
uv run codebase-memory analyze "src/module.py"
uv run python -m codebase_memory # serveur MCP (stdio) pour Hermes / CopilotWindows + Smart App Control : si le python.exe du venv est bloqué (erreur
4551), base le venv sur un interpréteur déjà autorisé et remplace
python.exe/pythonw.exe par des hardlinks (recette détaillée dans le skill
Hermes hermes-agent → native-mcp.md).
Configuration par variables d'environnement (CODEBASE_MEMORY_*) : voir
src/codebase_memory/config.py (backends embedding/LLM, chemins, seuils).
R&D
Hypothèses, design et résultats de benchmarks : docs/RND_BRIEF.md.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceUnified MCP server combining hybrid search (vector + BM25 + code graph), structural code analysis, and persistent semantic memory. 15 tools, 25+ languages, <350MB RAM, fully local.Last updated10MIT
- Flicense-qualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.Last updated
- AlicenseAqualityAmaintenanceLocal MCP server for semantic code search using Tree-sitter AST parsing, local embeddings, and hybrid search; enables indexing and querying codebases entirely offline.Last updated5MIT
- Alicense-qualityDmaintenanceLocal-first MCP server for semantic + keyword hybrid code search. Zero external services, no API keys required.Last updatedMIT
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Local-first RAG engine with MCP server for AI agent integration.
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/H-Gelender/codebase-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server