Engraphy logo

Engraphy

Self-hosted MCP memory server using a typed Postgres knowledge graph with pgvector, hybrid retrieval, and database-enforced isolation.

Install Engraphy

Run the project’s own setup commands, in order.

Setup steps from the project

Engraphy installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Configure
    cp deploy/.env.example .env   # then edit, or:
    
  2. 2. Start the server
    docker compose up -d          # the embedding model ships baked into the image
    
  3. 3. Configure
    docker compose --profile admin run --rm admin \
      engraphy-admin space create --id personal --display-name "My Memory" --principal me
    
  4. 4. Configure
    docker compose --profile admin run --rm admin \
      engraphy-admin pack apply packs/starter/pack.yaml --space personal
    
  5. 5. Sign in
    docker compose --profile admin run --rm admin \
      engraphy-admin token create --space personal --principal me \
        --client-name my-editor --role readwrite
    
  6. 6. Start the server
    ./up.sh          # writes .env with random passwords, starts the stack,
    

Overview

Engraphy MCP server gives AI agents associative memory through a typed knowledge graph stored in Postgres 16 with pgvector. It exposes MCP tools over HTTP, using bearer-token authentication, hybrid semantic and lexical search, graph traversal, and write-time duplicate handling. Packs define node types, edge rules, attributes, and briefing sections for each space. Reach for it when memory must persist across sessions, support multiple principals, and remain queryable as the dataset grows.

Use cases

  • Store durable agent memories across sessions
  • Search facts with semantic and lexical retrieval
  • Route memories into application-defined scopes
  • Traverse relationships between stored entities
  • Review and resolve uncertain duplicate writes

Key features

  • Typed knowledge graph on Postgres 16 and pgvector
  • Write-time deduplication with pending duplicate verdicts
  • Hybrid vector and PostgreSQL full-text search
  • Database-enforced isolation with Row-Level Security
  • Pack-defined schemas, scopes, and briefings
  • HTTP MCP access with bearer-token authentication

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 60d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit9d agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Engraphy works

What Engraphy MCP server does

Engraphy MCP server stores agent memory as a typed graph rather than a flat collection of text records. Nodes can represent facts, decisions, people, events, and other application-defined types. Typed edges connect related nodes, while packs declare the permitted types, attributes, and relationships for each space.

Writes are checked against existing memory before they are committed. Near-duplicate content can be merged, a new but related fact can be stored and linked, and uncertain matches can be returned as pending duplicate decisions. The write response includes a resonance report describing the memory it affected. Existing records are not silently overwritten, and the design keeps historical relationships walkable.

How it works

The server runs with FastMCP and stores graph data in Postgres 16 with the pgvector extension. An embedding model, nomic-embed-text-v1.5, supports vector comparison. Retrieval combines cosine-based vector search with PostgreSQL full-text search using Reciprocal Rank Fusion. Values held in typed attributes are included in the searchable surface.

Clients connect over HTTP and send a bearer token. Reads and writes run under the caller’s identity. Postgres Row-Level Security separates spaces and principals, with the application connecting through a role configured not to bypass those policies. A client can search, fetch nodes, follow edges, or request a pack-defined briefing while seeing only granted scopes.

A pack also supplies descriptions for scopes. The scope_guide tool exposes those descriptions so an agent can select an appropriate destination before writing. This lets one server support different memory shapes across spaces instead of imposing one fixed schema.

Setup and configuration

The supported quickstart uses Docker Compose. Copy deploy/.env.example to .env, set POSTGRES_PASSWORD and ENGRAPHY_APP_ROLE_PASSWORD, then start the stack. The cloud profile starts Postgres, runs migrations, provisions the application role, and launches the server. The embedding model is included in the image.

After startup, use the admin container to create a space, apply a pack, and mint a read-write client token. The default endpoint is 127.0.0.1:8000; a TLS-terminating reverse proxy is needed when exposing it externally. The token is printed once, while only its SHA-256 hash is stored by the server.

The repository also provides up.sh and provision.sh, with PowerShell equivalents. They wait for /healthz, preserve an existing .env, and skip already completed space or pack setup. Configuration can change the pack, host port, health-check timeout, space, principal, and client name. A local setup without Docker is documented separately in the repository.

Tools and capabilities

Engraphy MCP server exposes tools for:

  • Writing, searching, fetching, and traversing memory nodes.
  • Linking, updating, superseding, and resolving duplicate decisions.
  • Listing and creating scopes, plus retrieving scope-routing guidance.
  • Requesting pack-defined briefings.
  • Reviewing pending writes, capture inbox items, and usage statistics.
  • Managing space members, tokens, grants, and visibility through administration tools.

The search tool can operate within one scope or across all accessible scopes. traverse performs recursive graph walks from a starting node, while get returns complete node data with edge summaries.

Limitations and notes

Engraphy MCP server is self-hosted and requires Postgres 16 with pgvector, application credentials, and an embedding model supplied by the deployment image or local setup. Its database isolation depends on connecting through the configured non-superuser role. The project is source-available under Business Source License 1.1: production use for a product is permitted, but offering Engraphy itself as a hosted or managed service to third parties is reserved to the licensor until the stated change date, when the license converts to Apache-2.0.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Engraphy

Engraphy is an MCP server that connects AI agents to a self-hosted typed knowledge graph on Postgres 16 with pgvector. Its main tools write and deduplicate memories, search them with hybrid semantic and lexical retrieval, traverse relationships, retrieve briefings, manage scopes, and administer spaces, tokens, and grants.

Install it with the repository’s Docker Compose quickstart. Configure `.env` with the Postgres and application-role passwords, run `docker compose up -d`, then create a space, apply a pack, and mint a client token with the admin profile. The repository also documents a local no-Docker setup.

Engraphy embeds each write and compares it with existing memory before committing. Near-verbatim restatements can merge, related but distinct facts remain separate and receive links, and borderline matches become pending duplicate decisions for the caller to resolve.

Yes, Engraphy supports multiple spaces and principals with isolation enforced by PostgreSQL Row-Level Security. Reads and writes run under the caller’s identity, and access is limited to scopes granted to that principal.

MCP clients connect to Engraphy over HTTP using a bearer token. The default local endpoint is `127.0.0.1:8000`; after provisioning, paste the generated client settings and token into an MCP-compatible client.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewEngraphy AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/engraphy?style=directory)](https://allmcps.com/mcp/engraphy)
HTML Embed
<a href="https://allmcps.com/mcp/engraphy"><img src="https://allmcps.com/api/badge/engraphy?style=directory" alt="Engraphy on AllMCPs" /></a>