Permet d'effectuer une recherche sémantique sur une base de connaissances locale pour permettre aux clients IA de trouver des passages de documents pertinents sans consommer de fenêtres de contexte.
Aussi connu sous VBlackJack/Cortex, cortex-local-rag
- Étoiles
- 1
- Outils
- 4
- Téléchargements, 30 jours
- 2 443
- Dernière version
- 2026.1021.3
- Dernier commit
- 21 oct. 2026
- Licence
- Apache-2.0
Qu'est-ce que Cortex MCP ?
Cortex est un serveur MCP. Permet d'effectuer une recherche sémantique sur une base de connaissances locale pour permettre aux clients IA de trouver des passages de documents pertinents sans consommer de fenêtres de contexte. Il expose 4 outils, comme cortex_search, cortex_sync, cortex_list_sections.
Résumé généré à partir du README du projet
À propos du MCP server Cortex
Cortex offre des capacités de recherche sémantique sur une base de connaissances locale, permettant à des clients IA tels que Claude, Gemini et Cursor de récupérer des passages de documents pertinents sans épuiser les fenêtres de contexte. Il fonctionne comme un MCP server qui traite et indexe les documents localement, garantissant que le contenu reste sur votre machine. Le système prend en charge l'anglais et le français grâce à une récupération vectorielle multilingue utilisant le modèle paraphrase-multilingual-MiniLM-L12-v2.
Les utilisateurs peuvent gérer leurs données via l'interface Cortex Companion ou par une interface en ligne de commande. Le serveur prend en charge divers formats de documents, notamment Markdown et PDF, et propose un connecteur Confluence optionnel pour importer des espaces autorisés. Les développeurs peuvent choisir d'indexer un dossier entier ou des sections nommées spécifiques. L'installation est disponible via un installateur Windows unifié qui ne nécessite pas de runtime Python ou .NET séparé, ou via des archives autonomes pour macOS et Linux.
Ce que vous pouvez faire avec
- 1Récupération sémantique de documentsDemandez à un client IA de trouver des informations spécifiques dans vos fichiers PDF ou Markdown locaux en utilisant une recherche basée sur le sens.
- 2Intégration des connaissances ConfluenceSynchronisez des espaces Confluence spécifiques dans votre base de connaissances locale pour des requêtes assistées par IA.
- 3Recherche organisée par sectionsLimitez le champ de recherche de l'IA à des sous-dossiers spécifiques, comme des projets ou des notes, pour améliorer la pertinence.
Extrait du README du projet. Chaque cas d'utilisation est vérifié par rapport à une citation du document.
Comment installer Cortex MCP
Formats vérifiés le 10 nov. 2026Ajouter à CursorAjouter à GooseInstaller Cortex MCP dans Claude Code
$ claude mcp add --env 'CORTEX_KB_PATH=<CORTEX_KB_PATH>' cortex -- uvx cortex-local-ragInstaller Cortex MCP dans Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"cortex": {
"command": "uvx",
"args": [
"cortex-local-rag"
],
"env": {
"CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
}
}
}
}Installer Cortex MCP dans VS Code
.vscode/mcp.json
{
"servers": {
"cortex": {
"type": "stdio",
"command": "uvx",
"args": [
"cortex-local-rag"
],
"env": {
"CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
}
}
}
}Installer Cortex MCP dans VS Code CLI
$ code --add-mcp '{"name":"cortex","type":"stdio","command":"uvx","args":["cortex-local-rag"],"env":{"CORTEX_KB_PATH":"<CORTEX_KB_PATH>"}}'Installer Cortex MCP dans Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"cortex": {
"command": "uvx",
"args": [
"cortex-local-rag"
],
"env": {
"CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
}
}
}
}Installer Cortex MCP dans Codex
$ codex mcp add cortex --env 'CORTEX_KB_PATH=<CORTEX_KB_PATH>' -- uvx cortex-local-ragInstaller Cortex MCP dans Codex config.toml
~/.codex/config.toml
[mcp_servers.cortex] command = "uvx" args = ["cortex-local-rag"] [mcp_servers.cortex.env] CORTEX_KB_PATH = "<CORTEX_KB_PATH>"
Installer Cortex MCP dans Gemini CLI
$ gemini mcp add -s user -e 'CORTEX_KB_PATH=<CORTEX_KB_PATH>' cortex uvx -- cortex-local-ragInstaller Cortex MCP dans Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"cortex": {
"command": "uvx",
"args": [
"cortex-local-rag"
],
"env": {
"CORTEX_KB_PATH": "<CORTEX_KB_PATH>"
}
}
}
}Outils MCP Cortex 4
Détectés depuis le READMEcortex_searchcortex_synccortex_list_sectionscortex_freshness
| cortex_search | — | |
| cortex_sync | — | |
| cortex_list_sections | — | |
| cortex_freshness | — |
Configuration
CORTEX_KB_PATHRequisAbsolute path to the local knowledge base Cortex indexes and serves.
| Nom | Description | Type |
|---|---|---|
| CORTEX_KB_PATH | Absolute path to the local knowledge base Cortex indexes and serves. | Requis |
Vérifications automatisées
Exécuté le 12 nov. 2026Rapport complet →A passé nos vérifications automatisées. Il ne s'agit pas d'un audit de sécurité : lisez le code et donnez au serveur l'accès le plus restreint dont il a besoin. Fonctionnement des vérifications
- Dépôt source lié et accessibleRéussi
- Licence open source (OSI)Réussi
- Commit ou version publiée au cours de l'année écouléeRéussi
- Nom du package non proche d'un package populaireRéussi
- L'endpoint distant utilise HTTPSNon vérifié
- Les outils destructifs sont étiquetésRéussi
- Aucune instruction cachée destinée au modèleRéussi
- Aucun avis critique dans le package ou ses dépendancesRéussi
README
Voir sur GitHubCortex - RAG MCP for a knowledge base
English | Français
Cortex is an MCP (Model Context Protocol) server that exposes semantic search over a local knowledge base. It lets Claude, Codex and Gemini find the right passage in your documents without wasting their context window. Search is semantic (by meaning, not keyword), in French and in English. Cortex processes and indexes the knowledge base locally without sending its content; the MCP client may still pass requested chunks to its model under its own policy. The optional Confluence writer only downloads explicitly allowlisted spaces; the generated Markdown, vector index, and lexical index remain local.
Starting with 2026.0906.01, Companion offers a guided home screen, operation history and Confluence setup from one page or space link. Connection and measured scope confirmation stay in the flow; successful collection is followed by indexing. Use the combined installer to keep Cortex and Companion compatible.
Since 2026.0909.02, Confluence updates preserve the served generation when subtree enumeration fails and apply changed target/classification settings on retry. Search uses multilingual vector retrieval by default; CLI and MCP callers can explicitly select hybrid or reranked search. The first successful collection after upgrading regenerates older publication revisions, and the following sync removes obsolete index entries.
Guided document updates (2026.0909.00)
Companion brings local documents and Confluence together in My sources, with one Update my documents action. Search previews are resizable, large page trees render visible rows, and cancelling review preparation keeps the draft. Readiness now follows the saved document folder and configuration, including after restart. Run one document update after upgrading to establish this evidence for older indexes. See the release notes.
Measured scope without enumerating the space (2026.0907.00)
Adding a Confluence source measures its page, subtree and whole-space scopes with one indexed count each instead of reading the space page by page. On a 5916-page space that measurement took 3 min 19 s, past the timeout of every graphical caller, so Companion showed nothing at all. It now answers in about a second, and the emitted contract is unchanged.
Two whole-space numbers shift by one as a result: the resolved page is no longer folded into the space total, and a space with no visible page reports zero rather than one. A deployment whose search endpoint returns no total cannot measure a scope and reports that as a permanent failure instead of a retryable one. See the contracts.
Paired Companion 2026.0907.00 restores the contrast of the scope window, whose options were drawn in the system text colour, and stops reporting a timeout as a connection failure or advising a delay increase that silently reverts.
Source management in Companion (2026.0906.02)
The workflow includes search, remote page trees, impact review, evidence-based readiness, save-and-update, last-removal undo and recovery actions. See the contracts.
Paired version 2026.0906.02 provides visible My sources cards, a prefilled selection editor, confirmed page/space removal and browser links to originals. Removal only changes Cortex tracking; search reflects it after successful collection and indexing.
Removing the final source explicitly writes spaces = [] in a schema v2 or v3
configuration. This intentional empty allowlist permits an empty publication
with tombstones for prior documents. An absent spaces key remains incomplete
configuration and collection is refused. Connection and credential validation
and publication safeguards still apply. Both updated components are required;
this capability is absent from the installed 2026.0906.01 release.
Installation
Windows, no Python (recommended)
The simplest path: one installer for Cortex, Cortex Companion, the windowless Confluence converter, and the offline models. No separate Python or .NET runtime is required.
- Download
Cortex-Setup.exeandSHA256SUMSfrom the latest release. - Before running the unsigned installer, calculate its digest with
Get-FileHash .\Cortex-Setup.exe -Algorithm SHA256in PowerShell and verify that it exactly matches theCortex-Setup.exeline inSHA256SUMS. - Double-click only after that check. If SmartScreen still warns, select
More info, thenRun anyway. - Choose the folder that holds your documents, keep
Index everything in this folder, and finish. Cortex Companion opens when installation completes. Indexing only starts when you request synchronization in Companion. - In Companion, open
Settingsand verify the knowledge-base folder. The Cortex executable installed with Companion is detected automatically. - Drop your documents in that folder, open
Local database, then selectSynchronize local documents. - Restart your AI application: Cortex shows up there as an MCP server.
Companion then lets you synchronize, schedule, diagnose, and configure Cortex without a terminal. Details, silent mode and reinstall: Windows install.
Standalone archives (Windows x64, macOS Apple Silicon, Linux x64)
Every release also ships one ZIP archive per platform. It unpacks to a cortex/
folder holding the cortex or cortex.exe executable (MCP server + CLI, no
Python), its runtime, and the licenses for every embedded dependency; keep the
folder whole. See Standalone distribution.
From PyPI (Python, advanced)
py -m pip install --upgrade cortex-local-rag
cortex setup
This path installs the CLI and MCP server, but not Cortex Companion. The model is downloaded on first use if its cache is empty.
From source (development)
:: From the folder where you cloned Cortex
install.bat
install.bat and sync.bat are the development path for a source checkout,
not a supported end-user installation: install.bat installs the unlocked
dependencies from requirements.txt, and sync.bat indexes the folder section
by section without the Confluence documents. To use Cortex, install
Cortex-Setup.exe or a standalone archive instead. Details:
Setup.
How it works
Documents folder (.md, .pdf) Optional Confluence writer (REST)
| |
| current Markdown generation
+------------------+-------------------+
|
v
cortex sync <- Split, hash, vectorize, update FTS5
|
v
%LOCALAPPDATA%\Cortex\ <- ChromaDB + lexical.db
|
v
cortex serve <- MCP server (FastMCP)
|
v
MCP clients <- Claude / Codex / Gemini / Antigravity / LM Studio / Cursor / Windsurf / VS Code
The embedding model is the multilingual ONNX
paraphrase-multilingual-MiniLM-L12-v2. The Windows installer bundles it; a
source installation or standalone binary downloads it when the local cache is
empty.
Two indexing modes
- Whole folder (default): anything you place in the chosen folder, at the root or in any subfolder, becomes searchable. Nothing to configure.
- Sections (advanced): limits indexing to named subfolders you can search
separately (defaults
knowledge,projects,notes).
These modes govern the user-selected document folder. Generated ingestion
documents are indexed separately from the current published generation with
source_kind=doc and section sources.
Details: Configuration.
The cortex command
The installed package exposes a single command:
| Subcommand | Purpose |
|---|---|
cortex setup |
Config + index + client registration in one go (--kb-path, --yes, --no-index, --reset). |
cortex serve |
Runs the MCP server (used by clients). |
cortex sync |
Incremental index synchronization. |
cortex search |
Searches the index from the console (debugging aid). |
cortex ingestion |
Shows source health and whether catch-up is due. |
cortex confluence |
Stores the PAT interactively or runs the allowlisted writer. |
cortex config |
Reads or changes configuration through an atomic JSON contract, notably for Companion. |
cortex daemon |
Runs, inspects or stops the shared per-user server used when [server] mode = "shared" (opt-in). |
cortex bundle |
Describes or verifies an encrypted portable archive. |
cortex doctor |
Installation diagnostics (read-only). |
cortex register / cortex unregister |
Adds or removes Cortex from MCP clients. |
cortex init |
Creates the single per-user configuration. |
cortex check |
Verifies the installation. |
cortex --help describes every subcommand and cortex <command> --help describes
its options. A prompt-free installation scripts as:
cortex setup --yes --kb-path "D:\Documents\Knowledge"
Exposed MCP tools
| Tool | Description |
|---|---|
cortex_search |
Multilingual vector search by default; optional retrieval_mode (vector, hybrid, rerank). Parameters: query, section, top_k (1-10), source/author filters, and occurred/updated date ranges. |
cortex_sync |
Triggers an incremental sync of the selected folder and, on a full sync, the current published document generation. |
cortex_list_sections |
Lists included sections and "out of policy" folders. |
cortex_freshness |
Read-only vault and ingestion freshness summary. Parameters: section (optional), include_entries (false by default). |
Documentation
- Table of contents
- Windows install: unified Cortex + Companion + Confluence converter + models installer, corpus choice, silent mode, reinstall.
- Standalone distribution: per-platform archives and reproducible builds.
- Install from source: prerequisites, MCP clients.
- User guide: sync, search, tools, doctor, logs.
- FAQ: installation, local data, sync, and diagnostics.
- Release notes: user-visible changes by version and the published-history notice.
- Technical changelog: complete changes by version.
- Configuration:
config.toml, indexing modes, sections, data home, migration. - Ingestion scheduling: source health, catch-up, retries, and Task Scheduler.
- Metadata v2 migration: structured search metadata, backup, migration, and restore.
- Confluence writer: allowlisted REST ingestion, Windows Credential Manager, conversion, and atomic generations.
- Reproducible install:
requirements.lock,--require-hashes, regenerating the lock. - Public specification: MCP surface, index contracts, data, distribution, and limits.
- Architecture: end-to-end and technical choices.
- Security: local runtime, telemetry off, single-writer.
Prerequisites
| Path | Requirements |
|---|---|
| Windows installer | No separate Python or .NET runtime. At least ~500 MB of space (applications, model + index). |
| Standalone archive | No Python. ~500 MB of space (model + index). |
| From source | Python 3.11 to 3.13. ~500 MB of space. |
| Client | Claude Desktop/Code, Codex, Gemini, Antigravity, LM Studio, Cursor, Windsurf or VS Code (MCP support). |
License
Apache 2.0. See LICENSE.
Retrieval validation
See the validation guide for the desktop JSON search contract, the isolated FR/EN relevance corpus, performance measurements and exact paired-commit checks.
Questions sur Cortex MCP
Comment ajouter Cortex MCP à Claude Code ?
Exécutez claude mcp add --env 'CORTEX_KB_PATH=<CORTEX_KB_PATH>' cortex -- uvx cortex-local-rag dans votre terminal. Ajoutez --scope user pour le rendre disponible dans tous les projets.
Comment ajouter Cortex MCP à Cursor ?
Ouvrez ~/.cursor/mcp.json et ajoutez le serveur sous mcpServers, avec la configuration Cursor indiquée dans la section d'installation ci-dessus.
Quels outils Cortex MCP fournit-il ?
Il expose 4 outils, dont cortex_search, cortex_sync, cortex_list_sections, cortex_freshness.
Est-ce que Cortex envoie le contenu de mes documents dans le cloud ?
Non, Cortex traite et indexe la base de connaissances localement sans envoyer son contenu.
Quelles langues sont prises en charge par la recherche sémantique ?
La recherche est multilingue et prend en charge le français et l'anglais.
Puis-je utiliser Cortex avec Confluence ?
Oui, il existe un connecteur Confluence optionnel qui télécharge uniquement les espaces explicitement autorisés.