Logotipo de ContextAtlas

ContextAtlas

Comunidad
codefromkarl

ContextAtlas — context infrastructure for AI coding agents: hybrid retrieval, project memory and retrieval observability via CLI, MCP server or embeddable library. Tree-sitter indexing, LanceDB vector search, FTS5 and token-aware context packing.

Editorcodefromkarl
RepositorioContextAtlas
IdiomaTypeScript
Forks
2
Estrellas
29
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    ContextAtlas ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    29 estrellas y 2 forks en el repositorio enlazado.

ContextAtlas is an open-source context infrastructure for AI coding agents — providing hybrid code retrieval, project memory, and retrieval observability as a CLI, MCP server, or embeddable library. It combines tree-sitter semantic chunking, LanceDB vector search, SQLite FTS5 full-text search, and token-aware context packing to deliver structured, high-quality code context to tools like Claude Code, Codex, and custom agent workflows.

Updates

  • 2026-04-15: added git hook auto-maintenance with --quick health check (260x speedup), stale index cleanup CLI, and three-layer hook protection (debounce + quick mode + daily throttle).
  • 2026-04-14: extracted 11 Memory MCP tools' business logic to application layer, completing three-layer architecture separation (CLI / MCP adapter → application → domain), and fixed all 31 TypeScript compilation errors.
  • 2026-04-10: codebase-retrieval now includes the lightweight direct graph summary by default, with MCP metadata, tests, and changelog docs updated in sync.
  • 2026-04-09: added churn / cost-aware index planning, moved long-term memory into dedicated tables + FTS5, and finished default-path hardening, threshold configuration, ops alert threshold alignment, and doc sync.
  • 2026-04-08: added the embedding gateway, local caching and multi-upstream routing, plus Hugging Face integration and MCP context lifecycle tools.
  • 2026-04-07: improved the indexing pipeline with lighter planning, snapshot copy reduction, queue observability, fallback hardening, and repeatable benchmarks.
  • 2026-04-06: tightened the default user path, memory governance, and operational visibility to make first use, feedback loops, and health checks clearer.

Contents

ContextAtlas is not just a code search tool. It addresses a more practical engineering problem:

  • can an agent find the right code faster in a large repository?
  • can repository understanding be persisted instead of rediscovered every session?
  • can retrieval, indexing, and memory quality be observed and improved over time?

If you are building Claude Code workflows, MCP clients, or custom agent systems, ContextAtlas provides a context infrastructure layer: retrieval, memory, context packing, and observability.

Why ContextAtlas

In real projects, agent failures are often not caused by a weak model. They come from weak context systems:

  • the relevant code is not found
  • the returned code is too fragmented and lacks surrounding context
  • the same module has to be re-understood again and again
  • indexes become stale, retrieval quality degrades, and token budgets get exhausted without clear signals

ContextAtlas turns this into a composable set of capabilities:

  • Find: hybrid retrieval narrows down the relevant implementation
  • Expand: graph expansion and token packing turn hits into usable local context
  • Store: project memory, long-term memory, and a cross-project hub preserve knowledge
  • Observe: health checks, telemetry, usage analysis, and alerts make the system diagnosable

Where it fits

  • As a repository retrieval backend for coding agents
  • As an MCP server for external clients that need code retrieval and memory tools
  • As a local CLI / skill backend for scripts, CI, and workflow automation
  • As a cross-project knowledge layer for reusable module knowledge and decision history

Core capabilities

CapabilityDescription
Hybrid RetrievalVector recall + FTS lexical recall + RRF fusion + rerank
Context ExpansionLocal context expansion based on neighbors, breadcrumbs, and imports
Token-aware PackingKeeps the highest-value context inside a limited token budget
Project MemoryFeature Memory, Decision Record, and Project Profile
Long-term MemoryRules, preferences, and external references that cannot be derived reliably from code
Cross-project HubReuse module memories, dependency chains, and relations across repositories
Async IndexingSQLite queue + daemon consumer + atomic snapshot switch
ObservabilityRetrieval monitor, usage report, index health, memory health, and alert evaluation

ContextAtlas decides what context to provide, not how the task should be executed. It does not handle agent reasoning, workflow orchestration, or business API actions.

Tech stack

  • TypeScript / Node.js 20+
  • Tree-sitter for semantic chunking
  • SQLite + FTS5 for metadata, retrieval, queues, and memory hub storage
  • LanceDB for vector storage
  • Model Context Protocol SDK for MCP integration

Installation

bash
npm install -g @codefromkarl/context-atlas

Product identity mapping:

  • Repository: ContextAtlas
  • npm package: @codefromkarl/context-atlas
  • CLI command: contextatlas

Available commands:

  • contextatlas
  • cw (short alias)

The docs use contextatlas as the primary command name. cw remains as a compatibility alias.

Configuration

Initialize the config directory and example environment file first:

bash
contextatlas init
# Choose your integration mode:
contextatlas setup:local --mode cli-skill   # Terminal + skill integration
# OR
contextatlas setup:local --mode mcp         # MCP client integration

Default config file location:

bash
~/.contextatlas/.env

Minimum required configuration:

bash
EMBEDDINGS_API_KEY=
EMBEDDINGS_BASE_URL=
EMBEDDINGS_MODEL=

RERANK_API_KEY=
RERANK_BASE_URL=
RERANK_MODEL=

Index update planning also supports these optional knobs:

bash
INDEX_UPDATE_CHURN_THRESHOLD=0.35
INDEX_UPDATE_COST_RATIO_THRESHOLD=0.65
INDEX_UPDATE_MIN_FILES=8
INDEX_UPDATE_MIN_CHANGED_FILES=5
  • INDEX_UPDATE_CHURN_THRESHOLD: when the changed-file ratio crosses this value, index:plan / index:update will favor full
  • INDEX_UPDATE_COST_RATIO_THRESHOLD: triggers full when the estimated incremental cost is close to a full rebuild
  • INDEX_UPDATE_MIN_FILES / INDEX_UPDATE_MIN_CHANGED_FILES: require both repo size and change size to clear a minimum bar before escalation is allowed

