Postgram logo

Postgram

Self-hosted MCP access to typed memories, documents, tasks, hybrid search, and knowledge-graph context.

Install Postgram

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

Setup steps from the project

Postgram 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. Install
    git clone https://github.com/ivo-toby/postgram.git
    
  2. 2. Run
    cd postgram
    
  3. 3. Start the server
    docker compose up -d --build
    
  4. 4. Run
    docker compose logs mcp-server \
         | grep 'Bootstrap token:' \
         | tail -n 1
    
  5. 5. Install
    npm install -g @ivotoby/postgram-cli
    

Overview

Postgram MCP server exposes a self-hosted PostgreSQL-backed knowledge and productivity system through a Streamable HTTP MCP endpoint. It stores typed entities such as memories, people, projects, tasks, interactions, and documents, then enriches them asynchronously with chunking, embeddings, and optional relationship extraction. Hybrid keyword-and-vector search can be combined with typed graph relationships, while session context remains separate from durable memory. Reach for Postgram when agents need shared, inspectable knowledge under the operator’s control rather than a hosted memory service.

Use cases

  • Store durable facts and session context for AI agents
  • Search shared notes and documents with hybrid retrieval
  • Connect people, projects, tasks, and decisions through a knowledge graph
  • Sync local Markdown repositories into an agent-accessible corpus
  • Run a private memory backend on Docker and PostgreSQL

Key features

  • Streamable HTTP MCP endpoint
  • Typed knowledge and productivity entities
  • Hybrid keyword and vector search
  • Directional knowledge-graph relationships
  • Separate durable memory and session context
  • Markdown document synchronization

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.

15/15 checks healthy over the last 78d

Adoption & maintenance

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

GitHub stars11Stargazers on the source repository.
Last commit21d agoMost recent push to the default branch.

How Postgram works

What Postgram does

Postgram provides a shared, self-hosted corpus for human users and AI agents. Its data model covers six entity types: memory, person, project, task, interaction, and document. Entities can include content, tags, visibility, status, and additional JSON metadata.

Memory entities support two distinct roles. Durable memory is intended for facts future agents should rely on, including decisions, preferences, constraints, and completed-work summaries. Session context is scoped to a calling client and supports short-lived continuity between conversations. Operators can groom old session context or promote selected information into durable memory.

The system also includes GTD-oriented task handling, Kanban views, Markdown repository synchronization, browser interfaces, a REST API, a CLI, encrypted backups, audit logging, and administrative controls. These features make the MCP endpoint part of a broader knowledge workspace rather than an isolated vector store.

How it works

Postgram is a TypeScript application built around PostgreSQL and pgvector. Hono provides the HTTP layer, and the MCP interface uses Streamable HTTP. A background worker handles enrichment after an entity is written, including text chunking, embedding generation, and optional LLM-based relationship extraction.

Search combines keyword retrieval with vector similarity and reciprocal-rank fusion. Results can be expanded through typed, directional graph edges when related context is useful. Relationship extraction can use OpenAI, Anthropic, Ollama, or an OpenAI-compatible endpoint. Embeddings can use a local Ollama deployment or hosted OpenAI embeddings.

The default Compose deployment is intended for one person or a small trusted team running locally or on a single virtual machine. PostgreSQL data and installation secrets are stored in persistent Docker volumes. Raw API and UI ports bind to loopback by default.

Setup and configuration

The standard installation uses Git, Docker, and Docker Compose. Clone the repository, select an embedding provider, and start the stack with Docker Compose. The default local path uses Ollama with the bge-m3 model; OpenAI embeddings require an OPENAI_API_KEY in .env before startup.

After the first start, retrieve the bootstrap token from the mcp-server logs, use the administration page to create the first administrator and enroll MFA, then create a scoped API key. API keys can be restricted by operations, entity type, and visibility. The health endpoint reports both application status and PostgreSQL connectivity.

The CLI package is @ivotoby/postgram-cli. It uses PGM_API_URL and PGM_API_KEY for authenticated operations. Enrichment is asynchronous, so newly stored content may need to clear the processing queue before it becomes searchable.

For remote MCP access, place Postgram behind HTTPS and enable OAuth. The development ports should not be exposed directly to the public internet. Changing the embedding provider, model, or vector dimensions after initial setup requires migration work rather than a simple configuration update.

Tools and capabilities

The MCP endpoint gives agents access to the Postgram corpus and its knowledge operations. Supported capabilities include:

  • Store and update typed memories, people, projects, tasks, interactions, and documents.
  • Search with combined keyword and vector retrieval.
  • Use graph relationships and optional graph expansion to find connected context.
  • Keep client-scoped session context separate from durable memory.
  • Work with visibility values such as personal, work, and shared.
  • Use content synchronized from local Markdown repositories.
  • Access task capture and organization features alongside knowledge records.

The same underlying data is available through the REST API and pgm CLI, allowing agents, browser users, and automation to work against one inspectable source.

Limitations and notes

Postgram is a self-hosted deployment, not a hosted multi-tenant SaaS service. Operators are responsible for PostgreSQL, provider credentials, network exposure, authentication, and backups. Knowledge extraction is optional, but search enrichment depends on an available embedding provider; writes can still be accepted when embeddings are unavailable while enrichment and search remain unavailable.

The Compose setup is designed for local or single-VM use and a small trusted team. Relationship extraction consumes an optional LLM provider, and embedding configuration changes after initial startup can require migration work. Remote clients need an HTTPS deployment with OAuth rather than direct access to loopback development ports.

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 Postgram

Postgram is an MCP server that connects AI agents to a self-hosted PostgreSQL-backed knowledge and productivity backend. Its main tools provide access to typed memories, people, projects, tasks, interactions, and documents, along with hybrid search, knowledge-graph context, and durable or session-scoped agent memory.

Install Postgram with Git, Docker, and Docker Compose by cloning the repository and running the Compose stack. Choose Ollama with the `bge-m3` model for the local embedding path, or set `OPENAI_API_KEY` for OpenAI embeddings. Then bootstrap the admin account and create an API key.

Yes, Postgram combines keyword retrieval and vector similarity using reciprocal-rank fusion. Enrichment runs asynchronously after writes, so embeddings must be available before new content can be found through search.

Yes, Postgram separates client-scoped `session_context` from `durable_memory`. Session context supports continuity within recent work, while durable memory stores information intended for future agents to trust. Operators can groom stale session context and distill selected information into durable memory.

Put Postgram behind HTTPS, enable OAuth, and configure the client for its Streamable HTTP MCP endpoint. Do not expose the default loopback development ports directly to the internet. API keys and visibility restrictions provide additional control over access to the corpus.

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 PreviewPostgram AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/postgram?style=directory)](https://allmcps.com/mcp/postgram)
HTML Embed
<a href="https://allmcps.com/mcp/postgram"><img src="https://allmcps.com/api/badge/postgram?style=directory" alt="Postgram on AllMCPs" /></a>