Skip to main content

MCP server for semantic search over personal coding instructions and documentation

Project description

Context42

MCP server for semantic search over your personal coding instructions.

What it does

Context42 indexes your markdown documentation and makes it searchable by AI assistants like Claude. Your coding standards, guidelines, and patterns become instantly accessible during development.

Installation

# 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

# 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 Commands

Command Description
c42 add <path> --name <n> Add documentation source
c42 add <path> --priority <0.1-1.0> Add with priority (higher = more important)
c42 list List all sources
c42 index Index pending sources
c42 search <query> Search from CLI
c42 status Show statistics
c42 remove <n> Remove a source
c42 set-priority <n> <value> Change source priority
c42 serve Start MCP server

Priority System

Set higher priority for your personal instructions so they take precedence over reference documentation:

# Your rules (high priority)
c42 add ~/my-standards --name standards --priority 1.0

# Reference docs (lower priority)
c42 add ~/library-docs --name docs --priority 0.5

Search results are weighted by priority, ensuring your preferences appear first.

Features

  • 100% Offline - Runs locally after initial model download
  • Priority System - Your rules take precedence over reference docs
  • Fast Indexing - Progress bars with batch processing
  • Idempotent - Safe to re-run indexing

Configuration

Environment variables (optional):

C42_EMBEDDING_MODEL="BAAI/bge-small-en-v1.5"  # Default model
C42_CHUNK_SIZE=500                             # Characters per chunk
C42_BATCH_SIZE=50                              # Chunks per batch
C42_DATA_DIR="~/.local/share/context42"        # Data directory

Data Storage

Context42 stores data in platform-specific locations:

Platform Path
Linux ~/.local/share/context42/
macOS ~/Library/Application Support/context42/
Windows %LOCALAPPDATA%\context42\

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

context42_io-0.3.3.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

context42_io-0.3.3-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file context42_io-0.3.3.tar.gz.

File metadata

  • Download URL: context42_io-0.3.3.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for context42_io-0.3.3.tar.gz
Algorithm Hash digest
SHA256 37867fd0472c36a9c7e7317957d1bb4a570082e606ac78b453ffef6f6e158f6f
MD5 1a3bddd895002b17ca2b2c18c2904254
BLAKE2b-256 41b7b7bf84c99aa2a954f2c618de642ab6cc120c2dde3401c9a548191b2ecb14

See more details on using hashes here.

File details

Details for the file context42_io-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: context42_io-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for context42_io-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 27650bae573d9e90e4cab33dfc827b97e80078457b56496c57b72298c58457f2
MD5 8263bf560b8aeb7f3ebeb448d9276585
BLAKE2b-256 c31d49dcfc28abdc30c69dac0eabb38ecf286203c01419c41a92667de9a952e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page