context42
Your coding standards, always in context. An open-source MCP server with semantic search over your docs. 100% offline.
Install / Use
claude mcp add Context42-io -- npx -y github:Context42-io/context42If the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of context42
context42 scores 74/100 on our quality scale, 868th of 964 AI & Machine Learning skills we index.
Its MCP Server is 6.9 KB long, well organised into 29 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 8 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-09-20 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 86/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-29. Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
context42 compared with similar skills
All 4 of these similar skills score higher than context42; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| context42 (this skill)by Context42-io | 74 | 3 | 8mo ago | MCP Server |
| claude-memby thedotmack | 100 | 100.4k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 97.0k | 5d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 86.2k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.2k | today | CLAUDE.md |
Frequently asked questions
- How do I install context42?
- Run
claude mcp add Context42-io -- npx -y github:Context42-io/context42. The install tabs above show the steps for each supported agent. - Which AI agents does context42 work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is context42 safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 86/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is context42 still maintained?
- The repository was last updated about 8 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubWhy Context42?
Your AI assistant doesn't know your team's coding conventions. Every session starts from zero — your standards get lost, docs are scattered across wikis and READMEs, and pasting entire documents into prompts wastes tokens.
Context42 solves this by indexing your documentation locally and serving the most relevant chunks to your AI assistant via MCP — automatically, semantically, and without any data leaving your machine.
How it works
<p align="center"> <img src="docs/architecture-diagram.svg" alt="Context42 Architecture" width="750" /> </p>- Add your documentation directories as sources
- Index — Context42 chunks your docs and creates local vector embeddings
- Store — Vectors are saved locally in LanceDB
- Serve — Your AI assistant queries relevant content via MCP, weighted by priority
Installation
Requires Python 3.11+
# Using pipx (recommended)
pipx install context42-io
# Using uv
uvx context42-io
# Using pip
pip install context42-io
Quick Start
# 1. Add your documentation
c42 add ~/my-coding-standards --name standards --priority 0.9
# 2. Index the content
c42 index
# 3. Start the MCP server
c42 serve
Claude Desktop Integration
Add to your Claude Desktop configuration file:
| Platform | Path |
|----------|------|
| Linux | ~/.config/claude/claude_desktop_config.json |
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
{
"mcpServers": {
"context42": {
"command": "c42",
"args": ["serve"]
}
}
}
Restart Claude Desktop after adding the configuration.
CLI Reference
Adding & indexing sources
c42 add <path> --name <name> # Add a documentation source
c42 add <path> --name <name> --priority 0.9 # Add with priority (0.1–1.0)
c42 add <path> --name <name> --exclude "*.log,tmp/*" # Exclude file patterns
c42 index # Index all pending sources
Managing sources
c42 list # List all sources with status
c42 set-priority <name> <value> # Change source priority
c42 remove <name> # Remove a source
c42 status # Show index statistics
Searching & serving
c42 search "error handling" # Search from the CLI
c42 serve # Start the MCP server
c42 --help # Show all available commands
Priority System
Set higher priority for your personal instructions so they take precedence over reference documentation:
# Your rules — highest weight
c42 add ~/my-standards --name standards --priority 1.0
# Team guidelines — medium weight
c42 add ~/team-docs --name team --priority 0.7
# Reference docs — lower weight
c42 add ~/library-docs --name reference --priority 0.4
Search results are weighted by priority, so your personal preferences always appear first.
Supported Formats
| Format | Extensions | Notes |
|--------|-----------|-------|
| Markdown | .md | Full CommonMark support |
| reStructuredText | .rst | Sphinx-compatible |
More formats planned — see Roadmap.
MCP Tool
Context42 exposes a single search tool via MCP:
search(query: string, top_k?: int) → SearchResult[]
Each result includes:
text— The matching content chunksource— Name of the sourcefile— Relative path to the filescore— Similarity score (0–1, higher = more relevant)priority— Source priority weightis_priority—trueif the source has priority ≥ 0.8
Configuration
Context42 works out of the box with no configuration required. All settings below are optional:
| Variable | Default | Description |
|----------|---------|-------------|
| C42_EMBEDDING_MODEL | BAAI/bge-small-en-v1.5 | Sentence-transformer embedding model |
| C42_CHUNK_SIZE | 500 | Characters per chunk |
| C42_BATCH_SIZE | 50 | Chunks per indexing batch |
| C42_DATA_DIR | Platform default | Data storage directory |
| HF_TOKEN | — | Hugging Face token for faster model downloads |
# Example: use a different embedding model
export C42_EMBEDDING_MODEL="BAAI/bge-base-en-v1.5"
# Optional: set HuggingFace token for faster downloads
export HF_TOKEN="hf_y…[redacted]"
Note: Changing the embedding model requires re-indexing all sources (
c42 index).
Get your HF token at: https://huggingface.co/settings/tokens
Data Storage
| Platform | Path |
|----------|------|
| Linux | ~/.local/share/context42/ |
| macOS | ~/Library/Application Support/context42/ |
| Windows | %LOCALAPPDATA%\context42\ |
Security & Privacy
Context42 processes everything locally. Your code and documentation never leave your machine.
- Zero data transmission — No outbound network calls
- Local-only embeddings — The AI model runs on your CPU, no tokens sent to external APIs
- No telemetry — No analytics, no crash reports, no phone-home behavior
- Works air-gapped — After initial setup, no internet connection needed
Learn more at context42.io.
Roadmap
- [ ] Git clone sources — Add any Git repository as a source
- [ ] File watcher — Auto re-index when files change on disk
- [ ] Git sync — Detect new commits and re-index automatically
See all planned features and suggest new ones on GitHub Issues.
Contributing
Contributions are welcome! Feel free to:
- Open a feature request
- Report a bug
- Submit a pull request
License
MIT
Related Skills
claude-mem
100.4kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
97.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
86.2kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
75.2kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
