PostStreamDocs
Open app
Docs menu
← All docs

The @poststreamai/mcp package

The small program your AI app runs to talk to PostStream. Published on npm, MIT-licensed, no build step.

What it is

@poststreamai/mcp is a thin adapter: it speaks the MCP protocol to your AI app on one side, and makes authenticated REST calls to PostStream on the other. It has no database and stores no secrets — it just forwards your token. All the real checks (ownership, permissions, subscription) happen on the PostStream backend.

Links: npm ↗ · source on GitHub ↗

Install

You don't install it manually — your AI app's config runs it for you via npx, which fetches and caches it on first use:

shell
npx -y @poststreamai/mcp

That's exactly what the "command" / "args" lines in the connect guide do. It needs Node.js 20+.

Configuration

Configured entirely through environment variables (set in your app's MCP config, under env):

VariableRequiredPurpose
POSTSTREAM_TOKENYes (stdio)Your psk_live_… Personal Access Token.
POSTSTREAM_API_URLNoBackend base URL. Defaults to https://api.poststreamai.com — only set it to point at a local backend.
MCP_PUBLIC_URLNoPublic URL of this server when run in HTTP mode. Defaults to https://mcp.poststreamai.com.
PORTNoPort for HTTP mode (ignored by the stdio entrypoint). Defaults to 8787.
.env
POSTSTREAM_TOKEN=psk_live_xxxxxxxx
# optional — only to point at a non-production backend:
# POSTSTREAM_API_URL=http://localhost:8080
Keep POSTSTREAM_TOKEN out of source control. If it leaks, revoke it in Settings → AI agents and issue a new one.

stdio vs HTTP

  • stdio (default) — your AI app starts the process and talks to it over standard input/output. This is what the Claude Desktop / Cursor configs use.
  • HTTP — the same server as a hosted Streamable-HTTP endpoint. You don't run this yourself; PostStream hosts it at https://mcp.poststreamai.com/mcp for URL-only clients. See Any other client.

Versions & upgrading

npx -y @poststreamai/mcp always pulls the latest published version. To pin a specific one, add the version to the package name:

in your MCP config
"args": ["-y", "@poststreamai/mcp@0.2.0"]

Check the npm page ↗ for the current version and release notes. Upgrading is just bumping (or removing) that pin and restarting your AI app.