SkillAgentSearch skills...

postgram

Self-hosted knowledge for humans and agents.

Install / Use

claude mcp add ivo-toby -- npx -y github:ivo-toby/postgram

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

69/100

Category

Operations

Supported Platforms

Claude Code
Claude Desktop

Our assessment of postgram

postgram scores 69/100 on our quality scale, 684th of 744 Operations skills we index.

Its MCP Server is 66 KB long, well organised into 84 sections with 47 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.

It has 10 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
21/30
Structure
20/20
Description
8/15
Adoption
4/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated yesterday, so postgram is actively maintained.
  • It is released under AGPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
  • Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

postgram compared with similar skills

All 4 of these similar skills score higher than postgram; compare them before choosing.

SkillScoreStarsUpdatedFormat
postgram (this skill)by ivo-toby69101d agoMCP Server
Agent-Reachby Panniantong10093.0k22d agoCLAUDE.md
headroomby headroomlabs-ai10074.6ktodayCLAUDE.md
CowAgentby zhayujie10047.3ktodayCLAUDE.md
Scraplingby D4Vinci10086.1ktodayMCP Server

Frequently asked questions

How do I install postgram?
Run claude mcp add ivo-toby -- npx -y github:ivo-toby/postgram. The install tabs above show the steps for each supported agent.
Which AI agents does postgram work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is postgram safe to use?
It is AGPL-3.0-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is postgram still maintained?
The repository was last updated yesterday, so postgram is actively maintained.
<p align="center"> <img src="assets/logo.png" alt="Postgram" width="260" /> </p> <h1 align="center">Postgram</h1> <p align="center"> <strong>A self-hosted productivity and knowledge backend for humans and AI agents.</strong> </p> <p align="center"> <a href="https://postgram.dev">Website</a> · <a href="https://postgram.dev/getting-started/quick-start/">Quick start</a> · <a href="https://postgram.dev/guides/mcp-integration/">MCP guide</a> · <a href="https://postgram.dev/reference/rest-api/">REST API</a> · <a href="https://www.youtube.com/watch?v=xr7u11gtYgM">Demo</a> </p>

Postgram keeps the data you and your agents work from in one inspectable place: notes, documents, tasks, people, projects, interactions, decisions, and agent memory. Humans use the browser UI and CLI; agents use the same corpus over MCP, REST, or the CLI.

It is more than an agent-memory layer. Postgram preserves typed source objects, supports GTD-style task management and Markdown folder sync, combines full-text and vector retrieval with a knowledge graph, and separates short-lived agent working context from durable memory.

<table> <tr> <td width="50%"> <a href="https://www.youtube.com/watch?v=xr7u11gtYgM"> <img src="https://img.youtube.com/vi/xr7u11gtYgM/maxresdefault.jpg" alt="Watch the Postgram demo video" /> </a> <br /> <sub>Watch the demo</sub> </td> <td width="50%"> <img src="assets/search.png" alt="Postgram search interface showing ranked knowledge results" /> <br /> <sub>Search across memories, documents, people, projects, and tasks</sub> </td> </tr> </table>

Why Postgram

  • One private corpus across tools. Give different agents and devices access to the same data without tying it to one editor or hosted memory provider.
  • Inspectable source data. Store typed entities instead of opaque chat summaries, then search, edit, link, archive, or delete them yourself.
  • Search before graph expansion. Hybrid retrieval finds relevant entities; edge summaries tell an agent when related graph context is worth following.
  • Working context is not durable memory. Session context has its own scope and lifecycle; grooming can archive it or distill selected context into durable memory.
  • Operator control. Choose where PostgreSQL runs, which embedding and extraction providers are allowed, who receives API keys, and what is kept.

Postgram is built for one person or a small trusted team running a local or single-VM deployment. It is not a hosted service or a multi-tenant SaaS platform. Knowledge extraction is optional, and the provided Docker Compose setup binds the raw API and UI ports to loopback by default.

Quick Start (Docker Compose)

You need Git, Docker, and Docker Compose. Node.js 22+ is needed only for local development or for installing the pgm CLI; gpg is needed only for encrypted CLI backups.

  1. Clone Postgram:

    git clone https://github.com/ivo-toby/postgram.git
    cd postgram
    
  2. Choose an embedding path before the first start. For the local default, install and start Ollama on the Docker host, then pull Postgram's default embedding model:

    ollama pull bge-m3
    

    For hosted OpenAI embeddings instead, create a .env file containing a real key before starting Compose:

    OPENAI_API_KEY=<your-openai-key>
    
  3. Start the stack:

    docker compose up -d --build
    

    The first run creates persistent Docker volumes for PostgreSQL and installation secrets. No .env file is required for the default Compose path.

  4. Read the one-time bootstrap token:

    docker compose logs mcp-server \
      | grep 'Bootstrap token:' \
      | tail -n 1
    

    The plaintext appears only in the original first-start logs. Capture it before recreating the API container or discarding those logs.

  5. Open http://127.0.0.1:3000/admin, paste the token, create the first admin, enroll MFA, and follow the onboarding flow.

  6. Confirm the selected provider in the Admin Config tab. If you add or change staged settings, save, validate, and apply them, then restart mcp-server when Admin marks a restart as required:

    docker compose restart mcp-server
    

    When Ollama runs on the Docker host, its base URL is http://host.docker.internal:11434. Optional LLM relationship extraction is disabled by default and can use OpenAI, Anthropic, Ollama, or an OpenAI-compatible endpoint. Changing the embedding provider, model, or dimensions after the first start is migration work and is blocked from a simple config apply.

  7. Check health, then create an API key in the Admin Overview tab. For the smoke test below, allow read and write, the memory entity type, and personal visibility:

    curl -fsS http://127.0.0.1:3100/health
    

    The response should include "status":"ok" and "postgres":"connected".

  8. Install the CLI and verify an authenticated write and search. Enrichment is asynchronous, so wait for pgm queue to report no pending work before the search:

    npm install -g @ivotoby/postgram-cli
    export PGM_API_URL=http://127.0.0.1:3100
    export PGM_API_KEY='<plaintext-api-key>'
    
    pgm store "Postgram quick start is working" \
      --type memory \
      --visibility personal \
      --tags quickstart
    pgm queue
    pgm search "quick start"
    

If embeddings are unreachable, Postgram still starts and accepts writes, but enrichment and search will fail until the provider is available. See the full quick start and troubleshooting guide for the longer path.

For access from ChatGPT, Claude, or another remote MCP client, put Postgram behind HTTPS, enable OAuth, and follow the MCP integration guide. Do not publish the loopback development ports directly to the internet.

What It Does

Postgram provides:

  • durable storage for typed entities: memory, person, project, task, interaction, document
  • hybrid BM25 + vector search with asynchronous enrichment
  • knowledge graph with typed directional edges between entities
  • LLM-powered relationship extraction (OpenAI, Anthropic, or Ollama)
  • document sync from local markdown repos via manifest comparison
  • browser interfaces for knowledge work and guarded administration
  • UMAP and PCA projections of embedded entities
  • GTD-style capture, task organization, and Kanban views
  • scoped API-key authentication and visibility restrictions
  • a REST API for application and automation access
  • a Streamable HTTP MCP endpoint for agent-native tool access
  • a CLI (pgm) for humans and agents
  • a container-local admin CLI (pgm-admin)
  • Talon SQLite migration tooling
  • encrypted backup support
  • audit logging for mutating and privileged operations

How It Works

Postgram is a TypeScript Node.js application built around a service layer.

Main components:

  • PostgreSQL + pgvector for persistence and vector search
  • Hono for the HTTP server
  • MCP over Streamable HTTP for agent-facing tool access
  • CLI/admin CLIs built with Commander
  • background enrichment worker for chunking, embeddings, and LLM extraction

High-level flow:

  1. a client stores or updates an entity
  2. the entity is written immediately
  3. enrichment runs asynchronously: chunking, embedding, and optionally LLM extraction
  4. chunks and embeddings are produced in the background
  5. edges are created from extracted relationships (if extraction is enabled)
  6. search queries use hybrid BM25 + vector scoring, with optional graph expansion

Main Features

1. Typed Knowledge Storage

Store structured knowledge objects with:

  • type (memory, person, project, task, interaction, document)
  • content
  • tags
  • visibility (personal, work, shared)
  • status
  • arbitrary JSON metadata

Memory Roles

Postgram supports two roles for memory entities:

  • durable_memory: long-term memory future agents should trust, such as decisions, preferences, constraints, root causes, and completed-work summaries.
  • session_context: working context for resuming recent conversations. Session context is scoped to the calling client, embedded for semantic recall, and skipped by graph extraction.

Use session context for "where were we in this thread?" Use durable memory for "what should future agents remember as true?"

CLI users can write session context with pgm memory session-context and search it with pgm search --memory-role session_context.

Operators can groom stale session context with pgm-admin memory groom. Use --client-id <client-id> for one client or --all-clients to batch over every session-context scope. --all-clients keeps each client scope separate; it is operational batching, not cross-client consolidation. --older-than <duration> defaults to 7d and accepts values like 30m, 4h, 7d, or 0d. --dry-run previews eligible memories without calling the LLM. Grooming has no default candidate cap; pass --limit <n> when you want to process a bounded batch. --mode archive --yes archives eligible working context directly. --mode promote --yes uses the configured extraction LLM to decide whether each session-context memory should be promoted; promoted memories are distilled into new durable_memory entities, the source context is archived, and provenance is recorded with metadata.promoted_to plus a promoted_to edge.

Authenticated users and agents can self-groom only their own client-scoped session context:

pgm memory groom --dry-run --older-than 7d
pgm memory groom --older-than 14d --topic postgram --tag session-context --yes

The normal CLI derives scope from PGM_API_KEY; it does not accept --client-id, --all-clients, or promotion mode. Archive requires --yes. Optional filters are --topic, --session-id, and repeatable --tag.

MCP clients can use the groom_session_context tool with the same self scope:

{
  "mode": "dry_run",
  "older_than": "7d",
  "topic": "postgram",
  "session_id": "optional-session-id",
  "tags": ["session-context"]
}

MCP mode is dry_run or archive; promotion remains admin-only.

For scheduled maintenance, run grooming from the host that has access to the Postgram container. This cron example assesses eligible session context for all client scopes every three days at 03:17 and appends JSON output to a log. The wrapper detects that cron does not provide a TTY and runs non-interactively:

17 3 */3 * * cd /path/to/postgram && ./bin/pgm-admin --json memory groom --all-clients --older-than 7d --mode promote --yes >> /var/log/postgram-memory-groom.log 2>&1

Use --mode archive --yes instead if you want to archive eligible working context without LLM-assisted promotion. Run the same command with --dry-run first to verify the eligible set.

Operators can also review durable memory quality without mutating the durable claim itself:

./bin/pgm-admin memory groom-durable --dry-run --older-than 30d
./bin/pgm-admin memory groom-durable --mode mark --yes --older-than 30d

Durable grooming selects active durable_memory rows, including legacy memory rows with no metadata.memory_role, and classifies them as keep, needs_grooming, archive, or superseded. Mark mode writes metadata.durable_grooming with the outcome, reason, review timestamp, and any LLM suggestions. It does not rewrite content, change status, archive rows, or merge duplicates.

To actually clean the marked rows, apply the grooming labels:

./bin/pgm-admin memory apply-durable-grooming --dry-run
./bin/pgm-admin memory apply-durable-grooming --yes

Apply mode defaults to auto: needs_grooming memories are rewritten

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars10
CategoryOperations
Updated1d ago
Forks4

Languages

TypeScript

Trust signals

92/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 low1 info