Skip to content
Conduit

mcp server

infinity-context

Reliable memory and context infrastructure for AI coding agents: source-backed facts, review-gated learning, MCP/SDK/UI, and replaceable Qdrant/Graphiti retrieval.

777genius/infinity-contextcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "infinity-context": {
      "command": "uvx",
      "args": [
        "infinity-context"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 21, 2026

Infinity Context

Self-hosted memory for AI teams that keeps current project knowledge source-backed, scoped, and reviewable.

Infinity Context gives agents and applications durable project memory without treating every chat fragment or retrieval result as permanent truth. Postgres owns canonical lifecycle state; optional retrieval systems help find candidates but do not decide what is current or visible.

It is available through HTTP, a Python SDK, MCP, CLI, and a local UI for shared project knowledge as well as team, project, and thread-scoped memory.

Contents

Why Infinity Context

Teams need more than semantically similar notes. They need a shared memory layer where a decision can be traced to its source, updated when the project changes, and recalled only in the right context.

  • Current knowledge, not a history dump. Facts have lifecycle state, versions, source references, and visibility rules in Postgres.
  • Source-backed and reviewable. Agents can submit suggestions for review instead of silently promoting every generated conclusion to durable memory.
  • Scoped for real work. Spaces, memory scopes, and threads separate projects, workstreams, and sessions.
  • Retrieval is not authority. Optional Qdrant and Graphiti indexes return candidates that are rehydrated from canonical state before prompt rendering.
  • Prompt memory is evidence. Retrieved material includes citations and provenance rather than being phrased as instructions for a model to follow.

A typical team loop is simple: capture a decision with its evidence, propose a change when the decision evolves, and retrieve only the current scoped context before a new task. That makes the memory useful to people reviewing work as well as agents continuing it.

How it works

flowchart LR
    A["Agents and apps"] --> B["HTTP / SDK / MCP / CLI / UI"]
    B --> C["Application use cases"]
    C --> P[("Postgres<br/>canonical current truth")]
    P -->|"when async work is needed"| O["Transactional outbox"]
    O --> W["Projection and extraction workers"]
    W --> Q["Qdrant<br/>optional derived retrieval index"]
    W --> G["Graphiti<br/>optional current-state graph projection"]
    Q -. "candidate IDs" .-> C
    G -. "candidate IDs" .-> C
    C -. "hydrate and revalidate" .-> P
    C --> E["Final prompt context<br/>cited evidence, not instructions"]

Canonical mutations commit their lifecycle records first. When derived or extraction work is required, the same transaction also records an outbox event. Workers update enabled projections asynchronously. During search or context assembly, candidate IDs are rehydrated from Postgres and revalidated for lifecycle, scope, and visibility before they can appear in a cited evidence block.

Architecture and trust model

Infinity Context applies Clean Architecture, SOLID, simple DDD, and ports-and-adapters boundaries:

  • Postgres owns the canonical lifecycle; Qdrant and Graphiti are optional, derived indexes.
  • The infinity_context_core package cannot import FastAPI, SQLAlchemy, Qdrant, Graphiti, OpenAI, or client application code.
  • Adapters provide delivery and infrastructure details without becoming the source of truth.

Read the architecture and trust model for write and read flows, package ownership, consistency behavior, and security limits.

Quickstart

The recommended installer sets up the complete local stack, connects your coding agent, enables review-gated memory suggestions, and opens the UI.

Requirements: Git, Python 3.11 or later, and Docker with Compose.

curl -fsSLo infinity-context-install.sh \
  https://raw.githubusercontent.com/777genius/infinity-context/v0.1.0/scripts/install.sh
bash infinity-context-install.sh --agent codex

Persistence warning: v0.1.0 does not declare a named Postgres volume. Back up canonical Postgres data before docker compose down, container recreation, reset, or upgrade. The persistence fix currently exists on main and will reach installers in the next release.

Replace codex with claude, gemini, opencode, or cursor. Repeat --agent to connect several agents, or use --all-agents. The installer reports whether every requested integration was confirmed instead of claiming success when manual setup is still required.

After a successful start, the browser opens the local memory UI. Automatic capture creates suggestions for review; it does not silently promote them to durable memory.

Other installation options

Install only the CLI, SDK, and MCP server for an existing deployment:

pipx install 'infinity-context[mcp]==0.1.0'
infinity-context --version

Pull the versioned multi-architecture server image:

docker pull ghcr.io/777genius/infinity-context:0.1.0

Contributors can install from source:

git clone https://github.com/777genius/infinity-context.git
cd infinity-context
python3 -m venv .venv
.venv/bin/python -m pip install -e '.[mcp]'
.venv/bin/infinity-context quickstart --agent codex --open-ui

Use --no-install-agents if you only want generated MCP configuration, or --retrieve-only to keep recall while disabling automatic capture creation.

ProfileIntended local setup
litePostgres, the server, and workers with optional provider adapters disabled
fullAdds Qdrant and Neo4j-backed graph services; enabled provider features need their own configuration

The public installation guide and self-hosted deployment guide cover first-run and operational details.

Integration entry points

Entry pointUse it when
HTTP APIAn application needs canonical memory and context endpoints
Python SDKA Python service needs typed HTTP client calls
MCPA coding agent or MCP client needs memory tools and evidence resources
CLIA developer is starting, configuring, or inspecting a local instance
Local UIA person wants to browse evidence and review suggestions locally

The MCP adapter guide explains the agent-facing boundary. Retrieved memory is evidence to inspect, not an instruction source.

Capability positioning

This source-audited, project-weighted architecture assessment is dated 2026-08-05. It is not a matched performance benchmark, and there is no universal winner. Under its explicit trust-weighted coding-agent rubric, Infinity Context is the strongest fit for governed current-state project memory.

The same published rubric was applied to every system, with no Infinity-specific bonus. Popularity, company size, and managed-only features were excluded. A separate source-check review pass verified claims against pinned public code, documentation, and current issues. Readers can inspect the method and sources and recalculate the assessment. Scores are architecture-fit scores out of 100, not performance measurements; estimated uncertainty is plus or minus three points, and differences within three points place products in the same technical class.

RankProductResearch score / 100Leads inBest fit
1Infinity Context93.9Governed current state: canonical versions, provenance, scoped visibility, review-gated promotion, and revalidated derived hitsTeams sharing changing project knowledge across agents and apps
2Hindsight91.5Cognitive memory: evidence-grounded observations, maintained mental models, broad recall, and reflectionAgents that learn from accumulated experience
3OpenViking90.7Unified coding-agent context across memories, resources, and skillsAgents that need one browsable project-context layer
4MemOS86.2Broad Memory OS building blocks, MemCubes, routing, and schedulersProducts experimenting with multiple memory forms and providers
5MatrixOrigin Memoria84.5Memory branches, snapshots, diffs, merges, and rollbackWorkflows that need recoverable alternative memory states
6MemMachine84.3Source-linked episodic memory and conversational recallAssistants that must point back to source conversations
7Honcho83.9Peer and user modeling with explicit and inferred conclusionsAssistants that reason about a person's evolving model
8EverOS83.1Markdown-first local memory with transparent files and derived indexesDevelopers who want readable, Git-friendly local memory
9Memora80.1Lightweight local MCP memory with lineage and graph interactionIndividual developers wanting inspectable local workflows
10Mem0 OSS74.4Portable memory SDK and integrationsProducts that own their lifecycle policy and need quick integration

Where Infinity Context stands out. Vector and graph search can find a candidate. Only current, visible Postgres state can enter the prompt. A transactional outbox drives derived projections; every hit is rechecked against canonical scope, version, and deletion rules, then rendered as cited evidence rather than an instruction. That directly reduces the chance that an agent acts on stale, out-of-scope, or silently invented project state.

See the detailed agent memory capability comparison for lifecycle, retrieval, temporal behavior, review, isolation, deployment, and scenario tradeoffs.

Memory evaluation snapshot

Recorded on 2026-10-14, using diagnostic measurements from 2026-10-13. The measured baseline includes PR #75 at commit c238bc9f84f80a7effe83140825ab3a6e576719b. The table reproduced exactly on 2026-10-18 when the frozen diagnostic inputs were re-measured against PR #76.

Diagnostic setQuestions with all required sources in the contextRequired sources covered
Frozen 100 questions93/100 (93.0%)206/216
Separate frozen 48 questions39/48 (81.3%)92/104

Updated on 2026-10-18 after PR 78: the table is the same frozen input set re-measured with the packer's union-preserving source displacement, which moved full-source coverage from 90/100 (201/216) and 38/48 (90/104) to the numbers above without regressing any previously covered question; required-source coverage is still one source short of the 207/216 target.

These results measure source coverage, not LLM answer accuracy. Both sets have now been used for diagnosis; the 48-question set is no longer an untouched holdout. They are not a full LongMemEval result, a production qualification, or a matched comparison with competing memory systems; broader qualification still needs a fresh holdout.

An end-to-end answer-quality measurement (2026-10-20, PR 79) closes that gap with a paired ablation on both frozen sets: every question was answered twice — once with the real packed context and once with an empty context — by one answerer model per set (Qwen3.8-Flash on the frozen 100, gpt-5.6-terra on the held-48 after a provider outage switched the answerer), and a blind judge graded each answer against the official gold answer. The memory context turned 36/100 vs 0/100 (frozen 100) and 18/48 vs 0/48 (held-48) correct: every gain came from memory, none of the questions with incomplete source coverage could be answered, and the empty-context arm never guessed anything right. The paired design measures LongMemEval memorization directly: on these sets the empty-context arm answered nothing, so every correct answer came from the retrieved memory. Details and caveats: docs/quality-analysis/answer-quality-paired-eval-r1.md.

Updated on 2026-10-21 (PR 80, PR 81, PR 82 merged): a snippet-windowing fix keeps facts that continue just past the focused window visible in the packed context — on rebuilt item texts, questions whose gold evidence became visible went 56 to 59 of 100 with no previously visible question regressing; the frozen coverage table above is unchanged because it packs precomputed frozen items. A paired answer test of the newly visible cases found 0 answer-level conversions, consistent with the rest of the diagnosis: the dominant remaining failures are answers the model fails to extract from visible evidence (42 of 94 residual failures) and facts fragmented across chunks (29 of 94), not retrieval gaps. The full failure-vein map, the measured dead-ends, and the replay probes that produced these numbers are in docs/quality-analysis/answer-failure-vein-map-r1.md.

The citation remediation is PR #76: quote previews and query-snippet diagnostics now quote the verbatim chunk body instead of retrieval metadata, and snippet offsets map to source coordinates. Focused citation and hydration checks, the provider-consistency and context-sweep suites, and full CI pass. On the same seeded LongMemEval corpus the real ASGI /v1/context path returned HTTP 200 before and after: 18 of 19 selected items kept identical text and scores with corrected citations, one near-tie item (0.7982 vs 0.7975) swapped at the token-budget margin, and quote previews embedding retrieval hints dropped from 2 selected items to 0. Two independent review passes approved after two review findings were fixed. The frozen-148 rerun on 2026-10-18 found packed items, scores, and source sets bit-identical before and after and the coverage table unchanged — no recall gain and no recall regression. Answer-quality impact remains unmeasured.

Status and limitations

Infinity Context is v0.1 and under active development. APIs, CLI behavior, and deployment details may evolve.

  • Postgres is the canonical lifecycle store. Qdrant is the primary derived vector projection. The Graphiti adapter is a narrower current-state projection: updates remove the prior episode before adding the new one, and the adapter does not expose Graphiti's complete source-reference, ontology, or version-history surface.
  • Canonical visibility updates take effect before asynchronous derived-index cleanup. A stale derived hit is rechecked before rendering.
  • Cognee is disabled by default and currently provides a recall-oriented boundary without complete ingest, update, or exact-forget lifecycle support.
  • The current main branch contains provider-neutral cognitive candidate types and derivation policy for experiences, observations, lessons, and mental models. The foundation itself is not included in v0.1.0. Main still has no cognitive persistence, public API, runtime composition wiring, deployment dependency, or live adapter; cognitive memory is not part of the active runtime shown above.
  • Retrieval includes deterministic prepasses shaped by the current evaluation domains. This is not ground-truth leakage, but broader transfer quality still needs independent evidence.
  • Current load and chaos tests exercise lifecycle and consistency on a limited corpus; they do not prove behavior at 100,000+ memories or across dozens of concurrent agents.
  • Review and canonical revalidation reduce memory-poisoning exposure, but they are not a proof of safety against sleeper-memory attacks.
  • Source references prove provenance, not truth. Review and domain judgment remain necessary.
  • Evaluate deployment, access control, backups, and operational fit for your environment before relying on any self-hosted configuration.

Documentation

↑↓ navigate openesc close