Ogham

v1.0.0Knowledge & Memorystable

Persistent shared memory for AI agents. Hybrid search (pgvector + tsvector), knowledge graph, cognitive scoring, and 16-language temporal extraction. 97.2% Recall@10 on LongMemEval with one PostgreSQL query. Works across Claude Code, Cursor, Codex, O

agent-memoryai-memoryclaudecodexllm
Share:
105
Stars
0
Downloads
0
Weekly
0/5

What is Ogham?

Ogham is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to persistent shared memory for ai agents. hybrid search (pgvector + tsvector), knowledge graph, cognitive scoring, and 16-language temporal extraction. 97.2% recall@10 on longmemeval with one postgresql...

Persistent shared memory for AI agents. Hybrid search (pgvector + tsvector), knowledge graph, cognitive scoring, and 16-language temporal extraction. 97.2% Recall@10 on LongMemEval with one PostgreSQL query. Works across Claude Code, Cursor, Codex, O

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Persistent shared memory for AI agents. Hybrid search (pgvec

Use Cases

Persistent agent memory
Hybrid vector and text search
Temporal knowledge extraction
ogham-mcp

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx ogham

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Ogham

Ogham is a persistent shared memory system for AI agents, backed by PostgreSQL with pgvector and tsvector for hybrid semantic and full-text search. It achieves 97.2% Recall@10 on the LongMemEval benchmark with a single PostgreSQL query, and exposes a rich set of MCP tools for storing, updating, searching, and synthesising memories across sessions and agents. Beyond basic storage, Ogham includes a knowledge graph layer, cognitive scoring to surface the most relevant memories, a wiki compiler that synthesises tagged memories into structured pages, and temporal extraction in 16 languages. It works with Claude Code, Cursor, Codex, and any MCP-compatible client.

Prerequisites

  • Python 3.10 or later and uvx (from the uv package manager) installed
  • A PostgreSQL database with the pgvector extension enabled — Supabase (free tier works) or a self-hosted Postgres instance, or a Neon database
  • An embedding provider and its API key: Ollama (local, free), OpenAI (OPENAI_API_KEY), Mistral (MISTRAL_API_KEY), Voyage (VOYAGE_API_KEY), or Gemini (GEMINI_API_KEY)
  • SUPABASE_URL and SUPABASE_KEY (if using Supabase) or DATABASE_URL (if using self-hosted Postgres)
  • An MCP-compatible client: Claude Code, Cursor, Codex, or Claude Desktop
1

Run the Ogham setup wizard

The init command walks you through database selection, embedding provider choice, and writes a ready-to-use MCP config block. For Postgres/Neon, include the postgres extra.

# Supabase (default)
uvx --from ogham-mcp ogham init

# PostgreSQL / Neon
uvx --from 'ogham-mcp[postgres]' ogham init
2

Add the generated config to your MCP client

The setup wizard prints a JSON config block. Paste it into your claude_desktop_config.json or equivalent client config file. It will include all required environment variables.

{
  "mcpServers": {
    "ogham": {
      "command": "uvx",
      "args": ["--from", "ogham-mcp", "ogham", "serve"],
      "env": {
        "DATABASE_BACKEND": "supabase",
        "SUPABASE_URL": "https://yourproject.supabase.co",
        "SUPABASE_KEY": "your-service-role-key",
        "EMBEDDING_PROVIDER": "openai",
        "OPENAI_API_KEY": "your-openai-api-key"
      }
    }
  }
}
3

Restart your MCP client

Save the configuration and restart your client to load Ogham. On first start it will create the necessary database schema automatically.

4

Store your first memory

Ask the AI to remember something. Ogham captures it with semantic embeddings, timestamps, and optional tags for later retrieval.

5

Run a hybrid search

Retrieve memories using natural language queries. Ogham combines vector similarity and full-text search via Reciprocal Rank Fusion for high-recall results.

6

(Optional) Run in SSE multi-agent mode

For scenarios where multiple agents share the same memory store, start Ogham as a persistent SSE server and point all clients at the URL.

ogham serve --transport sse --port 8742
# Client config: use "url": "http://127.0.0.1:8742/sse" instead of command/args

Ogham Examples

Client configuration

claude_desktop_config.json entry for Ogham with Supabase backend and OpenAI embeddings.

{
  "mcpServers": {
    "ogham": {
      "command": "uvx",
      "args": ["--from", "ogham-mcp", "ogham", "serve"],
      "env": {
        "DATABASE_BACKEND": "supabase",
        "SUPABASE_URL": "https://yourproject.supabase.co",
        "SUPABASE_KEY": "your-service-role-key",
        "EMBEDDING_PROVIDER": "openai",
        "OPENAI_API_KEY": "sk-your-openai-key",
        "DEFAULT_PROFILE": "default"
      }
    }
  }
}

Prompts to try

These prompts exercise memory storage, hybrid search, and knowledge synthesis.

- "Remember that we chose PostgreSQL over MongoDB because of ACID guarantees"
- "Search my memories for anything related to deployment errors in production"
- "What do you remember about our API rate limiting decisions?"
- "Compile a wiki page summarising all my architecture decisions"
- "Find memories tagged 'security' from the last 30 days"
- "Store the fact that the staging environment URL is https://staging.myapp.dev"

Troubleshooting Ogham

uvx command not found

Install uv with curl -LsSf https://astral.sh/uv/install.sh | sh (macOS/Linux) or pip install uv, then open a new terminal. uvx is bundled with uv.

Database connection fails or pgvector extension missing

For Supabase: enable the pgvector extension from the Supabase dashboard under Database > Extensions. For self-hosted Postgres: run CREATE EXTENSION IF NOT EXISTS vector; as a superuser before starting Ogham.

Hybrid search returns no results despite stored memories

Check that EMBEDDING_PROVIDER and the corresponding API key match what was used during init. Switching embedding providers without re-embedding existing data will break similarity search. Run the re_embed_all tool to regenerate embeddings after changing providers.

Frequently Asked Questions about Ogham

What is Ogham?

Ogham is a Model Context Protocol (MCP) server that persistent shared memory for ai agents. hybrid search (pgvector + tsvector), knowledge graph, cognitive scoring, and 16-language temporal extraction. 97.2% recall@10 on longmemeval with one postgresql query. works across claude code, cursor, codex, o It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Ogham?

Follow the installation instructions on the Ogham GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Ogham?

Ogham works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Ogham free to use?

Yes, Ogham is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ogham": { "command": "npx", "args": ["-y", "ogham"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Ogham?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides