loading…
Search for a command to run...
loading…
A local-first MCP server that indexes all your local files (text, code, images, audio, video) and provides hybrid search (BM25+embeddings) to retrieve only rele
A local-first MCP server that indexes all your local files (text, code, images, audio, video) and provides hybrid search (BM25+embeddings) to retrieve only relevant chunks for AI tools, reducing token usage by over 57%.
One MCP server for all your local files. Search everything, send only what matters to AI.
Stop pasting entire files into Claude. ContextCore indexes your notes, code, documents, images, audio, and video locally — then exposes a single MCP server that any AI tool can query. Instead of bloating your context window, Claude searches first and retrieves only the relevant chunks.
57% fewer tokens. Same answers. No cloud.
| Benchmark Setup | Baseline Context | ContextCore Context | Reduction |
|---|---|---|---|
| SciFact (top-5 retrieved docs vs chunked context) | 1,723.5 tokens/query | 733.4 tokens/query | 57.45% |
Works with: Claude Desktop · Claude Code · Cursor · Cline · OpenCode · any MCP-compatible tool
Most developers working across large codebases or document collections hit the same wall: pasting everything into context is expensive, slow, and hits limits. RAG pipelines require infrastructure. Other memory tools are cloud-only or single-format.
ContextCore is a local-first MCP server that does hybrid search (BM25 + embeddings) across every file type you care about — and registers itself with your AI tools automatically. One install. One server. All your data.
It is not Supermemory. It does not sync to a cloud. Your files stay on your machine. What it gives you is supercharged retrieval across every local file format, surfaced directly inside Claude and other tools via MCP.
This is the one MCP to rule them all design: instead of managing separate MCP servers for different file types, you have one local server with a consistent search API across text, code, images, audio, and video.
contextcore init — indexes your chosen folders (text, code, images, audio, video)search tool callThe hybrid search combines BM25 (keyword) and embeddings (semantic) so it handles both exact lookups ("find the function called parse_config") and fuzzy concept searches ("where did I write about the retry logic?").

Install from PyPI:
python -m pip install contextcore
Optional source install (for contributors):
git clone https://github.com/lucifer-ux/SearchEmbedSDK.git
cd SearchEmbedSDK
python -m pip install -e .
Then run the setup wizard:
contextcore init

