# Keephaven MCP

> Keephaven MCP is an open-source MCP server for knowledge and memory. Long-term agent memory stored on your own Keephaven home server. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/dafarusd/keephaven-mcp
- **MCP Registry name:** io.github.dafarusd/keephaven-mcp
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-18

## About

Where most memory servers keep notes with a vendor, this one writes them to a Keephaven box on your home network. Each agent gets its own folder, so one agent cannot see another's files, and you issue its token under Settings > Agents. The box keeps only a fingerprint of the token, and revoking it cuts the agent off immediately while its files stay until you delete them.

Alongside plain files there is an append-only journal the agent can add to but never edit or delete. Writes can use an etag check so two sessions do not overwrite each other, and you can set a size limit per agent or make one read-only.

The machine running the agent must reach the box over the same network, its Wi-Fi or Tailscale. The README is frank about gaps: tokens travel over plain HTTP on the home network, and backup between two real boxes is not yet tested. A single Python file lets you try it without hardware.

## Features

- **Per-agent folders:** Each agent sees only its own files.
- **Append-only journal:** The agent can add entries but never edit or delete them.
- **Etag-checked writes:** Stops two sessions from overwriting each other.
- **Quotas and read-only:** Cap an agent's size or make it read-only.
- **Instant revoke:** Revoking a token cuts the agent off at once.

## Good for

- Give Claude Code a memory that stays on your own hardware
- Keep a journal an agent cannot rewrite
- Share notes across sessions without a cloud service
- Trial the setup locally with the bundled Python file

## Install

### Claude Code (Terminal)

```sh
claude mcp add keephaven-mcp --env KEEPHAVEN_URL='<KEEPHAVEN_URL>' --env KEEPHAVEN_TOKEN='<KEEPHAVEN_TOKEN>' -- npx -y @dafarusd/keephaven-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "keephaven-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dafarusd/keephaven-mcp"
      ],
      "env": {
        "KEEPHAVEN_URL": "<KEEPHAVEN_URL>",
        "KEEPHAVEN_TOKEN": "<KEEPHAVEN_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "keephaven-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dafarusd/keephaven-mcp"
      ],
      "env": {
        "KEEPHAVEN_URL": "<KEEPHAVEN_URL>",
        "KEEPHAVEN_TOKEN": "<KEEPHAVEN_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "keephaven-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dafarusd/keephaven-mcp"
      ],
      "env": {
        "KEEPHAVEN_URL": "<KEEPHAVEN_URL>",
        "KEEPHAVEN_TOKEN": "<KEEPHAVEN_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "keephaven-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dafarusd/keephaven-mcp"
      ],
      "env": {
        "KEEPHAVEN_URL": "<KEEPHAVEN_URL>",
        "KEEPHAVEN_TOKEN": "<KEEPHAVEN_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "keephaven-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dafarusd/keephaven-mcp"
      ],
      "env": {
        "KEEPHAVEN_URL": "<KEEPHAVEN_URL>",
        "KEEPHAVEN_TOKEN": "<KEEPHAVEN_TOKEN>"
      }
    }
  }
}
```

## Tools

- `memory_write`: Saves a file, with an optional etag check.
- `memory_read`: Reads a file back with its etag.
- `memory_list`: Lists files, optionally under a folder.
- `memory_search`: Case-insensitive search across files and the journal.
- `memory_delete`: Deletes a file.
- `journal_append`: Adds an entry to the append-only journal.
- `journal_read`: Reads recent journal entries, oldest first.
- `memory_status`: Shows the agent name, read-only state and quota used.

## FAQ

### Which clients work?

MCP clients that run local servers, such as Claude Desktop, Claude Code and Cursor.

### What does it need?

Node 20 or newer and a reachable Keephaven box, or the bundled Python file for a local trial.

### Is traffic encrypted?

Tokens travel over plain HTTP on the home network; over Tailscale they are encrypted.

### What licence is it?

MIT.

### Is Keephaven MCP free?

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

### How do I add Keephaven MCP to Claude Code?

Run this command in your terminal: claude mcp add keephaven-mcp --env KEEPHAVEN_URL='<KEEPHAVEN_URL>' --env KEEPHAVEN_TOKEN='<KEEPHAVEN_TOKEN>' -- npx -y @dafarusd/keephaven-mcp

### What are the best alternatives to Keephaven MCP?

The closest alternatives to Keephaven MCP are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and NeuroStack.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [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.
- [NeuroStack](https://ai-powered.com/mcp/neurostack): NeuroStack is a freemium MCP server for knowledge and memory.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [Digitalnz](https://ai-powered.com/mcp/digitalnz): Digitalnz is a freemium MCP server for knowledge and memory.
- [Notion_connect](https://ai-powered.com/mcp/notion-connect): Notion_connect is a freemium MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/keephaven-mcp
