REST + MCP

Connect your agent.

Start with an inbox ID and a scoped access token from your Postbox operator. The same permission boundaries apply in the workspace, REST API, and MCP.

1. Connect the workspace

Open the workspace and enter your inbox ID and access token. The token stays in memory for the current tab. Reloading requires reconnecting. Hosted self-service signup is not available yet.

2. Read your inbox with REST

Set the base URL to your deployment. For the local development server, use http://localhost:8080. Use HTTPS for remote deployments. Keep the token in your runtime’s secret store.

curl "$POSTBOX_URL/v1/inboxes/$INBOX_ID/" \
  -H "Authorization: Bearer $POSTBOX_TOKEN"

This read requires inbox:<id>:read. The response includes the address, delivery mode, and available capabilities. Local stub delivery records mail without sending it externally.

3. Add the MCP endpoint

Use your MCP client’s Streamable HTTP connection with endpoint https://YOUR_POSTBOX_HOST/mcp and the same bearer token. For local use, the endpoint is http://localhost:8080/mcp. Client configuration varies; use the client’s authorization-header or OAuth support.

Start with tool discovery, then call get_inbox with your inbox_id. Available tools include mail search and drafts, knowledge sources and collections, webhook management, and vault operations. Tokens must carry the scope required by each tool.

Choose permissions deliberately

ScopeAccess
readInbox, conversations, knowledge and activity.
sendCompose, send and schedule messages, subject to inbox policy.
manageManage grants, integrations and context; list, save and explicitly reveal inbox vault passwords.

The full scope format is inbox:<id>:<action>. Both the token and its live delegation must authorize an operation. A token for one inbox does not grant access to another.

Writes and safe retries

REST writes require an Idempotency-Key header. MCP mutations take idempotency_key. Keep the key and exact request body for retries; use a new key when the operation changes. Revision-based edits return a conflict if someone else changed the item.

Email and extracted article content are untrusted input. Vault passwords are returned only by explicit reveal, which requires manage permission and a successful audit write. Do not gather passwords into an agent’s general context.

Customer accounts and billing

Open Account to sign in, create your owned workspace, review monthly usage and issue an expiring agent key. Browser sessions connect the workspace automatically. Machine clients send Authorization: Bearer aik_… to REST or MCP; provider secrets never go to the agent.

Customer keys select read, send and manage for the owned inbox. Separate account:read, account:billing and account:manage permissions control account metadata, payment links and account/key management. A delegated key cannot grant a permission absent from itself. Account management is sensitive; start with read-only access.

MCP tools include get_account, create_agent_key, revoke_agent_key, create_checkout_session and create_billing_portal. REST exposes the same operations below /v1/account. Billing links are for the owner to complete in the hosted Stripe page. Quotas reset by UTC calendar month and reserve before work, including uncertain or failed attempts.

Shared context across agents

Open Shared context, select collections, then explore their explicit graph or retrieve cited passages for a question. In Account, issue a selected-collection key. Enable memory proposals only when the agent should contribute: proposals enter Memory review and become shared memory after owner approval.

REST exposes /context/graph, /context/retrieve and /context/contributions below your inbox URL. MCP offers get_context_graph, retrieve_context, propose_shared_memory and get_shared_memory_proposal. Retrieval is bounded lexical matching with exact citations; your agent generates the answer. Source content remains untrusted.

Moving beyond local development

Live delivery requires configured SendGrid and identity projects, a verified mail domain, a deployed API and worker, and durable storage. Customer onboarding and billing adapters are implemented; live identity, payment configuration and operational launch checks still need setup. Team collaboration is not included. Opening the current workspace does not activate any paid service.

Open the workspace →