# Coalent

Caches extracted facts for AI agents and RAG pipelines, updating entries automatically as underlying sources change.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 12
- Author: Vectorlink-Labs
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Vectorlink-Labs/coalent
- Updated: 2026-09-17
- HTML: https://affpapa.org/en/nevibecode/mcp/coalent

## What it does

Coalent acts as an intermediate caching layer above standard retrieval systems. Instead of storing raw document slices, it pulls atomic, verifiable statements tied to source origins. Requests match against stored meaning, which allows multiple agents to share context without running redundant completions. Multi-hop queries pull claims across distinct records without added LLM passes.

Cache units track source references. When an underlying file changes, Coalent invalidates only affected units rather than recomputing an entire knowledge structure. The v0.7 release adds a `repair(read_id)` routine that re-extracts omitted facts whenever an initial retrieval read comes up short.

The server expects `OPENAI_API_KEY` and `COALENT_MCP_TOKEN` in the environment. Without these values, launching the MCP runtime through `uvx` fails immediately.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `OPENAI_API_KEY`, `COALENT_MCP_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env OPENAI_API_KEY=<OPENAI_API_KEY> --env COALENT_MCP_TOKEN=<COALENT_MCP_TOKEN> --transport stdio coalent -- uvx coalent
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from coalent <command>

### Codex

**Platform CLI**
```bash
codex mcp add coalent --env OPENAI_API_KEY=<OPENAI_API_KEY> --env COALENT_MCP_TOKEN=<COALENT_MCP_TOKEN> -- uvx coalent
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from coalent <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "coalent": {
            "command": "uvx",
            "args": [
                "coalent"
            ],
            "env": {
                "OPENAI_API_KEY": "<OPENAI_API_KEY>",
                "COALENT_MCP_TOKEN": "<COALENT_MCP_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from coalent <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "coalent": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "coalent"
            ],
            "env": {
                "OPENAI_API_KEY": "<OPENAI_API_KEY>",
                "COALENT_MCP_TOKEN": "<COALENT_MCP_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from coalent <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e OPENAI_API_KEY=<OPENAI_API_KEY> -e COALENT_MCP_TOKEN=<COALENT_MCP_TOKEN> coalent uvx coalent
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from coalent <command>

## When to use it
- stop agents from re-reading static sources on every turn
- invalidate cached answers immediately when source files update
- gather multi-hop evidence across separate documents
- cut context token consumption during retrieval passes

## Example prompts
- Check our vacation policy using the Coalent cache
- Trigger source update for confluence:hr after the recent edit
- Run repair(read_id) to re-extract facts for the failed query

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
