# Lorebase

> Lorebase is an open-source MCP server for knowledge and memory. Lets agents read and change a governed, versioned Postgres knowledge graph. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, CLI
- **Website:** https://aantenore.github.io/lorebase/mcp/
- **Repository:** https://github.com/aantenore/lorebase/tree/HEAD/packages/herald
- **MCP Registry name:** io.github.aantenore/lorebase-herald
- **Categories:** knowledge and memory, databases
- **Listing updated:** 2026-11-14

## About

Herald is a thin stateless MCP layer over Lorebase's Keeper REST API. Every call goes to Keeper with the agent's own API key, so authorisation, masking, audit and rate limits stay in one place; Herald holds no database credentials and never calls a model. It exposes a small set of typed tools, two resources and one prompt.

Lorebase itself is an open-source ontology platform with git-like branching and three-way merge. Agents get a service principal with only needed grants, for instance a reader role plus one named write operation; the docs say never to give an agent an admin key.

Run it over stdio (one process per agent) or Streamable HTTP (one shared process). It retries after 429 and 503 up to twice and caps tool output at 12,000 characters by default. Install from PyPI or use the Docker compose profile. Licensed Apache-2.0.

## Features

- **Per-agent keys:** Calls carry the agent's own API key.
- **Governed writes:** Writes limited to named operations.
- **Two transports:** stdio or Streamable HTTP.
- **Output cap:** 12,000 characters by default.
- **Retries:** Resends after 429 or 503.

## Good for

- Let an agent read a supply-chain graph
- Allow one controlled write
- Share one Herald among agents
- Audit agent graph access

## Install

### Claude Code (Terminal)

```sh
claude mcp add lorebase-herald --env LOREBASE_URL='<LOREBASE_URL>' --env LOREBASE_API_KEY='<LOREBASE_API_KEY>' -- uvx lorebase-herald
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "lorebase-herald": {
      "command": "uvx",
      "args": [
        "lorebase-herald"
      ],
      "env": {
        "LOREBASE_URL": "<LOREBASE_URL>",
        "LOREBASE_API_KEY": "<LOREBASE_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "lorebase-herald": {
      "command": "uvx",
      "args": [
        "lorebase-herald"
      ],
      "env": {
        "LOREBASE_URL": "<LOREBASE_URL>",
        "LOREBASE_API_KEY": "<LOREBASE_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "lorebase-herald": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "lorebase-herald"
      ],
      "env": {
        "LOREBASE_URL": "<LOREBASE_URL>",
        "LOREBASE_API_KEY": "<LOREBASE_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "lorebase-herald": {
      "command": "uvx",
      "args": [
        "lorebase-herald"
      ],
      "env": {
        "LOREBASE_URL": "<LOREBASE_URL>",
        "LOREBASE_API_KEY": "<LOREBASE_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "lorebase-herald": {
      "command": "uvx",
      "args": [
        "lorebase-herald"
      ],
      "env": {
        "LOREBASE_URL": "<LOREBASE_URL>",
        "LOREBASE_API_KEY": "<LOREBASE_API_KEY>"
      }
    }
  }
}
```

## FAQ

### What does it need?

A running Keeper and LOREBASE_URL.

### Does it hold DB credentials?

No.

### Licence?

Apache-2.0.

### How should keys be scoped?

Service principal with minimal grants.

### Is Lorebase free?

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

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

Run this command in your terminal: claude mcp add lorebase-herald --env LOREBASE_URL='<LOREBASE_URL>' --env LOREBASE_API_KEY='<LOREBASE_API_KEY>' -- uvx lorebase-herald

### What are the best alternatives to Lorebase?

The closest alternatives to Lorebase are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and Midplane.

## 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.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [MedXpert 图书馆连接器（通用版）](https://ai-powered.com/mcp/medxpert): MedXpert 图书馆连接器（通用版） is an open-source MCP server for knowledge and memory.
- [Context Nest](https://ai-powered.com/mcp/context-nest): Context Nest is a freemium MCP server for knowledge and memory.

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