MCPcopy Index your code
hub / github.com/actionbook/postagent

github.com/actionbook/postagent @v0.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.2 ↗ · + Follow
568 symbols 1,433 edges 29 files 47 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Postagent

One CLI for every app your agent needs.

No more installing a new MCP server or CLI for each app your agent uses. Postagent connects your AI agent to any API — Notion, Linear, GitHub, Slack, and more.

  • 🔌 No per-site setup — one npm install -g postagent covers every supported API
  • 🔍 Discover by intentpostagent search "create a doc on Notion" instead of reading docs
  • 🔐 Credentials stay local — API keys are injected at send time, never leaked into the LLM context

Install

npm install -g postagent

Quickstart

# Search related actions
postagent search "Create a document on Notion"

# Get detailed manual for an action
postagent manual notion pages create_page

# Auth and send request
postagent auth notion
postagent send -X POST https://api.notion.com/v1/pages \
  -H 'Authorization: Bearer $POSTAGENT.NOTION.API_KEY' \
  -H 'Notion-Version: 2022-06-28' \
  -H 'Content-Type: application/json' \
  -d '{"parent":{"page_id":"YOUR_PAGE_ID"},"properties":{"title":[{"text":{"content":"My Page"}}]}}'

The send command uses the same options as curl, so agents already know how to use it.

Postagent replaces the API_KEY placeholder with the actual key/token from local storage, keeping your credentials out of the LLM context entirely.

Add --dry-run to preview the resolved request (method, URL, headers, body) without making any outbound call. Sensitive headers are redacted in the preview:

postagent send https://api.github.com/user \
  -H 'Authorization: Bearer $POSTAGENT.GITHUB.TOKEN' \
  --dry-run

Usage with Agents

The easiest way is to just tell your agent to use it:

Postagent demo

Configuration

You can try and test Postagent without setting an API key. However, the no API key mode is rate limited to 10 requests per minute.

If you need more requests, you can get a free API key from Actionbook and set it using the following command:

postagent config set apiKey ak_xxxxxxxxxxxx

Or via environment variables:

export POSTAGENT_API_KEY=ak_xxxxxxxxxxxx

Commands

postagent search <query>                    # Search for related actions by natural language
postagent auth <site>                       # Complete an auth flow for a site
postagent manual <site> [group] [action]    # Get detailed manual for an action
postagent send [options]                    # Send a request to a site, the options is same as curl

Supported sites

Visit https://api.postagent.dev/supported-sites.md to get the full list of supported sites. We are continually expanding it.

Stay tuned

We move fast. Star Postagent on Github to support and get latest information.

star-postagent-original

Development

pnpm install
pnpm dev:watch

License

Apache-2.0

Core symbols most depended-on inside this repo

save_auth_to
called by 22
packages/postagent-core/src/token.rs
prepare
called by 17
packages/postagent-core/src/commands/send.rs
home
called by 14
packages/postagent-core/src/token.rs
make_method
called by 14
packages/postagent-core/src/oauth/refresh.rs
save_provider_pointer_to
called by 12
packages/postagent-core/src/token.rs
redact_url
called by 11
packages/postagent-core/src/request_preview.rs
render_with
called by 11
packages/postagent-core/src/markdown.rs
load_auth_from
called by 11
packages/postagent-core/src/token.rs

Shape

Function 498
Class 45
Method 14
Enum 11

Languages

Rust99%
TypeScript1%

Modules by API surface

packages/postagent-core/src/token.rs85 symbols
packages/postagent-core/src/commands/manual.rs71 symbols
packages/postagent-core/src/commands/auth.rs60 symbols
packages/postagent-core/src/commands/send.rs52 symbols
packages/postagent-core/src/request_preview.rs51 symbols
packages/postagent-core/src/oauth/loopback.rs24 symbols
packages/postagent-core/src/oauth/refresh.rs22 symbols
packages/postagent-core/src/oauth/exchange.rs22 symbols
packages/postagent-core/src/descriptor.rs22 symbols
packages/postagent-core/src/commands/search.rs22 symbols
packages/postagent-core/src/cli.rs21 symbols
packages/postagent-core/src/markdown.rs20 symbols

For agents

$ claude mcp add postagent \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact