Self-hostable MCP memory server with a knowledge graph

Self-hostable MCP memory server with a knowledge graph

open-brain-server•bybobby-cell-commits

Open Brain is an MCP server that stores thoughts as an entity knowledge graph with pgvector-based semantic search and automated background maintenance.

License: MIT•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Exposes 17 MCP tools including semantic search, thought listing, statistics, capture, and graph traversal.
  • •Automatically links related thoughts by vector similarity and classifies typed relationships and named entities into a shared graph.
  • •Stores thoughts with embeddings, metadata, and connections in Postgres with pgvector.
  • •Runs automated background maintenance such as deduplication, theme tracking, decay, and synthesis.

BEST FOR

  • •Assistants that need persistent, semantic memory they can search by meaning.
  • •Getting AI-generated weekly reviews of themes, open loops, and connections.
  • •Users who want to own their memory data via self-hosting or managed Postgres.

ABOUT OPEN-BRAIN-SERVER

Self-hostable MCP memory server with a knowledge graph is cataloged as an MCP server attributed to bobby-cell-commits. Open Brain is an MCP server that stores thoughts as an entity knowledge graph with pgvector-based semantic search and automated background maintenance. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Self-hostable MCP memory server with a knowledge graph are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How are related thoughts connected?

Thoughts are linked by vector similarity, and connections above 0.80 are classified by an LLM into typed relationships such as extends, contradicts, is-evidence-for, and supersedes.

What background maintenance does Open Brain run?

It runs scheduled jobs including RSS ingestion, deduplication, theme tracking, decay, synthesis, and co-occurrence decay via GitHub Actions or a built-in cron container.

上游原版 README

在 GitHub 查看同一版本原文

README.md · a352b548d380 · 采集于 2026-11-13 10:17:55 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Open Brain

Graph-structured MCP memory. 37.2% on LongMemEval baseline — a benchmark most memory systems don't publish.

A self-hostable memory server for MCP clients (Claude, ChatGPT, any assistant that speaks MCP). Thoughts flow in from Telegram, pipelines, or direct capture, and land in a Newman-IDF weighted entity graph — not a flat document store. An automated Dream cycle runs in the background: deduplicating near-duplicates, tracking theme drift, synthesizing insights across clusters, and archiving stale content. 17 MCP tools. PostgreSQL + pgvector. You own your data.

How It Works

flowchart LR
    TG[Telegram Message] --> TGBot[telegram-bot\nEdge Function]
    MCP[AI Client\nClaude/ChatGPT] --> MCPServer[open-brain-mcp\nEdge Function]
    Pipeline[RSS/HF Papers/\nEmergent Mind] --> RunPipeline[run-pipeline\nEdge Function]
    TGBot --> OR1[OpenRouter\nEmbedding + Metadata]
    MCPServer --> OR2[OpenRouter\nEmbedding + Search]
    RunPipeline --> OR3[OpenRouter\nTriage + Embed]
    OR1 --> DB[(Postgres\n+ pgvector)]
    OR2 --> DB
    OR3 --> DB
    MCPServer --> DB
    TGBot --> TGReply[Telegram Reply\nwith Metadata]

Capture Path

When you send a message to the Telegram bot, the telegram-bot Edge Function picks it up via webhook. It sends the message to OpenRouter in parallel for two things: generating a vector embedding (a numerical representation of meaning) and extracting metadata like topics, people mentioned, action items, theme, quality score, and named entities. The thought is checked for semantic duplicates, stored in your database with auto-linked connections to related thoughts, and the bot replies with a summary of what it captured.

Pipeline Path

The run-pipeline Edge Function automatically ingests ideas from RSS feeds (AI newsletters), Hugging Face daily papers, and Emergent Mind (trending arXiv papers). Each item is triaged for relevance, embedded, deduplicated, and stored. Runs on a schedule via GitHub Actions (Supabase deployment) or a built-in cron container (Docker deployment).

Retrieval Path

Any AI client connected via MCP (Model Context Protocol) can search your thoughts by meaning using semantic search, browse by filters (type, topic, person, time), get aggregate statistics, or request a weekly review of themes. The open-brain-mcp Edge Function handles these requests, authenticated with your personal access key.

Knowledge Graph

Every thought is automatically linked to related thoughts via vector similarity. Connections above 0.80 similarity are classified by an LLM into typed relationships (extends, contradicts, is-evidence-for, supersedes). Named entities (people, tools, projects, organizations) are extracted and resolved into a shared entity graph. Co-occurrence edges track which thoughts are retrieved together over time, strengthening connections based on actual usage patterns.

Storage

Everything lives in Postgres with pgvector for fast similarity search. Thoughts are stored with their embeddings (1536-dimensional vectors), metadata, typed connections, and entity references. You can deploy on Supabase (managed hosting) or self-host with Docker Compose.

Deployment Options

Choose how you want to run Open Brain:

Supabase (hosted)Docker Compose (self-hosted)
SetupLink project + run scriptscp .env.example .env + ./start.sh
InfrastructureManaged by SupabaseRuns on your machine/server
SchedulingGitHub ActionsBuilt-in cron container
CostSupabase free tier + OpenRouterJust OpenRouter
GuideContinue belowDocker guide

Supabase Deployment

Prerequisites

  1. Supabase account -- Supabase is a hosted Postgres database with built-in APIs, authentication, and Edge Functions (serverless code). Create a free account at supabase.com. Create a new project -- you will need the project URL (looks like https://abcdef.supabase.co) and the service role key (a long string found under Settings > API).

  2. Supabase CLI -- The command-line tool for managing your Supabase project (applying database migrations, deploying functions, setting secrets).

    npm install -g supabase
    
  3. OpenRouter account -- OpenRouter routes requests to AI models. It is used here for generating embeddings (vector representations of your thoughts) and extracting metadata. Create an account at openrouter.ai and generate an API key from the dashboard.

  4. Telegram bot (recommended) -- The primary way to capture thoughts on the go. Create a bot via @BotFather on Telegram and run the setup script (see below). If you only want MCP access, you can skip this.

Quick Start

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/open_brain.git
cd open_brain
cd supabase
supabase link --project-ref YOUR_PROJECT_REF
cd ..

Tip: Your project ref is the subdomain in your Supabase URL. If your URL is https://abcdef.supabase.co, your project ref is abcdef.

3. Run bootstrap

./scripts/bootstrap.sh

Bootstrap walks you through setting up your environment. It prompts for each secret (Supabase URL, service role key, OpenRouter API key, Telegram tokens, etc.), generates a cryptographic MCP access key automatically, and writes everything to .env.local. If you already have a .env.local, it will show your existing values and let you update specific ones.

4. Run deploy

./scripts/deploy.sh

Deploy applies the database schema (creates the thoughts table with vector search indexes), uploads your secrets to Supabase, and deploys all Edge Functions. It shows a step-by-step checklist as each operation completes. At the end, it prints your MCP connection URL and a ready-to-paste Claude Code command.

5. Run validate

./scripts/validate.sh

Validate runs 8 checks against your live deployment to confirm everything works: database access, RPC functions, Edge Function reachability, authentication, thought capture, semantic search, and thought listing. It prints a checklist with pass/fail for each check and a final summary.

Set up Telegram bot (optional)

Create a bot via @BotFather on Telegram, then run the setup script:

./scripts/setup-telegram.sh YOUR_BOT_TOKEN

The script verifies your token, registers the webhook, sets up command autocomplete, and prints the env vars and secrets to configure. Follow the printed instructions to complete setup.

Connect Your AI Client

Once deployed, connect your AI client to start using Open Brain. You need two values:

  • MCP endpoint URL: https://YOUR_REF.supabase.co/functions/v1/open-brain-mcp/mcp (Supabase) or http://localhost:80/functions/v1/open-brain-mcp (Docker)
  • MCP access key: The key generated during setup (stored in .env.local or Docker .env)

Tip: The deploy script (Supabase) or start script (Docker) prints the exact connection command with your values filled in.

claude mcp add --transport http --header "x-brain-key: YOUR_MCP_KEY" open-brain https://YOUR_REF.supabase.co/functions/v1/open-brain-mcp/mcp

This registers Open Brain as an MCP server that Claude Code can use in any conversation. Replace YOUR_MCP_KEY and YOUR_REF with your actual values.

Claude Code (project .mcp.json)

Add this to a .mcp.json file in your project root to share the connection with your team:

{
  "mcpServers": {
    "open-brain": {
      "type": "http",
      "url": "https://YOUR_REF.supabase.co/functions/v1/open-brain-mcp/mcp",
      "headers": {
        "x-brain-key": "${MCP_ACCESS_KEY}"
      }
    }
  }
}

Note: The ${MCP_ACCESS_KEY} syntax uses environment variable expansion so your key stays out of version control. Set the MCP_ACCESS_KEY environment variable on each machine that uses this config.

Claude Desktop

Claude Desktop does not support remote MCP servers via configuration files. Instead:

  1. Open Claude Desktop > Settings > Connectors
  2. Click Add a new connector
  3. Enter the MCP endpoint URL: https://YOUR_REF.supabase.co/functions/v1/open-brain-mcp/mcp
  4. Configure the x-brain-key authentication header with your MCP access key

ChatGPT (Pro/Team/Enterprise/Edu)

  1. Go to Settings > Connectors > Advanced > Developer Mode
  2. Add the MCP server URL: https://YOUR_REF.supabase.co/functions/v1/open-brain-mcp/mcp
  3. Configure the x-brain-key authentication header with your MCP access key

Usage Examples

Telegram Capture

Send any message to your bot and Open Brain automatically processes it:

You: Just had a great meeting with Sarah about the Q3 product roadmap.
     She wants to prioritize the mobile app redesign.

Bot: Captured!
  Type: meeting_note
  Theme: personal
  Topics: q3-roadmap, mobile-app-redesign
  Quality: 0.7
  People: Sarah
  Action items: Prioritize mobile app redesign
  Why: Records a product strategy decision with clear ownership
  Related: "Product planning session notes..." (82% similar)

Every message is embedded as a vector, enriched with extracted metadata, checked for duplicates, auto-linked to related thoughts, and entities are resolved into a knowledge graph.

Ask any connected AI client to search your brain:

You: Search my brain for anything about product roadmap discussions

Claude: I found 3 relevant thoughts:
  1. (0.89 similarity) Meeting with Sarah about Q3 product roadmap...
  2. (0.82 similarity) Product planning session notes...
  3. (0.76 similarity) Quarterly goals discussion...

Semantic search finds thoughts by meaning -- even if you used different words. Asking about "product planning" will find thoughts about "roadmap discussions" because the meanings are similar.

Weekly Review

Get an AI-generated summary of your recent thinking:

You: Give me a weekly review of my recent thoughts

Claude: Here's your weekly review:
  Themes: Product planning, team meetings, technical architecture
  Open loops: Mobile redesign decision pending, API migration timeline
  Connections: Sarah mentioned in 3 meetings this week, all about mobile

The weekly review analyzes the past 7 days of thoughts and synthesizes themes, open loops, connections between ideas, and gaps in your thinking.

Available Tools

ToolDescription
search_thoughtsSemantic search with optional graph expansion (1-hop traversal)
list_thoughtsBrowse thoughts filtered by type, topic, person, theme, quality, time
thought_statsAggregate statistics: counts, type/theme breakdown, top topics/people
capture_thoughtSave a new thought from any AI client (with auto-embedding)
get_connectionsGraph traversal from a thought (typed links: extends, contradicts, etc.)
list_entitiesBrowse extracted entities (people, tools, projects, orgs) by frequency
weekly_reviewAI-generated summary of themes, open loops, and next steps
analyzeGraph analysis: hubs, density, sources, co-occurrence, themes
dedup_reviewDuplicate candidates with similarity zone histogram
refresh_salienceRecompute all salience scores
update_thoughtRewrite content (re-embeds, re-extracts metadata)
delete_thoughtPermanent delete (cascades connections)
serendipity_digestResurface forgotten high-quality thoughts
pipelinePipeline monitoring: health status, run history, merge audit
review_staleReview and act on stale thought candidates
migration_guideInstructions for importing memories from other platforms

See docs/cookbook.md for detailed usage patterns, tool compositions, and non-obvious behaviors.

Skills (Claude Code Workflows)

Open Brain includes Claude Code skills -- structured multi-phase workflows that compose the MCP tools above into higher-level analysis. Skills are auto-discovered from .claude/skills/ and invoked as slash commands.

SkillWhat it does
/discoverIncremental pattern discovery across recent thoughts. Builds on previous reports (EVOLVED/NEW/STALE classification), dispatches parallel research agents, correlates with project priorities.
/pulsePipeline and data health report. 9 parallel MCP calls, rubric-scored (GREEN/YELLOW/RED), cross-run memory for tracking findings over time, 6 cross-metric pattern detectors.
/brain-healthKnowledge graph health report. 12 parallel MCP calls covering theme attention, graph density, hub health, co-occurrence alignment, dedup pressure, synthesis output, and entity landscape.

See docs/skills/README.md for detailed descriptions and usage.

Automated Maintenance

Open Brain runs background maintenance to keep the knowledge graph healthy. These jobs run automatically -- via GitHub Actions (Supabase deployment) or the built-in cron container (Docker deployment).

JobFrequencyPurpose
RSS/HF Papers/Emergent Mind ingestion2x dailyIngest ideas from configured sources
Pipeline monitoring2x dailyHealth checks with Telegram alerting on failures
Dream dedup2x dailyMerge near-duplicate thoughts (>0.92 similarity auto-merged, 0.85-0.92 LLM-confirmed)
Graph analysis cacheDailyPre-compute hub, density, and co-occurrence analysis
Dream themesWeeklyTrack theme velocity, lifecycle transitions (emerging/active/declining), centroid drift
Dream decayWeeklyArchive stale thoughts via tiered scoring + LLM confirmation
Dream synthesisWeeklyGenerate cross-cutting insights from thought clusters
Co-occurrence decayWeeklyDecay unused co-occurrence edges

GitHub Actions workflow files are included in docs/workflows/ as reference for customizing schedules.

Project Structure

open-brain-server/
  supabase/
    migrations/                   # Database migrations (applied with supabase db push)
    functions/
      _shared/                    # Shared modules (supabase-client, openrouter, types, errors, auto-link, entities, dream-*)
      telegram-bot/               # Telegram capture (primary capture path)
      open-brain-mcp/             # MCP server (17 tools)
        tools/                    # Individual tool implementations
      run-pipeline/               # Automated RSS/HF Papers/Emergent Mind ingestion
      monitor-pipeline/           # Pipeline health monitoring with Telegram alerts
      refresh-graph-analysis/     # Graph analysis cache computation
  docker/                         # Docker Compose self-hosting (6 services)
  pipeline/                       # Python-based local pipeline (Reddit, RSS, briefing)
  scripts/                        # Setup and deployment automation
  tests/                          # Integration tests
  docs/
    cookbook.md                    # MCP tool usage patterns and compositions
    skills/                       # Skill documentation
    workflows/                    # GitHub Actions reference (scheduling)
    writing-a-source.md           # Guide for adding pipeline sources
  .claude/
    skills/                       # Claude Code skills (auto-discovered)
      discover/                   # Incremental pattern discovery
      pulse/                      # Pipeline health report
      brain-health/               # Knowledge graph health report

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Self-hostable MCP memory server with a knowledge graph from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/open-brain-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent