Postgram MCP Server

Self-hosted memory for AI agents with hybrid search, knowledge graphs, tasks, and document sync.

Remote serverstreamable-httpTypeScript

What is the Postgram MCP server?

Postgram MCP server is a hosted integration for AI assistants that speak the Model Context Protocol. Self-hosted memory for AI agents with hybrid search, knowledge graphs, tasks, and document sync.

What you get

A self-hosted productivity and knowledge backend for humans and AI agents.

  • One private corpus across tools. — Give different agents and devices access
  • Inspectable source data. — Store typed entities instead of opaque chat
  • Search before graph expansion. — Hybrid retrieval finds relevant entities;
  • Working context is not durable memory. — Session context has its own scope
  • Operator control. — Choose where PostgreSQL runs, which embedding and

What the assistant can call

Once Postgram is connected, these are the calls the assistant has available:

  • Server — The Server tool exposed by this server

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

Configuration and credentials

You will need 8 environment variables: PGM_API_URL, PGM_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, OLLAMA_BASE_URL, ADMIN_MFA_SECRET_KEY, ADMIN_SETTINGS_ENCRYPTION_KEY, POSTGRES_HOST. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Docker and Docker Compose for the recommended deployment - Node.js 22+ for the pgm CLI or local development - a reachable OpenAI or Ollama embedding provider for enrichment and search Optional: - OpenAI API key (for OpenAI embeddings or extraction) - Anthropic API key (for LLM extraction) - Ollama (for local embeddings or LLM extraction) - gpg (for encrypted CLI backups)

Choosing this one

Plenty of knowledge and memory servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Postgram's toolset — Server — is a fair guide to whether it matches your workflow. It is maintained by ivo-toby; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the postgram mcp server does with a few real requests.

Available tools

ToolWhat it does
ServerThe Server tool exposed by this server.

How to install the Postgram MCP server

{
  "mcpServers": {
    "postgram": {
      "command": "npx",
      "args": ["-y", "@ivotoby/postgram-cli"],
      "env": {
        "PGM_API_URL": "your-value",
        "PGM_API_KEY": "your-value",
        "OPENAI_API_KEY": "your-value",
        "ANTHROPIC_API_KEY": "your-value",
        "OLLAMA_BASE_URL": "your-value",
        "ADMIN_MFA_SECRET_KEY": "your-value",
        "ADMIN_SETTINGS_ENCRYPTION_KEY": "your-value",
        "POSTGRES_HOST": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Docker and Docker Compose for the recommended deployment - Node.js 22+ for the pgm CLI or local development - a reachable OpenAI or Ollama embedding provider for enrichment and search Optional: - OpenAI API key (for OpenAI embeddings or extraction) - Anthropic API key (for LLM extraction) - Ollama (for local embeddings or LLM extraction) - gpg (for encrypted CLI backups)
VariableDescriptionRequired
PGM_API_URLEndpoint or connection string the server talks to.Yes
PGM_API_KEYCredential the server authenticates with.Yes
OPENAI_API_KEYCredential the server authenticates with.Yes
ANTHROPIC_API_KEYCredential the server authenticates with.Yes
OLLAMA_BASE_URLEndpoint or connection string the server talks to.Yes
ADMIN_MFA_SECRET_KEYCredential the server authenticates with.Yes
ADMIN_SETTINGS_ENCRYPTION_KEYCredential the server authenticates with.Yes
POSTGRES_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use Postgram to Server.

Frequently asked questions

It connects Postgram to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Server) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Postgram directly.