Gif is sped up to skip the installation parts.
That's it. ContextCore indexes your files, registers with your AI tools, and runs in the background. No config files to edit.
Optional but important:
ffmpeg for video indexing, can be improvedContextCore gives you:
contextcorehttp://127.0.0.1:8000ContextCore can expose your codebase context directly to MCP tools (for example, Claude Desktop and OpenCode) so the model can reason over your project without you pasting the entire directory into chat.
Use the code modality during setup (contextcore init) and ContextCore will provide indexed codebase context through MCP tools such as:
get_codebase_contextget_codebase_indexget_module_detailget_file_contentFor real usage, the most reliable setup is:
contextcore initcontextcore servemcp_server.py in your Claude configDo not test the backend in one venv and point Claude at a different venv. That is one of the most common causes of "it works in the terminal but not in Claude".
Run:
contextcore --help
If that fails, the package is not installed in the Python environment your shell is using. you can raise a bug otherwise
You can benchmark the current text retrieval stack on a BEIR dataset (starting with SciFact) without touching your existing index data. More datasets and more benchmarking criterias will be added soon.
Install optional benchmark dependency:
python -m pip install beir
Run benchmark:
contextcore benchmark --dataset scifact --top-k 10
Optional fast iteration with fewer queries:
contextcore benchmark --dataset scifact --top-k 10 --max-queries 50
Optional JSON output:
contextcore benchmark --dataset scifact --output-json .\benchmarks\scifact_run.json
Token reduction benchmark (tiktoken):
python -m pip install tiktoken
contextcore benchmark --dataset scifact --top-k 10 --measure-tokens --context-top-k 5
Compare retrieval systems (ContextCore vs BM25) and export publish-ready tables:
contextcore benchmark --dataset scifact --top-k 10 --measure-tokens --context-top-k 5 --systems contextcore_hybrid,bm25_only,trigram_only --report-csv .\benchmarks\scifact_compare.csv --report-md .\benchmarks\scifact_compare.md --output-json .\benchmarks\scifact_compare.json
contextcore status
This shows:
contextcore index
Or for a specific folder:
contextcore index "C:\Users\USER\Documents\test"
contextcore serve
By default, ContextCore uses port 8000.
Background server shortcuts:
contextcore start
contextcore stop
contextcore restart
contextcore server status
contextcore uninstall
Preview without deleting anything:
contextcore uninstall --dry-run
Fully remove local data and also uninstall the pip package:
contextcore uninstall --yes --remove-package
contextcore doctor
contextcore report image search returned empty even though file exists
If you run contextcore report without text, it will prompt for a description.
For automatic issue creation, authenticate with either:
gh auth login
or set a token:
$env:CONTEXTCORE_GITHUB_TOKEN = "ghp_xxx"
contextcore update
This command always targets the sdk_root saved during contextcore init,
so it works even if you run it from another folder.
If you do not want an automatic background-server restart after update:
contextcore update --no-restart
contextcore register claude-desktop
contextcore register claude-code
contextcore register cursor
contextcore register cline
Or use the standalone registrar script:
python register_mcp.py --list
python register_mcp.py --tool claude-code
python register_mcp.py --dry-run
python register_mcp.py --all
contextcore install clip
contextcore install audio
contextcore install all
A healthy setup usually looks like:
Server
------------------------------------------------------------------------------
[OK] Running on port 8000
[OK] MCP server script found
Index Progress
------------------------------------------------------------------------------
Text > 0 ready
Images > 0 ready
Audio > 0 ready
Video > 0 ready
If Video shows missing ffmpeg, video indexing is not ready.
If Video shows model unavailable, the CLIP model is not ready in the active environment.
Use the same Python executable that you used for the CLI and backend.
Example Claude MCP config:
{
"mcpServers": {
"contextcore": {
"command": "C:\\Users\\USER\\Documents\\SDKSearchImplementation\\SearchEmbedSDK\\.venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\USER\\Documents\\SDKSearchImplementation\\SearchEmbedSDK\\mcp_server.py"
],
"cwd": "C:\\Users\\USER\\Documents\\SDKSearchImplementation\\SearchEmbedSDK",
"env": {
"CONTEXTCORE_API_BASE_URL": "http://127.0.0.1:8000",
"CONTEXTCORE_MCP_TIMEOUT_SECONDS": "120"
}
}
}
}
Important:
command should point to the Python inside the venv you are actively usingargs should point to this repo's mcp_server.pycwd should be the repo rootCONTEXTCORE_API_BASE_URL should match the backend server portAfter changing Claude config:
Use this call order in Claude/Cursor/OpenCode/Cline:
search first for any user question about local files/content.fetch_content after search when deeper file detail is required.get_neighbors for adjacent text/audio chunk context.list_sources for index/source diagnostics.index_content only when user asks to reindex or results are stale/missing.prepare_file_for_tool / reveal_file when user wants to open/attach local files.Guidelines:
modality=all unless user explicitly asks for image/video/audio/text only.index_content, then retry search.Claude Code user config path:
~/.claude.json
If you do not see ContextCore under /mcp, add this manually:
{
"mcpServers": {
"contextcore": {
"type": "stdio",
"command": "/Users/<you>/.contextcore/.venv/bin/python",
"args": [
"/Users/<you>/.contextcore/mcp_server.py"
]
}
}
}
Typical values by OS:
command: /Users/<you>/.contextcore/.venv/bin/pythonargs[0]: /Users/<you>/.contextcore/mcp_server.pycommand: C:\\Users\\<you>\\.contextcore\\.venv\\Scripts\\python.exeargs[0]: C:\\Users\\<you>\\.contextcore\\mcp_server.pyTo get exact values from your machine:
cd ~/.contextcore
echo "python: $(pwd)/.venv/bin/python"
echo "mcp_server: $(pwd)/mcp_server.py"
Windows PowerShell:
Set-Location $env:USERPROFILE\.contextcore
Write-Host "python: $((Get-Location).Path)\.venv\Scripts\python.exe"
Write-Host "mcp_server: $((Get-Location).Path)\mcp_server.py"
Then:
contextcore status should show port 8000)/mcp again inside Claude CodeDeterministic path detection (recommended):
python detect_paths.py
python detect_paths.py --json
python detect_paths.py --mcp-config
python detect_paths.py --claude-json
python detect_paths.py --shell
python detect_paths.py --validate
This script resolves Python and mcp_server.py deterministically and validates
that your environment is usable before you paste config values.
You can verify the backend directly:
Invoke-WebRequest http://127.0.0.1:8000/health
If the backend is healthy, you should get a successful response.
contextcore command not foundCause:
Fix:
python -m pip install contextcore
contextcore init fails on import errorsCause:
Fix:
python -m pip install --upgrade pip
python -m pip install --force-reinstall contextcore
If you are developing from source instead of PyPI:
pip install -r requirements.txt
pip install -e .
Then verify:
python -c "import questionary, typer, fastapi; print('ok')"
Cause:
python.execwd is missing or wrong~/.claude.jsonFix:
commandcwd/mcp and confirm contextcore is listed/mcp is empty, add the mcpServers.contextcore entry shown in Claude Code Setupmissing ffmpegCause:
ffmpeg is not installedffmpeg exists but is not resolvable in the active runtimeCheck:
where.exe ffmpeg
ffmpeg -version
If not found:
wingetbrewExamples:
winget install Gyan.FFmpeg
brew install ffmpeg
sudo apt install ffmpeg
Then rerun:
contextcore init
or:
contextcore install all
model unavailableCause:
Fix:
contextcore install clip
Then recheck:
contextcore status
Cause:
Fix:
contextcore install audio
contextcore index
Check:
contextcore.yaml point to the folder you think it does?Your config usually lives at:
C:\Users\USER\.contextcore\contextcore.yaml
Verify:
organized_rootaudio_directoriesvideo_directoriesThen run:
contextcore index
contextcore status
ContextCore should use port 8000 unless you override it.
Check backend:
contextcore status
Check Claude config:
"CONTEXTCORE_API_BASE_URL": "http://127.0.0.1:8000"
These must match.
Find them:
Get-CimInstance Win32_Process | Where-Object {
$_.CommandLine -match 'uvicorn unimain:app|mcp_server.py'
} | Select-Object ProcessId, ExecutablePath, CommandLine
Stop them:
Stop-Process -Id <PID> -Force
Then start cleanly:
contextcore serve
Cause:
Do not create test venvs inside broad workspace roots unless they are ignored.
The repo already ignores common noise such as:
.venv/.venv-test/__pycache__If your IDE still shows thousands of changes:
When diagnosing problems, the highest-signal commands are:
contextcore status
contextcore doctor
where.exe ffmpeg
Invoke-WebRequest http://127.0.0.1:8000/health
If something still fails, capture:
contextcore status outputThat is usually enough to isolate the issue quickly.
ContextCore is now configured for packaging with pyproject.toml + twine.
python -m pip install --upgrade pip build twine wheel
Create your local PyPI credentials file:
%USERPROFILE%\.pypirc%USERPROFILE%\.pypirc private (never commit)# Build artifacts into ./dist
python -m build --no-isolation
# Validate metadata and long description
python -m twine check dist/*
# Upload to PyPI
python -m twine upload dist/*
Or use the helper script:
# Upload to real PyPI
.\scripts\publish_pypi.ps1
# Upload to TestPyPI
.\scripts\publish_pypi.ps1 -Repository testpypi
In %USERPROFILE%\.pypirc use:
[pypi]
username = __token__
password = pypi-<your-real-token>
Alternative (without .pypirc):
$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-<your-real-token>"
python -m twine upload dist/*
contibutors:- https://www.linkedin.com/in/abhishek-jaiswal-b67296191/ https://www.linkedin.com/in/shashwat-shukla-7b4946182/
Выполни в терминале:
claude mcp add contextcore -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.