init writes an editable example .env, including default SiliconFlow endpoints and recommended model settings. setup:local --mode <mode> writes only the configuration files for the selected mode. See First use guide for mode selection guidance. After setup, run contextatlas health:full to verify index, memory, graph, contract, and MCP process health.

Quick start

If you are onboarding for the first time, start with the First use guide.

1) Confirm the default entry flow

bash
contextatlas start /path/to/repo

2) Initialize and fill in API settings

bash
contextatlas init
# edit ~/.contextatlas/.env

3) Index a repository

bash
contextatlas index /path/to/repo

4) Run local retrieval

bash
contextatlas search \
  --repo-path /path/to/repo \
  --information-request "How is the authentication flow implemented?"

5) Start the daemon (recommended)

bash
contextatlas daemon start

6) Expose it as an MCP server

bash
contextatlas mcp

If you want MCP client integration, run contextatlas setup:local --mode mcp first.

Integration modes

1. As a local CLI / skill backend

Set up with contextatlas setup:local --mode cli-skill.

Useful for:

  • custom agent skills
  • shell workflows and CI scripts
  • local debugging and retrieval analysis

Example:

bash
# retrieval
contextatlas search --repo-path /path/to/repo --information-request "Where is the payment retry policy implemented?"

# project memory
contextatlas memory:find "search"
contextatlas decision:list

# health
contextatlas health:full

2. As an MCP server

Set up with contextatlas setup:local --mode mcp.

Use contextatlas setup:local --mode mcp --toolset retrieval-only when the client should only see read-only retrieval, graph, contract, and memory-reader tools.

Useful for:

  • desktop clients that support MCP
  • agent systems that need standard tool-based access to ContextAtlas capabilities

Claude Desktop configuration example:

json
{
  "mcpServers": {
    "contextatlas": {
      "command": "contextatlas",
      "args": ["mcp"]
    }
  }
}

ContextAtlas MCP tools cover:

  • code retrieval
  • project memory
  • long-term memory
  • cross-project hub operations
  • auto-recording and memory suggestion flows

Architecture overview

text
Indexing:  Crawler / Scanner → Chunking → Indexing → Vector / SQLite Storage
Retrieval: Vector + FTS Recall → RRF → Rerank → Graph Expansion → Context Packing
Memory:    Project Memory / Long-term Memory / Hub → CLI / MCP Tools

ContextAtlas focuses on what context to provide, not how the task should be executed. For a fuller architecture explanation, see repository positioning and engineering positioning.

Documentation map

DocumentPurpose
2026-04-15 update summaryQuick health check, stale index cleanup, and git hook auto-maintenance
Docs indexUnified entry for stable docs, plans, changelog, and archived delivery material
2026-04-10 update summaryDefault-on graph context for codebase retrieval plus MCP/docs sync
First use guideFast onboarding path for the default contextatlas loop
2026-04-06 update summarySummary of the new main path, memory governance, operations, release gate, and team metrics
2026-04-07 update summarySummary of the seven indexing phases covering lightweight planning, snapshot copy reduction, health repair, observability, fallback hardening, storage trimming, and benchmarks
2026-04-09 update summarySummary of index planning thresholds, long-term memory table split, and delivery sync
Deployment guideInstallation, deployment patterns, MCP integration, operations
CLI referenceCLI commands, categories, and examples
MCP referenceMCP tools, parameters, and calling patterns
Project memory guideFeature Memory, Decision Record, and Catalog routing
Latest delivery bundleBundled handoff package for the latest verified delivery
Repository positioningRepository role, design thinking, and system boundaries
Engineering positioningWhere ContextAtlas fits in harness engineering
Product roadmapFuture versions and product direction

Contributing

Ways to improve ContextAtlas:

  • open issues for bugs or documentation gaps
  • submit PRs for retrieval, memory, monitoring, or documentation improvements
  • contribute real-world usage patterns, deployment notes, and benchmark data
  • improve README, CLI docs, and MCP examples

Before submitting code, it helps to:

  1. run pnpm build and make sure the repo still builds
  2. keep command examples, README, and docs aligned with the implementation
  3. update functionality, documentation, and operational notes together when possible

Development

bash
pnpm build
pnpm build:release
pnpm dev
node dist/index.js

Friendly links

https://linux.do/

License

MIT

Instalación

TypingMind
Requisitos:

Node.js 18+

{
  "mcpServers": {
    "codefromkarl-contextatlas": {
      "command": "npx",
      "args": [
        "-y",
        "@codefromkarl/context-atlas"
      ]
    }
  }
}

Usa el MCP de ContextAtlas con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado ContextAtlas, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade ContextAtlas como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de ContextAtlas.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "codefromkarl-contextatlas": {
      "command": "npx",
      "args": [
        "-y",
        "@codefromkarl/context-atlas"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de ContextAtlas y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de ContextAtlas.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar ContextAtlas para ayudarme con esta tarea?
ContextAtlas
Claro. Lo he leído.
Esto he encontrado usando ContextAtlas.

Preguntas frecuentes

¿Para qué sirve el servidor MCP ContextAtlas?

ContextAtlas es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP ContextAtlas con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar ContextAtlas con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de ContextAtlas con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con ContextAtlas conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP ContextAtlas a TypingMind?

ContextAtlas funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP ContextAtlas en TypingMind?

ContextAtlas ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP ContextAtlas?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si ContextAtlas requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