Metadata-Version: 2.4
Name: context42-io
Version: 0.3.3
Summary: MCP server for semantic search over personal coding instructions and documentation
Project-URL: Homepage, https://github.com/context42-io/context42
Project-URL: Repository, https://github.com/context42-io/context42
Project-URL: Changelog, https://github.com/context42-io/context42/blob/main/CHANGELOG.md
Author-email: Daniel Gines <dangines@gmail.com>
Maintainer-email: Daniel Gines <dangines@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: claude,code-assistant,documentation,embeddings,llm,mcp,semantic-search,vector-search
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Indexing
Requires-Python: >=3.11
Requires-Dist: fastembed>=0.2.0
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: lancedb>=0.4.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.9.0
Description-Content-Type: text/markdown

# 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

```bash
# Using pipx (recommended)
pipx install context42-io

# Using uv
uvx context42-io

# Using pip
pip install context42-io
```

## Quick Start

```bash
# 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` |

```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:

```bash
# 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):

```bash
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
