Temporal-first local code memory for AI tools via MCP
Project description
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 recursive traversal
- GNN Enhancement - Graph neural networks propagate semantic context
- Docs Write - AI-powered documentation updates with two-phase commit
- Incremental Indexing - Git-aware change detection, BLAKE3 content hashing
Installation
# Recommended — persistent isolated environment
uv tool install contextual-engine
# Alternative
pipx install contextual-engine
Quick Start
# Initialize project
contextual init /path/to/repo
# Index codebase
contextual index .
# Search
contextual search "authentication middleware"
# Start MCP server (for Claude Desktop, Cursor, etc.)
contextual serve
MCP Integration
Add to your AI tool's MCP config:
{
"mcpServers": {
"contextual": {
"command": "contextual",
"args": ["serve", "--project", "/path/to/repo"]
}
}
}
Documentation
- Architecture - System design across all layers
- Technical Spec - Implementation details
- Project Phases - Development roadmap
- MCP Tools - Tool contracts and API
License
Business Source License 1.1 (BUSL-1.1) — see LICENSE for the full terms, including the Additional Use Grant and the Change Date / Change License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextual_engine-0.9.6.tar.gz.
File metadata
- Download URL: contextual_engine-0.9.6.tar.gz
- Upload date:
- Size: 979.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4c855d3a995dcfdb75296f2d95c12a2a9d48399770cb0675547de8fb653850b
|
|
| MD5 |
439ef3794088dcf54cd6185de941f2ba
|
|
| BLAKE2b-256 |
cbed58fbac55d1cca083fe2e859e6c18b0e582ca5d0be0fb37c5e4f5ff00a528
|
Provenance
The following attestation bundles were made for contextual_engine-0.9.6.tar.gz:
Publisher:
release.yml on aarjunm04/Contextual
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextual_engine-0.9.6.tar.gz -
Subject digest:
a4c855d3a995dcfdb75296f2d95c12a2a9d48399770cb0675547de8fb653850b - Sigstore transparency entry: 1981388298
- Sigstore integration time:
-
Permalink:
aarjunm04/Contextual@e842e5de456f7e8cdacf34895ab74e98bd41c47d -
Branch / Tag:
refs/tags/v0.9.6 - Owner: https://github.com/aarjunm04
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e842e5de456f7e8cdacf34895ab74e98bd41c47d -
Trigger Event:
push
-
Statement type:
File details
Details for the file contextual_engine-0.9.6-py3-none-any.whl.
File metadata
- Download URL: contextual_engine-0.9.6-py3-none-any.whl
- Upload date:
- Size: 493.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cd5d9a242fbb791038e20d3226221f4e365593f0f065670d6c27ce317fc5bd0
|
|
| MD5 |
70720569d3211c3f7500699fe71c1675
|
|
| BLAKE2b-256 |
657940c082817d7509966057447245ceeae522d59aa198d972e7397ed7d4b5d1
|
Provenance
The following attestation bundles were made for contextual_engine-0.9.6-py3-none-any.whl:
Publisher:
release.yml on aarjunm04/Contextual
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
contextual_engine-0.9.6-py3-none-any.whl -
Subject digest:
9cd5d9a242fbb791038e20d3226221f4e365593f0f065670d6c27ce317fc5bd0 - Sigstore transparency entry: 1981388378
- Sigstore integration time:
-
Permalink:
aarjunm04/Contextual@e842e5de456f7e8cdacf34895ab74e98bd41c47d -
Branch / Tag:
refs/tags/v0.9.6 - Owner: https://github.com/aarjunm04
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e842e5de456f7e8cdacf34895ab74e98bd41c47d -
Trigger Event:
push
-
Statement type: