Skip to content
MCP server

post-graph-rag-mcp MCP Server

Bi-temporal knowledge graph memory MCP server powered by post-graph-rag and PostgreSQL + pgvector.

post-graph-rag-mcp scores 48 (Fair), licensed Apache-2.0 and written in Python. It installs as a local process. It declares 16 tools. Filed under Databases, AI and memory. GitHub shows 13 stars. Package registries report about 31 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by crajahApache-2.0Python13 stars
Trust score
48Fair
Trust score 48 of 100, Fair

Fair trust

48 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: apache-2.0.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 48 comes from

0 + 20 + 4 + 10 + 4 + 10 = 48. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity4 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 4 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "crajah-post-graph-rag": {      "command": "uvx",      "args": [        "post-graph-rag-mcp"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools16Tool docs quality grade F

All capabilities

About

post-graph-rag

CI PyPI version License: Apache 2.0 Python 3.11+ PostgreSQL 16+

Graph RAG with a memory of time โ€” on the PostgreSQL you already run.

post-graph-rag extracts entities and relations with an LLM, stores them as a property graph beside pgvector embeddings, and answers questions by fusing vector similarity, graph traversal and full-text search. What makes it different: a later document can close an earlier fact, so your model stops reporting that someone is both an ally and a rival.

No separate vector store. No graph engine to operate. One database, one consistency model, one backup โ€” and transactions that span your graph and your application tables.

The graph layer underneath is post-graph, also usable on its own โ€” more below.

๐Ÿ“ˆ Benchmarks

Paper: arXiv:2608.24921.

LongMemEval: long-horizon chat memory

On the full 500-question LongMemEval set โ€” all six question types, nothing sampled โ€” against the numbers Zep publish for Graphiti (arXiv:2501.13956):

overallmulti-sessiontemporalknowledge-update
post-graph-rag ยท gemini-3.6-flash94.0%90.2%96.2%94.9%
Zep/Graphiti ยท gpt-4o71.2%57.9%62.4%83.3%
Zep/Graphiti ยท gpt-4o-mini63.8%40.6%36.5%76.9%
Full-context baseline ยท gpt-4o60.2%44.3%45.1%78.2%

Qualifications, so you can weigh them yourself: Zep judge with GPT-4o, this uses a three-model majority panel with the answering model excluded from its own jury; the generation models differ in cost class and vintage in a direction that cannot be signed; one question of 500 is excluded because neither extraction prompt could turn that session into triples. The harness, frozen config and every failing case ship in the repo โ€” see the full write-up, which also documents the improvements that were tested and rejected.

ECT-QA: the adversarial corpus

Chat memory is the easy register. ECT-QA is the hard one โ€” earnings call transcripts, sixteen quarters per company, every metric restated every quarter with only the date to tell the values apart. A store that merely accumulates cannot answer these at all; it has four values for "gross margin" and no way to choose.

Scored under the protocol ECT-QA's own authors use โ€” an LLM judge comparing element-wise, with a refusal counted separately from a wrong answer:

Correct โ†‘
post-graph-rag ยท gemini-3.6-flash0.807
TG-RAG (published)0.599
GraphRAG (published)0.405
LightRAG (published)0.406

A second judge from a different model family scores the same answers at 0.805 โ€” two-tenths of a point apart, which matters more than either figure, since the usual objection to a judged rate is that it moves with the judge.

The breakdown is more useful than the total: incorrect elements sit at 0.14, refusals at 0.05, and relative-time questions produce no incorrect elements at all. When this system commits to a figure on this corpus, it is usually right.

Same qualifications apply, plus two specific to this comparison: their judge model is not available on our router, and their verbatim rubric is truncated in the public HTML, so ours reproduces their described categories rather than their text. Their figures are on their corpus slice; ours is 78 questions over 6 companies. Read a few points of margin as approximate rather than decisive.

โšก Try it

pip install post-graph-rag

Needs Python 3.11+ and PostgreSQL 16 or 18 with pgvector. CI runs 3.11 on 16, and 3.13 on both 16 and 18 โ€” the behaviour here lives in the database, so each PostgreSQL version is exercised rather than assumed.

Point it at PostgreSQL with pgvector and any OpenAI-compatible endpoint:

from post_graph_rag import GraphRAG, RAGConfig

rag = GraphRAG(RAGConfig(
    api_base="https://your-router/v1", api_key=..., model="gemini-3.6-flash",
    embedding_model="gemini-embedding-001", embedding_dim=1536,
    db_uri="postgresql://localhost:5432/postgres", realm="my_kb"))
await rag.initialize()

await rag.index_document("Helena Voss is CFO of Calder Industries.", metadata={"source": "2019.txt"})
await rag.index_document("Priya Nair has been appointed CFO, succeeding Helena Voss.", metadata={"source": "2023.txt"})

answer = await rag.query("Who is the CFO of Calder Industries?")
# Priya Nair โ€” the earlier fact is closed, not competing

โ†’ Runnable examples ยท Neon & Supabase quickstart ยท Full installation ยท Configuration reference


Use in Claude, Gemini CLI, Cursor & MCP in 20 Seconds

post-graph-rag-mcp exposes the engine over the Model Context Protocol (stdio and Streamable HTTP) so coding agents retire superseded architecture decisions instead of retrieving old and new conventions together. On the interactive path, your assistant supplies triples and keywords while local ONNX embeddings (fastembed) run in-process โ€” zero sidecar LLM API keys required.

Add to your AI client (zero-config local Postgres)

Bundles PostgreSQL 16.2 + pgvector via pgserver (publishes wheels up to CPython 3.12, hence --python 3.12):

Claude Code:

claude mcp add post-graph-rag -- uvx --python 3.12 --from "post-graph-rag-mcp[embedded,local-embed]" post-graph-rag-mcp

Gemini CLI:

gemini mcp add post-graph-rag uvx -- --python 3.12 --from "post-graph-rag-mcp[embedded,local-embed]" post-graph-rag-mcp

Claude Desktop / Cursor / Windsurf / Gemini CLI settings.json:

{
  "mcpServers": {
    "post-graph-rag": {
      "command": "uvx",
      "args": ["--python", "3.12", "--from", "post-graph-rag-mcp[embedded,local-embed]", "post-graph-rag-mcp"]
    }
  }
}

VS Code (.vscode/mcp.json): use "servers" with "type": "stdio" (see full client configs).

Already have PostgreSQL, Docker, Neon, or Supabase? (Python 3.11โ€“3.14)

Drop --python 3.12 and pass POSTGRES_URI:

# Claude Code
claude mcp add post-graph-rag -e POSTGRES_URI="postgresql://..." -- uvx --from "post-graph-rag-mcp[local-embed]" post-graph-rag-mcp

# Gemini CLI
gemini mcp add -e POSTGRES_URI="postgresql://..." post-graph-rag uvx -- --from "post-graph-rag-mcp[local-embed]" post-graph-rag-mcp

Using the MCP once connected

Talk to your assistant in plain English โ€” it calls the 7 built-in MCP tools automatically:

What you askTool calledWhat happens
"Remember that AuthService uses Clerk."rememberStores the passage + (AuthService) --[uses_auth]--> (Clerk).
"Remember we migrated AuthService to BetterAuth."rememberCloses the old Clerk edge automatically (functional_predicates).
"What auth provider does AuthService use?"recallHybrid RRF retrieval returns BetterAuth only (superseded facts excluded).
"What did we use in March? / What did we believe on May 1?"recall_as_ofBi-temporal query by valid time (as_of) or belief time (as_believed_at).
"Show AuthService's auth history, and everywhere Clerk was used."trace_historyBidirectional (direction="both") chronological lineage.
"Sync ./docs/adr in filename order."ingest_documentsIdempotent directory sync skipping unchanged files via content hash.
*"What changed since yesterday?" / "Add uses_cache as functional."changes_since / configure_memory_rulesDatabase-clock delta feed & live rule/coverage inspection.

โ†’ Full MCP & AI Client Guide (Claude, Gemini CLI, Cursor, Windsurf, VS Code, Codex, Docker) ยท MCP Package README


๐Ÿงฑ The layer underneath: post-graph

A standalone library, if you want the graph without the RAG. It makes PostgreSQL behave like a graph database rather than emulating one:

  • Table-per-vertex, table-per-edge โ€” real foreign keys, real indexes, real constraints, so your graph is queryable by anything that speaks SQL
  • Recursive CTE traversals โ€” neighbours, paths and shortest-path with cycle detection, executed in the database rather than in your application
  • Two levels of tenancy โ€” realm for hard isolation (optionally schema-per-tenant), space for sub-grouping inside it
  • pgvector on vertices and edges, searchable across live and historical rows
  • Append-only history and trigger-based audit logging on every table, capturing old and new state with the acting user
  • Promoted payload columns and server-side range queries โ€” filter, order and bulk-delete on JSONB fields at the database, not in Python

pip install post-graph ยท Apache 2.0 ยท 850 tests against real PostgreSQL


๐ŸŒŸ Why post-graph-rag?

Traditional Vector RAG systems suffer from "chunk isolation"โ€”they retrieve isolated text passages based purely on semantic similarity, missing higher-level relationships and cross-document entity connections.

post-graph-rag solves this by building a dual representation inside PostgreSQL:

  1. Unstructured Vector Passages: Full document chunks indexed with pgvector HNSW embeddings.
  2. Knowledge Graph Triples: Extracted Subject-Predicate-Object entities connected by graph edges.
  3. Structured Document Metadata: Rich metadata tracking (source, category, collection, document, page, paragraph, space).
  4. Application-Level Space Sub-grouping (space): Scopes indexing and vector similarity search to application-specific environments (e.g. production, sandbox, staging, user_workspace) within {realm} tenant partitions.

Architectural comparison

Capabilitypost-graph-ragGraphiti / ZepMem0LightRAGMS GraphRAG
Storage stackPostgreSQL + pgvector onlyNeo4j / FalkorDBVector DB + Graph DBCustom / partial PGParquet / Vector DB
Bi-temporal (as_of valid + as_believed_at audit)YesYesNoNoNo
Supersession from document order (backfill-safe)YesPartial (LLM-dated)Overwrites / flatNoNo
Controlled predicate vocabulary + negation flagYesNoNoNoNo
Hierarchical community detection & summariesYesNoNoNoYes
ACID transactions spanning graph & app tablesYesNoNoNoNo
LicenseApache 2.0Apache 2.0Apache 2.0 (OSS subset)MITMIT

Relationship quality

Extracted relations are context-specific, drawn from what the text actually states:

(Zeus) --[is_king_of]--> (Olympian gods)
(Zeus) --[son_of]--> (Cronus)
(Zeus) --[married_to]--> (Hera)
(Zeus) --[defeated]--> (Titans)

Vague connectors (relates_to, associated_with, connected_to, โ€ฆ), self-loops and blank endpoints are rejected at extraction time. A relation that reaches the graph always says something specific about the pair it connects, and two entities merely appearing near each other never produces an edge.

If the LLM cannot produce usable structure, indexing raises ExtractionError. Placeholder edges are never invented as a fallback: once written they are indistinguishable from genuine extracted structure.

Relations the text explicitly denies are stored with the positive predicate and negated: true, rather than as an inverted predicate like did_not_have_relationship_with. Traversal and synthesis can then exclude them instead of reading them as assertions.

Entity resolution

Entities are unique per (realm, space, lower(name)), enforced by a unique index, and are additionally resolved through aliases. Extraction records every other surface form it sees, so Babbage, Charles Babbage and C. Babbage converge on one vertex; the fuller name becomes canonical and the rest become aliases. Pronouns and relative references (he, his father, the company) are rejected outright โ€” they cannot resolve to a stable vertex.

The same entity mentioned in many documents is one vertex, which is what allows the graph to connect chunks that share no vocabulary.

Chunking and document context

index_text() chunks a document (with overlap, so relations spanning a boundary survive) and threads a DocumentContext through the chunks โ€” title, source, and the canonical entity names found so far. Without it, every chunk after the first is extracted blind and its pronouns become junk vertices.

Bring your own splitter by passing chunker= to GraphRAG, or use index_document() directly with your own DocumentContext.

rag = GraphRAG(config, chunker=my_splitter)
await rag.index_text(long_text, metadata=DocumentMetadata(document="babbage.txt"))

Bring your own connection

GraphRAG opens a pool from config.db_uri by default. Pass connection= an asyncpg Connection or Pool and it uses yours instead, leaving ownership โ€” and anything you have decided about that session โ€” with you. A wrapper of your own works too: anything with an acquire() that is not an asyncpg Connection is driven as a pool, so you can do something to each connection on the way out (see post-graph's README). That is the shape to use behind PgBouncer in transaction mode, where a session-level SET ROLE would leave a server connection wearing one tenant's role for the next client that borrows it.

This exists for one shape in particular: a tenant per PostgreSQL schema, where no single role may hold USAGE on every tenant's schema, that reach being the thing per-tenant schemas exist to remove. A worker connects as itself and assumes a per-tenant role for the work. A DSN cannot express that, because the role is not a property of the connection string; it is a property of the request.

async def setup(conn):                       # runs on every acquisition
    await conn.execute('SET ROLE "tenant_42"')

pool = await asyncpg.create_pool(dsn, setup=setup)
rag = GraphRAG(config, connection=pool)      # reads and writes arrive as tenant_42

Use a session-level SET ROLE, not SET LOCAL ROLE. Most read paths underneath do not open a transaction, so a transaction-local role set outside the library never reaches retrieval โ€” you would get a working index and an empty recall. asyncpg's RESET ALL on release keeps the session-level role from outliving the acquisition.

A single Connection works too: assume the role in a transaction you open and hold for the call. post-graph nests its own transactions as savepoints, so the role persists through them. One connection is enough because every database write here runs on one sequential path โ€” only embedding and extraction run concurrently.

Two things to get right:

  • Grant USAGE on the schema holding the vector extension, as well as on the tenant's own schema. pgvector's type lives there, and without it every vector read fails with type "vector" does not exist, naming neither the privilege nor the schema that is missing. A database whose public carries owner-only defaults โ€” what CREATE DATABASE leaves on PostgreSQL 15+ โ€” gives a new role no USAGE on it.
  • The library never closes a connection you supplied. close() closes only a pool it opened itself.

SET ROLE cannot escalate: PostgreSQL refuses a role the connecting user is not a member of, so this grants no privilege the caller did not already hold.

Deleting a document, including the copies the audit trail kept

documents and doc_mentions are created audited, so every chunk is held three times: once live, once under new_row from the INSERT that wrote it, and once under old_row from the DELETE that removed it โ€” with the chunk text and its embedding in each. For a public reference shelf that is the point. For a document somebody asked to have deleted, it is the whole of the problem.

receipt = await store.delete_document_chunks(doc_key, space=space,
                                             purge_audit=True)
receipt["audit_rows_purged"]      # only present when purge_audit=True

Off by default, and additive in the receipt, so an existing caller โ€” a shelf being re-indexed, say โ€” sees no change at all. The purge runs after the deletes, because those are themselves audited and purging first would leave the row each one writes on its way out. Entity and relation audit rows are left alone: entities are marked dormant rather than deleted, and both are shared, so another document in the space may have contributed the same assertion. Only documents and doc_mentions belong to one doc_key.

This method is also the only place that can do it: by the time it returns, the ids it would need are gone from the live tables.

Behind a connection pooler

RAGConfig forwards two asyncpg options to the pool it opens:

RAGConfig(statement_cache_size=0,                       # RAG_STATEMENT_CACHE_SIZE
          server_settings={"statement_timeout": "15000"})

Set statement_cache_size=0 behind PgBouncer in transaction or statement pooling mode. Server connections rotate between transactions there, so asyncpg's per-connection prepared statements collide under concurrency as DuplicatePreparedStatementError. Left unset, asyncpg keeps its own default, so nothing changes for existing callers. server_settings carries session startup parameters โ€” a statement_timeout a pooler would otherwise discard from the startup packet. Both apply to a pool this store opens; with connection= you configure your own.

When a batch writer provisions the realm

If a subordinate role is the first session to reach a realm, it creates the tables and owns them โ€” all seven, their _data and _audit companions, every sequence and index. The owning role can then neither ALTER them nor let pg_dump take ACCESS SHARE, so nightly backups fail on tables it is supposed to own.

RAGConfig(owner_role="app_owner")        # RAG_OWNER_ROLE

With that set, initialize_schema() hands everything over before it returns, so the invariant holds however the realm got provisioned โ€” and a realm left in that state by an earlier release is repaired the next time the writer initialises. RAGGraphStore.reassign_owned_to(role) does it once, on demand. The writer keeps working afterwards provided it is IN ROLE the owner.

Off by default, and the hand-over is database-wide, not realm-scoped โ€” see post-graph's reassign_owned_to. A role owning objects beyond this realm hands those over too.

Querying as a role that does not own the tables

The stricter version of the same deployment: the tables are created by a provisioning role, row-level security is enabled and forced on them, and the role that queries holds only SELECT, INSERT, UPDATE โ€” it must not own them, since an owner may ALTER TABLE โ€ฆ NO FORCE ROW LEVEL SECURITY and take the wall down.

For that, no index is created on the query path. initialize_schema() creates every index the engine will ever need, including the lexical channel's GIN index when lexical_search is on, so run it as the owning role at provisioning time. The lexical query path still checks for that index, but by reading the catalogue โ€” a read any role with USAGE on the schema may make โ€” and issues no DDL when it is there.

This has to be done by not issuing the statement, not by recovering from it: CREATE INDEX requires ownership of the table, and PostgreSQL checks for that before it evaluates IF NOT EXISTS. So the statement is refused to a non-owner even when the index already exists, and nothing a deployer creates in advance can make a lazy CREATE safe.

Realms provisioned by an earlier release gain the index by running initialize_schema() against them again as the owner; it is idempotent. Until then a lexical query raises a SchemaError that says exactly that, rather than asyncpg's must be owner of table relations. Setting lexical_search=False retrieves without that channel, at the cost of the one that recovers rare identifiers โ€” statute sections, exhibit numbers, part numbers.

record_retrieval_events behaves the same way: its table is created by initialize_schema() when the flag is on, and the query path checks before creating.

Community summarisation

Corpus-level questions โ€” "what are the main themes here?" โ€” cannot be answered by retrieving passages, because no single passage contains the answer. After indexing, cluster the entity graph and summarise each cluster:

await rag.index_text(doc_a, metadata=DocumentMetadata(document="a.txt"))
await rag.index_text(doc_b, metadata=DocumentMetadata(document="b.txt"))

await rag.build_communities()          # clusters + one LLM report per community

res = await rag.query("What are the main themes?", param=QueryParam(mode="global"))
print(res["retrieved_communities"])

Each report is stored as a vertex in communities with its own embedding, so global and hybrid retrieval find themes by similarity rather than by enumerating relations. Membership is recorded as community_members edges back to the entities, so a report is always traceable to the subgraph it came from.

Communities are derived data: build_communities() replaces the previous clustering for the space rather than accumulating stale clusters. Global mode degrades to relation ranking when none have been built, so it never hard-fails.

Detection uses Leiden (igraph + leidenalg, installed by default), falling back to deterministic label propagation if the native build is unavailable. Both are deterministic โ€” a randomised partition would produce a different graph on every indexing run. Leiden is the default because partition balance matters: on the evaluation corpus the largest community holds 35% of the graph under label propagation against 17% under Leiden, and a community spanning a third of the graph summarises everything rather than a theme. Supply your own with community_detector=:

rag = GraphRAG(config, community_detector=my_detector)   # (nodes, edges) -> {node: community_id}

Repeated relations

The same triple extracted from several chunks is one edge whose weight increments, not several edges. Weight then breaks ties when ranking relations.

Supersession, belief epochs, and bi-temporal recall (1.20.0)

Later documents close superseded facts deterministically without requiring the extractor to invent dates:

  • Exclusive predicate groups (exclusive_predicate_groups): when a new predicate arrives between the same (subject, object) pair in a declared group (e.g. {"ally_of", "rival_of"}), active conflicting edges are closed.
  • Functional predicates (functional_predicates): single-valued predicates per subject (e.g. uses_auth, cfo_of, lives_in). Asserting a new object closes any active positive edge sharing (subject, predicate) with a different object.
  • Polarity flips & multi-epoch reverts: flipping negated=False to negated=True closes the prior edge; reverting a decision (Clerk โ†’ BetterAuth โ†’ Clerk) opens a fresh belief epoch instead of mutating the retired edge, keeping historical as_believed_at audit queries exact.
  • Bi-temporal & bidirectional retrieval: QueryParam supports as_of (valid time), as_believed_at (belief time), include_superseded, and direction="out" | "in" | "both" so reverse lookups ("where was Clerk used?") traverse inbound edges as cleanly as outbound ones.

๐Ÿงญ Exploration Support (1.10.0)

Three engine calls for exploration-first consumers โ€” structure, coverage, change โ€” with the agent loop staying yours:

# Structure: an opt-in topic tree above the flat communities
rag = GraphRAG(RAGConfig(community_levels=2))
tree = await rag.get_community_tree()

# Coverage: where has retrieval never looked? (opt-in telemetry, hash-only)
frontier = await rag.least_explored_communities(k=5)
dark = await rag.dark_entities(limit=100)

# Change: what moved since the last poll, from belief time
delta = await rag.changes_since(watermark)          # counts only, one round trip
if not delta.empty:
    detail = await rag.changes_since(watermark, summary=False)
watermark = delta.as_of

Hierarchy levels nest by construction (recursive supergraph clustering); level-filtered retrieval happens inside the vector search, not as a post-hoc trim; deltas are exactly-once under clock skew via database-clock watermarks; and re-indexing an unchanged document yields an empty delta. community_levels defaults to 1 โ€” existing behaviour is untouched.

๐Ÿ—๏ธ Architecture Workflow

graph TD
    subgraph INDEXING ["1. Indexing"]
        A[Document + Metadata] --> B[Chunker]
        B --> C[Embedding Service]
        B --> D[LLM GraphExtractor<br/>validate ยท glean ยท normalise]
        C -->|chunk vectors| S[(PostgreSQL + pgvector<br/>via post-graph)]
        D -->|entities ยท triples ยท validity| S
        D -.->|later doc contradicts earlier| SUP[Supersession<br/>closes the old edge]
        SUP --> S
    end

    subgraph SCHEMA ["Tables in one database"]
        S --- V1[documents]
        S --- V2[entities]
        S --- V3[communities]
        S --- E1[relations<br/>valid_from/to ยท t_created/expired]
        S --- E2[doc_mentions]
        S --- E3[community_members / _children]
    end

    subgraph RETRIEVAL ["2. Retrieval โ€” three channels, fused by RRF"]
        Q[Question] --> K[Keyword + subquery expansion]
        K --> C1[Entity vector search<br/>โ†’ multi-hop traversal]
        K --> C2[Relation embedding search]
        K --> C3[Lexical / BM25 over relations]
        V2 --> C1
        E1 --> C1 & C2 & C3
        C1 & C2 & C3 --> F[RRF fusion<br/>MMR ยท node-distance rerank]
        V3 -->|global mode| F
        V1 -->|chunks| F
    end

    subgraph SYNTHESIS ["3. Synthesis"]
        F --> G[Temporal filter<br/>as_of ยท as_believed_at]
        G --> H[Prompt assembly<br/>renders each relation's validity]
        H --> I[LLM]
        I --> J[Answer + citations + triples]
    end

Three things in that diagram are the whole argument: supersession at write time, three retrieval channels fused rather than one, and validity rendered into the prompt โ€” the last being worth +38 points on temporal reasoning on its own.


๐Ÿงช Runnable Examples

Seven Python scripts plus a 60-second cloud database guide in examples/, each focused on one capability:

export OPENAI_API_KEY=...  OPENAI_API_BASE=...  POSTGRES_URI=...
cd examples && python 01_quickstart.py
shows
00_neon_supabase_quickstart.mdFree-tier Neon & Supabase setup in 60 seconds (post-graph-rag + post-graph-rag-mcp)
01_quickstart.pyThree documents, one question that needs all three
02_supersession.pyA later filing closes an earlier fact; history stays queryable
03_bitemporal_audit.pyReproduce what the system believed before a restatement
04_multi_tenant_spaces.pyPer-tenant isolation, plus deliberate cross-tenant views
05_incremental_and_deltas.pyIdempotent re-indexing and change polling
06_communities_and_exploration.pyTopic tree, corpus themes, coverage gaps
07_retrieval_modes.pylocal, global and mix retrieval, same question

๐Ÿ“ฆ Installation

Install post-graph-rag via pip or uv:

pip install post-graph-rag

Or using uv:

uv add post-graph-rag

PostgreSQL Requirements

pgvector is required, not optional. Without it the vertex tables are created without embedding columns and every similarity search silently returns nothing. initialize() raises SchemaError if it is missing rather than degrading.

# macOS
brew install pgvector

# Debian/Ubuntu (match your server version)
sudo apt install postgresql-17-pgvector
CREATE EXTENSION IF NOT EXISTS vector;

๐Ÿš€ Quick Start

1. Basic Indexing & Querying

import asyncio
import os
from post_graph_rag import GraphRAG, RAGConfig, DocumentMetadata

async def main():
    # 1. Configure GraphRAG engine
    config = RAGConfig(
        api_base="http://localhost:4000/v1",       # OpenAI-compatible router endpoint
        api_key=os.environ["OPENAI_API_KEY"],     # Never hardcode credentials
        model="gemini-3.6-flash",                    # LLM model for extraction & synthesis
        embedding_model="gemini-embedding-001", # Embedding model
        embedding_dim=1536,                       # Must match the model's output width
        db_uri="postgresql://user:password@localhost:5432/postgres",
        realm="enterprise_kb",
        schema_per_realm=True                     # Give each tenant its own schema
    )

    rag = GraphRAG(config)
    
    # 2. Connect & initialize PostgreSQL graph schema
    await rag.initialize()

    # 3. Index unstructured documents
    doc_text = (
        "Zeus is the king of the Olympian gods, ruling sky and thunder from Mount Olympus. "
        "He is the son of Cronus and Rhea, and married to Hera. "
        "Zeus defeated the Titans in the Titanomachy to establish his rule."
    )
    
    result = await rag.index_document(doc_text, metadata={"source": "greek_mythology.txt"})
    print(f"Indexed document {result['document_id']}: Extracted {result['entities_extracted']} entities.")

    # 4. Perform Hybrid RAG Query
    response = await rag.query("Who are the parents of Zeus and what did he defeat?")
    
    print("\n=== SYNTHESIZED ANSWER ===")
    print(response["answer"])

    print("\n=== RETRIEVED GRAPH TRIPLES ===")
    for triple in response["retrieved_graph_triples"]:
        print(f"  - {triple}")

    # 5. Clean up
    await rag.close()

if __name__ == "__main__":
    asyncio.run(main())

๐Ÿ“‹ Document Metadata (DocumentMetadata)

post-graph-rag includes structured document metadata tracking via the DocumentMetadata model:

from post_graph_rag import DocumentMetadata

metadata = DocumentMetadata(
    source="https://mythology.org/zeus.html",  # Document origin (URL, filepath, API)
    category="greek_mythology",               # Document category/topic
    collection="olympian_deities",             # Collection namespace
    document="zeus_overview.pdf",              # Title or filename
    page=1,                                    # 1-based page number
    paragraph=2,                               # 1-based paragraph index
    space="production",                        # Sub-grouping within the realm
    extra={"author": "Homer", "year": -700}    # Custom metadata key-value pairs
)

await rag.index_document(chunk_text, metadata=metadata)

Design Rationale: Optional vs. Required

  • All metadata fields are optional with default None. This allows seamless indexing of raw strings, short code snippets, webhooks, or unformatted text, while offering rich structural provenance tracking when indexing multi-page PDFs or categorized enterprise documents.

Document identity: source and document together

Re-indexing replaces rather than appends, so two documents that resolve to the same key are treated as one document seen twice โ€” the second deletes the first.

The key is built from source and document together, so give at least one of them a value that is unique per document:

# Correct: source identifies this document
DocumentMetadata(source="/corpus/WDC-2022-q1.json", document="WDC-2022-q1")

# Wrong: a corpus name is not a document identity
DocumentMetadata(source="ect", document="WDC-2022-q1")   # was catastrophic before 1.8.0

Before 1.8.0 the key preferred source and ignored document entirely, so the second form collapsed an entire corpus onto one key. An 80-transcript run kept five transcripts and marked 92% of its relations dormant, with no error raised โ€” the only visible symptom was the system declining to answer questions whose evidence had been deleted. Since 1.8.0 both parts contribute, so the second form is merely untidy rather than destructive.

Upgrading: keys computed before 1.8.0 do not match the new scheme, so re-indexing an existing document appends a copy instead of replacing it. Rebuild realms indexed on the old scheme.


โš™๏ธ Configuration Reference (RAGConfig)

RAGConfig can be configured explicitly or automatically loaded from environment variables:

OptionEnvironment VariableDefault ValueDescription
api_baseOPENAI_API_BASEhttp://localhost:4000/v1Base URL for OpenAI-compatible LLM endpoint
api_keyOPENAI_API_KEYEMPTYAPI key. EMPTY is the placeholder local servers accept
modelRAG_MODELgemini-3.6-flashDefault LLM for every role below that has no override
extraction_modelRAG_EXTRACTION_MODELfalls back to modelExtraction, gleaning and contradiction detection โ€” the index-time write path
community_modelRAG_COMMUNITY_MODELfalls back to modelCommunity report synthesis
auxiliary_modelRAG_AUXILIARY_MODELfalls back to modelKeyword extraction and query decomposition โ€” small per-query calls
synthesis_modelRAG_SYNTHESIS_MODELfalls back to modelAnswering the question
embedding_modelRAG_EMBEDDING_MODELgemini-embedding-001Model for vector embedding generation
embedding_dimRAG_EMBEDDING_DIM1536Embedding width. Must match the model, and is fixed once tables exist
embedding_batch_sizeRAG_EMBEDDING_BATCH_SIZE64Inputs per embedding request. Endpoints cap this and exceeding the cap is a non-retryable 400, so requests are split to stay under it
db_uriPOSTGRES_URIpostgresql://localhost:5432/postgresPostgreSQL connection DSN
realmRAG_REALMdefaultMulti-tenant graph namespace
spaceRAG_SPACEdefaultSub-grouping within a realm (production, sandbox, โ€ฆ)
schema_per_realmRAG_SCHEMA_PER_REALM0Give each realm its own PostgreSQL schema. Recommended โ€” see below
statement_cache_sizeRAG_STATEMENT_CACHE_SIZENoneForwarded to asyncpg; set 0 behind PgBouncer / Neon -pooler / Supabase transaction pooler
owner_roleRAG_OWNER_ROLENoneRole that initialize_schema() hands database objects over to via REASSIGN OWNED
embed_relationsRAG_EMBED_RELATIONS1Embed relation edges so retrieval can find them by similarity as well as by traversal. Costs one embedding call per distinct triple at index time
merge_strategyRAG_MERGE_STRATEGYrrfChannel fusion strategy: rrf (Reciprocal Rank Fusion across traversal, relation-embedding, and lexical channels) or quota
lexical_searchRAG_LEXICAL_SEARCH1Enable PostgreSQL tsvector GIN full-text search as the third retrieval channel
max_hopsRAG_MAX_HOPS2Graph traversal depth from matched entities
relation_seed_quotaRAG_RELATION_SEED_QUOTA0.5Share of relation slots reserved for the similarity channel when merge_strategy="quota". 0 disables it
mmr_enabled / node_distance_rerankRAG_MMR / RAG_NODE_DISTANCE_RERANK0 / 0Optional post-fusion MMR diversification and graph-distance reranking
allow_embedding_fallbackRAG_ALLOW_EMBEDDING_FALLBACK0Use local/deterministic vectors when the embedding API fails
enforce_embedding_model_matchRAG_ENFORCE_EMBEDDING_MODEL1Record (embedding_model, embedding_dim) in realm_metadata and raise SchemaError if a realm is reopened under a different model of the same width
exclusive_predicate_groupsโ€”[]Mutually exclusive predicate sets per (subject, object) pair (e.g. [{"ally_of", "rival_of"}])
functional_predicatesRAG_FUNCTIONAL_PREDICATESset()Single-valued predicates per subject (e.g. uses_auth, cfo_of); a new object supersedes prior active edges
contradiction_detectionRAG_CONTRADICTION_DETECTION0Optional LLM check for residual contradictions not covered by declarative rules
include_supersededRAG_INCLUDE_SUPERSEDED0Include superseded edges in default retrieval (off by default)
extract_validityRAG_EXTRACT_VALIDITY1Extract valid_from / valid_to intervals when stated in text
record_retrieval_eventsRAG_RECORD_RETRIEVAL_EVENTS0Opt-in hash-only retrieval telemetry for coverage(), dark_entities(), and apply_retention()
community_levelsRAG_COMMUNITY_LEVELS1Levels in the recursive Leiden community hierarchy (> 1 builds a nested topic tree)
fallback_modelsRAG_FALLBACK_MODELSโ€”Comma-separated models to fail over to when the primary is rate-limited or out of credits
max_retriesRAG_MAX_RETRIES5Attempts per model before moving to the next
gleaning_passesRAG_GLEANING_PASSES1Extra "what did you miss?" extraction passes. 0 halves LLM cost at the price of recall
extraction_promptโ€”NoneReplace the extraction system prompt wholesale
extraction_fnโ€”NoneSupply triples from your own code instead of (or alongside) the LLM โ€” see below
extraction_fn_modeRAG_EXTRACTION_FN_MODEreplacereplace uses your function instead of the LLM; merge runs both and unions them
validate_external_extractionRAG_VALIDATE_EXTERNAL1Put your function's records through the same gates as the LLM's
entity_typesRAG_ENTITY_TYPESlibrary defaultsPreferred entity type list
predicate_vocabularyRAG_PREDICATE_VOCABULARYโ€”Preferred predicates; extracted ones are snapped onto this list
predicate_aliasesโ€”{}Explicit synonym map, e.g. {"collaborated_with": "worked_with"}
drop_negated_relationsRAG_DROP_NEGATED0Discard relations the text says do not hold, instead of flagging them
min_relation_confidenceRAG_MIN_RELATION_CONFIDENCE0.0Drop relations below this extraction confidence
chunk_chars / chunk_overlap_charsRAG_CHUNK_CHARS / RAG_CHUNK_OVERLAP2000 / 200Default chunker sizing
expand_chunks_via_mentionsRAG_EXPAND_VIA_MENTIONS1Retrieve chunks that mention a matched entity, not only chunks matching the query vector
context_entity_limitRAG_CONTEXT_ENTITY_LIMIT40Canonical names carried forward as extraction context
community_min_sizeRAG_COMMUNITY_MIN_SIZE3Smallest cluster worth summarising
community_resolutionRAG_COMMUNITY_RESOLUTION1.0Higher yields more, smaller communities (Leiden only)
max_communitiesRAG_MAX_COMMUNITIES64Cap per build; each community costs one LLM call
community_report_promptโ€”NoneReplace the community report prompt
negated_relation_weightRAG_NEGATED_RELATION_WEIGHT0.3Clustering weight for denied relations

Environment variables are read when a RAGConfig is constructed, not at import time.

External extraction (extraction_fn)

Some structure should never be guessed at. Imports, call edges, ownership and deployment topology are recoverable exactly from an AST, an LSP index or a build file, and asking a model to infer them is strictly worse than reading them. extraction_fn lets you hand those in directly.

def ast_edges(text, context=None):
    return [{"subject": "checkout_service", "predicate": "calls",
             "object": "ledger_service"}]

RAGConfig(extraction_fn=ast_edges)          # replaces the LLM
RAGConfig(extraction_fn=ast_edges, extraction_fn_mode="merge")   # runs both

The function takes (text, context) and may be sync or async. It can return an ExtractionResult, a {"entities": [...], "triples": [...]} mapping, a bare sequence of triples, or None for "nothing here". Endpoints you do not also describe as entities become stubs, the same path the LLM's own unmatched endpoints take โ€” so a triples-only source still produces a traversable graph.

merge is the interesting mode. A deterministic code graph and the model's reading of the prose around it end up in one graph, with extraction spending its cost only on the unwritten part: rationale, causation, what a decision was for. Each source is gated on its own way in, so an exact external record is not held to the LLM's vocabulary and an LLM record is not let through ungated.

Your records go through the same validation as the model's by default โ€” pronominal and phrase-shaped names dropped, vague predicates and self-loops rejected, predicates snapped onto the vocabulary. That is what makes "extraction output is untrusted input" true of every source rather than only of the model. Set validate_external_extraction=False when the source is already exact and the vocabulary would mangle it: calls and imports from an AST do not want snapping.

Two behaviours worth knowing. An exception from your function fails the chunk, deliberately โ€” a broken external extractor is the same event as a dead model, and swallowing it would let an import that stopped resolving read as a corpus with no call edges in it. And relations from your function carry the chunk that asserted them, so deleting that document withdraws them exactly as it would the model's.

Model roles

One model for every call is a compromise no role actually wants, so each role can take its own. Leave them unset and everything resolves to model, which is how the library behaved before roles existed โ€” nothing else changes.

RAGConfig(
    model="gemini-3.6-flash",           # the default for anything unset
    extraction_model="MiniMax-M2.7",    # index-time: builds the graph
    synthesis_model="gemini-3.7-flash", # query-time: reads it
    auxiliary_model="gemma-4-31B-it",   # keywords and decomposition
)

Two reasons this is worth using. The roles have different optima: over one fixed graph, four answering models separate across a 23-point band, while on the extraction side the models do not even agree on what a good graph is โ€” one builds the richest (most relations, most aliases), another the most queryable (94% predicate-vocabulary adherence but 40% fewer relations). And they have different economics: extraction is one or two calls per chunk and runs once, whereas auxiliary and synthesis run on every question for ever.

Be careful with extraction_model. A weak model here does not fail, it silently degrades the graph. Anything that depends on the model doing something subtle simply stops happening โ€” one tested model never once emitted the negated field, collapsing "X worked with Y" and "X never met Y" into the same edge, with no error anywhere. Extraction is the role to spend on.

schema_per_realm

Off by default for backwards compatibility, but recommended for new deployments. With it off, every realm shares one physical set of tables filtered by a realm column โ€” so the first realm to create entities fixes the embedding column width for all of them, and a second realm with a different embedding_dim cannot work.

allow_embedding_fallback

Off by default. Fallback vectors are not comparable with API embeddings, so mixing them into the same table corrupts retrieval rather than degrading it. With it off, an embedding failure raises EmbeddingError.


๐Ÿ“– API Reference

GraphRAG

The main orchestrator class for indexing and querying.

  • await initialize(): Connects to PostgreSQL and creates the graph tables (documents, entities, relations, doc_mentions, communities, community_members, community_children, realm_metadata). Raises SchemaError if pgvector is unavailable, an existing table's embedding width disagrees with embedding_dim, or (when enforce_embedding_model_match=True) the realm was indexed with a different embedding model.
  • await index_document(text, metadata=None, space=None, context=None, extraction=None) -> Dict[str, Any]: Embeds the chunk, extracts entities/triples via the LLM (or accepts a caller-supplied ExtractionResult via extraction= with zero LLM calls), resolves entities by name, applies supersession rules, and writes vertices, relations and doc_mentions edges. Raises rather than writing placeholder structure if extraction fails. Returns counts plus document_id and metadata.
  • await index_text(text, metadata=None, space=None, context=None) -> List[Dict[str, Any]]: Chunks a document with overlap, threads DocumentContext across batches, and indexes each chunk.
  • await query(question, param=None, top_k=None): Retrieves and synthesizes an answer. Returns question, answer, mode, keywords, retrieved_documents, retrieved_entities, retrieved_graph_triples, references. With QueryParam(stream=True) returns an async iterator of content chunks instead.
  • await query_data(question, param=None) -> Dict[str, Any]: Structured retrieval with no synthesis โ€” returns entities, relationships, chunks, references.
  • await retract_relations(edge_ids, superseded_by_edge_id, space=None) -> List[str]: Explicitly closes existing relation edges (superseded_by + t_expired) for host-assisted or application-level retraction.
  • await active_relations_for_entities(entity_names, space=None, exclude_edge_ids=None, limit_per_entity=5): Returns active outgoing relations for the named subjects so callers can inspect live assertions before superseding them.
  • set_functional_predicates(preds: Set[str]): Updates the active set of functional predicates at runtime.
  • await watermark(space=None): Returns the current database-clock watermark for changes_since().
  • await apply_retention(threshold=0.1, dry_run=True, space=None) / await restore_archived(entity_ids, space=None): Importance-scored reversible archiving of low-value entities (requires record_retrieval_events=True).
  • await close(): Closes database connection pools opened by the engine (caller-supplied connections are left open).

Per-document views (1.13.0)

For a registry or admin UI that lists documents and shows what each one put into the graph.

  • await document_stats(doc_key, space=None) -> DocumentStats: chunks, chunk_bytes, entities_mentioned split into entities_current / entities_dormant, relations contributed, and first_indexed_at / last_indexed_at. A document that was never indexed returns zeros with found=False rather than raising, so "indexed but empty" stays distinguishable from "not present".
  • await documents_stats(doc_keys, space=None) -> Dict[str, DocumentStats]: the batch form, and the one to render a table with. Two SQL round trips for any number of keys โ€” looping over document_stats would issue two per row.
  • await document_graph(doc_key, space=None, max_entities=500, max_relations=1000): the entities and relations that document contributed, for a drill-down. Capped, and the caps are reported in truncated / entities_truncated / relations_truncated โ€” a silently truncated subgraph reads as a complete one.
  • await sweep_orphaned_relations(space=None) -> int: one-shot repair for graphs written before relation provenance existed. Those relations record no sources, so no document deletion can withdraw them; this retires the ones whose endpoint entities have all gone dormant. Nothing is deleted, and it is safe to re-run.

These refuse space="__all__": they resolve a caller-supplied document key, and doing that across every space would return another tenant's document under the key this one asked for.

Deletion and dormancy

RAGGraphStore.delete_document_chunks(doc_key, space=None) removes a document's chunks and mention edges. Nothing else is deleted. Entities whose last mention disappears are marked dormant; relations left with no contributing chunk are marked dormant too, and so are relations whose endpoint entities have all gone dormant. Dormant relations are excluded from every retrieval path, from query/query_data, and from community building โ€” pass include_dormant=True to the store's read methods to see them for audit. A dormant entity or relation revives automatically if a later document brings it back.

QueryParam

  • mode: one of mix, local, global, hybrid, naive, bypass. An unknown mode raises ValueError.
  • top_k, max_total_tokens, max_entity_tokens, max_relation_tokens, response_type
    • The three token budgets default to None โ€” unlimited โ€” as of 1.11.1: everything retrieved reaches the model. Set an integer to cap context for cost or for a model with a small window.
  • as_of: valid-time filter (YYYY, YYYY-MM, or YYYY-MM-DD) โ€” returns relations whose stated validity covers that date (undated relations always qualify).
  • as_believed_at: belief-time ISO-8601 timestamp โ€” reconstructs what the graph knew at that moment (t_created <= T and t_expired IS NULL OR t_expired > T).
  • include_superseded: override RAGConfig.include_superseded per query (e.g. True for lineage/history inspection).
  • max_hops: override RAGConfig.max_hops per query.
  • direction: graph walk direction โ€” "out" (default), "in", or "both" (added in 1.20.0).
  • community_level: restrict global community search to one level of the topic tree.
  • subqueries: optional list of sub-questions to retrieve and fuse alongside the main question.
  • stream: return an async iterator of tokens instead of a dict.
  • only_need_context: return retrieval output without calling the LLM.
  • space: restrict retrieval to one space; __all__ queries across all spaces.
  • conversation_history, hl_keywords, ll_keywords: supply keywords to skip extraction.

Errors

All inherit from RAGError, so failures surface instead of degrading into irrelevant results:

  • SchemaError โ€” pgvector missing, or embedding width mismatch.
  • EmbeddingError โ€” embedding request failed, or returned the wrong width.
  • LLMError โ€” completion or streaming call failed.
  • ExtractionError โ€” the LLM returned no usable entities or triples.

DocumentMetadata

Data container for structured document metadata.

  • source: Optional[str]: Document URL, path, or origin.
  • category: Optional[str]: Document category or domain.
  • collection: Optional[str]: Document collection or folder.
  • document: Optional[str]: File title or filename.
  • page: Optional[int]: 1-based page number.
  • paragraph: Optional[int]: 1-based paragraph index.
  • space: Optional[str]: Sub-grouping space to index into.
  • extra: Dict[str, Any]: Custom user metadata.
  • to_dict() -> Dict[str, Any]: Serializes non-None fields to dictionary representation.
  • from_dict(data: Dict[str, Any]) -> DocumentMetadata: Deserializes dictionary data.

RAGGraphStore

Database layer wrapping post-graph.

  • add_document(text, embedding, metadata, space=None): Inserts a document vertex into the documents table.
  • upsert_entity(name, entity_type, description, embedding, space=None): Upserts by canonical name within (realm, space), so an entity mentioned in many documents is a single vertex. A bare Concept stub never overwrites a richer type or description.
  • find_entity_by_name(name, space=None): Resolve an entity vertex by name.
  • add_relation(from_entity, to_entity, relation_type, description, space=None, embedding=None): Directed relation edge.
  • add_doc_mention(doc_vertex, entity_vertex, space=None): Links a chunk to an entity it mentions.
  • search_similar_entities(query_vec, top_k, space=None) / search_similar_documents(...): pgvector HNSW similarity search.
  • search_similar_relations(query_vec, top_k, space=None): Semantic search over relation edges. Returns [] unless embed_relations is enabled.
  • get_neighbors(entity_id, space=None, include_dormant=False, direction="out"): 1-hop relations ("out", "in", or "both"), scoped to space.
  • get_all_relations(limit, space=None, include_dormant=False): Relations with their endpoint vertices.
  • get_neighborhood(entity_id, max_hops=1, ..., direction="out") / get_relations_by_ids(...) / search_relations_text(...): the other relation read paths. All take include_dormant=False, filtered in SQL, so a retired relation cannot reach an answer through any of them.
  • supersede_conflicting(...) / supersede_functional(...) / supersede_opposite_polarity(...) / mark_superseded(...) / get_active_subject_relations(...): write-time supersession and active-edge inspection primitives.
  • document_stats(...) / documents_stats(...) / document_graph(...) / sweep_orphaned_relations(space=None): as described under GraphRAG above.

๐Ÿ—„๏ธ PostgreSQL Database Schema

post-graph-rag automatically provisions and manages the following graph schema in PostgreSQL powered by post-graph:

Table NameTypeKey ColumnsDescription
documentsVertex Tableid, payload, embedding (vector)Stores raw text chunks and DocumentMetadata payloads
entitiesVertex Tableid, payload, embedding (vector)Canonical entity nodes (name, type, description, aliases)
communitiesVertex Tableid, payload, embedding (vector)Leiden community summary reports with promoted level
realm_metadataVertex Tableid, payloadRealm-level metadata including (embedding_model, embedding_dim) fingerprint
relationsEdge Tablefrom_id, to_id, relation_type, payload, embeddingDirected entity-to-entity triples with bi-temporal & supersession stamps
doc_mentionsEdge Tablefrom_id, to_id, relation_typeDirected edges connecting document chunks to mentioned entities
community_members / community_childrenEdge Tablesfrom_id, to_id, relation_typeLinks entities to leaf communities and child communities to parent themes
{table}_auditAudit Tableaudit_id, action, changed_by, changed_atAutomatic shadow audit logging for all graph mutations
{table}_dataHistory Tabledata_id, payload, timestamp, embeddingAppend-only historical records for vertices and edges

๐Ÿงช Testing

pip install -e ".[test]"
createdb postgres && psql -d postgres -c "CREATE EXTENSION IF NOT EXISTS vector;"
POSTGRES_TEST_URI="postgresql://localhost:5432/postgres" pytest

DB-backed tests create a disposable schema per test realm and drop it afterwards. They skip automatically when PostgreSQL with pgvector is not reachable.


๐Ÿค Contributing

Bug reports, failing test cases and pull requests are all welcome. CONTRIBUTING.md covers the parts that are specific to this project rather than generic advice: what the test suite needs, what it deliberately does not need, and the invariants worth understanding before changing them.

Issues tagged good first issue are real gaps rather than make-work โ€” each one names the file to look at, what "done" means, and what you will learn from it.

Tests need PostgreSQL with pgvector and no LLM credentials โ€” every test uses an in-process fake, so the suite is free, offline and deterministic.


๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Developed by Chandan Rajah (chandan.rajah@gmail.com).

Frequently asked questions

What is post-graph-rag-mcp MCP Server?

Bi-temporal knowledge graph memory MCP server powered by post-graph-rag and PostgreSQL + pgvector.

How do I install post-graph-rag-mcp MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. post-graph-rag-mcp MCP Server runs locally from the PyPI package post-graph-rag-mcp with the command uvx post-graph-rag-mcp.

Is post-graph-rag-mcp MCP Server free and open source?

Yes. post-graph-rag-mcp MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does post-graph-rag-mcp MCP Server support remote (HTTP) connections?

No remote endpoint is listed for post-graph-rag-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does post-graph-rag-mcp MCP Server provide?

post-graph-rag-mcp MCP Server provides 16 tools, including DocumentMetadata, EmbeddingError, ExtractionError, and GraphRAG. See the full tool list for descriptions and parameters.

How is post-graph-rag-mcp MCP Server's trust score calculated?

post-graph-rag-mcp MCP Server scores 48 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

โ€”Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server