# Contextful [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/Inferensys/contextful  
**GitHub Stars:** 7  
**npm Downloads (last month):** 313  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/contextful

## Description
Efficient context management: code search, evidence packs, and memory for coding agents.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "contextful": {
    "command": "npx",
    "args": ["-y","@inferensys/contextful"]
  }
}
```

## Documentation

## What Contextful does

The Contextful MCP server provides a local context layer for coding agents working in a project workspace. It indexes source files and related project knowledge, then retrieves compact evidence instead of requiring an agent to inspect many files independently. Results can include ranked code and documentation matches, symbols, graph relationships, Git history, and stored project lessons.

Its central output is a context pack: a cited, token-budgeted bundle of relevant evidence. The server also supports an evidence-backed memory ledger for decisions, lessons, and project facts. Memories must point to files, symbols, commits, or earlier context packs. If referenced evidence changes, the memory can be rejected or marked stale.

## How it works

A Contextful MCP server uses SQLite as its default local store. SQLite FTS5 supplies lexical BM25 search, while typed graph tables represent nodes, edges, and their properties. A hot adjacency cache supports common graph relationships, and structural fingerprints provide an additional deterministic reranking signal.

Search can combine lexical matches with symbols, documentation, graph connections, and memory hits. The available agent operations include building a context pack, searching code and project knowledge, tracing a path between entities, analyzing likely impact, examining why a symbol or file changed, recalling memories, and writing a lesson with evidence references.

The local daemon or watcher handles indexing, rebuilds, and freshness. The MCP interface is intended for agents, while the CLI provides human-facing setup, inspection, searches, memory writes, and smoke tests.

## Setup and configuration

Initialize a workspace with `npx @inferensys/contextful init --workspace .`, then run a search such as `npx @inferensys/contextful search "where is user auth handled" --workspace . --budget 2000`. The primary CLI binary is `cxf`; `contextful` is also available as an alias. Indexing can run once or with watch mode through `cxf index --workspace <path> [--watch]`.

To expose the Contextful MCP server, use `npx @inferensys/contextful server`. An MCP client can launch it with the following configuration:

```json
{
  "mcpServers": {
    "contextful": {
      "command": "npx",
      "args": ["-y", "@inferensys/contextful", "server"]
    }
  }
}
```

Run `cxf init` once per workspace. Initialization writes `.contextful/AGENT_INSTRUCTIONS.md`, which guides agents on context packs, narrower searches, and permitted memory writes. No environment variables are documented as required.

## Tools and capabilities

The Contextful MCP server exposes these core tools:

- `context_pack(query, budget, scope)` returns a ranked, cited bundle constrained by a token budget.
- `search_code(query, mode, filters)` searches code, documentation, symbols, and memory.
- `trace_path(from, to, edge_types)` traverses relationships among files, symbols, modules, and configuration.
- `impact_analysis(symbol_or_file)` reports reverse dependencies and likely tests.
- `why_changed(symbol_or_file)` combines current evidence with Git history.
- `recall_memory(query, scope)` searches session and durable project lessons.
- `write_lesson(claim, evidence_refs, scope)` stores an evidence-backed memory.

## Limitations and notes

The project describes its current release as early alpha, so its API, features, and integrations may change. Version one is local-only: it does not call external embedding APIs or upload source code. It also does not edit source files, automatically fix code, or install dependencies inside the target workspace.

Memory references must use evidence returned by searches or context packs, such as file ranges, symbols, or pack identifiers. Invalid or outdated references are rejected or marked stale. Optional semantic-vector storage and larger-repository adjacency upgrades are described as future work rather than current default capabilities.

_Full upstream README: https://allmcps.com/mcp/contextful/readme_

