Contextual
Local-first temporal semantic code memory engine for AI tools
What is Contextual?
Contextual transforms code repositories into queryable, time-aware knowledge structures. Unlike traditional RAG systems that treat code as static documents, Contextual maintains full temporal awareness, structural understanding, and semantic relationships across your entire codebase.
The Four-Way Wedge:
- Local-first - Embedded storage, no cloud dependency
- Bitemporal - Tracks when facts were true AND when you learned them
- Code-aware - AST parsing, not just text chunking
- Tool-agnostic - MCP integration works with any AI IDE/chat client
Features
- Hybrid Search - BM25 + vector embeddings with RRF fusion
- Temporal Queries - Time-travel through your codebase history
- Knowledge Graph - Entity-relationship triples with CHA/RTA structural resolution and recursive traversal
- Docs Write - AI-powered documentation updates with two-phase commit
- Incremental Indexing - Git-aware change detection, BLAKE3 content hashing
- Multi-Workspace MCP Daemon - One daemon serves a registry of projects; auto-configures Claude Desktop, VS Code Copilot, and Codex
Installation
# Recommended — persistent isolated environment
uv tool install contextual-engine
# Alternative
pipx install contextual-engine
Quick Start
# One-time global setup (downloads the embedding model)
contextual setup
# Initialize a project
cd /path/to/repo
contextual init .
# Index the codebase
contextual index .
# Auto-configure an AI client (writes MCP config for you)
contextual client claude # or: vscode, codex
Search, temporal queries, and graph traversal are exposed as MCP tools, not CLI subcommands — once a client is wired up, ask it a codebase question directly. See MCP Tools for the full tool list.
MCP Integration
contextual client <name> writes this for you. To configure manually, or for a client it doesn't yet support:
{
"mcpServers": {
"contextual": {
"command": "contextual",
"args": ["mcp", "start"]
}
}
}
The daemon serves every workspace registered via contextual workspace add — no separate server process per project. Manage it directly with contextual mcp start|stop|restart|status|logs.
Documentation
- Architecture - System design and implementation
- Database - LanceDB schema reference
- MCP Tools - Tool contracts and API
License
Proprietary — All Rights Reserved. See LICENSE for the full terms. Contextual is closed-source and is not, and will not become, open source. Commercial use is governed by the Commercial License Agreement / Terms of Service accompanying a paid subscription, not by this file alone.
Metadata
Release files for contextual-engine 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| contextual_engine-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / contextual_engine-1.0.3-py3-none-any.whl
| Download URL | contextual_engine-1.0.3-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ca3f6b64340db790be427ad0c132f4168e07bab41ae11d7fe4da23d7436ce11
|
|
BLAKE2b-256 checksum How to use checksums |
2f5fda86dd5ffab3b506ad491a346184665b7f21412ef9135466a413ad52d679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log