# Keel

> Keel is an open-source MCP server for knowledge and memory. Per-customer bitemporal context graph from product events, read by agents in five tools. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted
- **Website:** https://angelkurten.github.io/keel/
- **Repository:** https://github.com/angelkurten/keel
- **MCP Registry name:** io.github.angelkurten/keel
- **Categories:** knowledge and memory, developer tools
- **Listing updated:** 2026-11-14

## About

Keel is meant for products that ship several AI agents and are tired of each one having its own data pipeline. You describe your domain once in a YAML cartridge of entities, events and rules; events arrive from Postgres CDC, an outbox, Kafka, SQS, webhooks or an SDK; and Keel builds one graph per tenant with no LLM in ingest, so replaying the same log yields the same graph.

Every fact records when it was true and when Keel learned it, so late events close facts rather than overwrite them, and reads accept `as_of` and `as_known_at`. Rules such as 'blocked' are evaluated in the graph, so the agent receives a verdict. The authors report 26 points higher accuracy on whole-project rule questions with this approach in their own benchmark, using fewer tokens.

The PyPI package `keel-context` runs over stdio and stores to memory, SQLite or MySQL via `KEEL_DB`; Postgres and DuckDB are also supported. Version 0.38.0 is labelled alpha.

## Features

- **Cartridges:** Declare entities, events, rules and memory policy in YAML.
- **Bitemporal facts:** Tracks valid time and recorded time for every fact.
- **Rules evaluated in-graph:** Agents receive verdicts like 'blocked' instead of deriving them.
- **Deterministic ingest:** No LLM in ingest; replay gives the same graph.
- **Provenance:** Source, evidence and corrections travel with each fact.
- **Multiple stores:** In-memory, SQLite, MySQL, Postgres or DuckDB.

## Good for

- Give several in-product agents one shared view of a customer
- Ask what was true for a tenant at a past date
- Audit what another agent knew when it decided
- Ingest Postgres changes as events
- Record agent conclusions with evidence and scope

## Install

### Claude Code (Terminal)

```sh
claude mcp add keel -- uvx keel-context
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "keel": {
      "command": "uvx",
      "args": [
        "keel-context"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "keel": {
      "command": "uvx",
      "args": [
        "keel-context"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "keel": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "keel-context"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "keel": {
      "command": "uvx",
      "args": [
        "keel-context"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "keel": {
      "command": "uvx",
      "args": [
        "keel-context"
      ]
    }
  }
}
```

## Tools

- `context`: Returns what is known about a subject now or at a past moment, with facts, relations and rule verdicts.
- `history`: Shows how a subject changed over time and when it was learned.
- `search`: Finds subjects by text, kind, rule, attribute value or meaning.
- `related`: Returns connected subjects up to three hops away.
- `annotate`: Records a conclusion by an agent or person with evidence and scope.

## FAQ

### What are the five tools?

context, history, search, related and annotate; an optional read-only SQL `query` tool is off by default.

### What licence?

Apache 2.0.

### What is its maturity?

Version 0.38.0, labelled alpha.

### Can I use it without MCP?

Yes, through an HTTP JSON API and SDKs for TypeScript, Python, Go and PHP.

### Is Keel free?

Yes. Keel is open source, so you can use and self-host it for free.

### How do I add Keel to Claude Code?

Run this command in your terminal: claude mcp add keel -- uvx keel-context

### What are the best alternatives to Keel?

The closest alternatives to Keel are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/keel-4
