Connect MCP
Set up and query PostShiba from Cursor with the same API key you use for REST.
PostShiba runs an MCP server over streamable HTTP at https://app.postshiba.com/mcp. Every tool maps to a documented REST endpoint, with the same permissions and send gates, so an assistant can create clusters, add domains, and check delivery for you.
Before you start
You need a Send only, Full access, or Support key. See Create an API key.
Add the server to Cursor
- Open your MCP config. Use
~/.cursor/mcp.jsonfor every project, or.cursor/mcp.jsoninside one project. - Add the
postshibaserver and replaceYOUR_API_KEYwith your key. - Save. Cursor lists the PostShiba tools when the server connects.
The AI page in the dashboard shows this config for each agent. Right after you create a key there, it fills the key in.
Other agents
Your API key is the Bearer token. Every client sends it as Authorization: Bearer YOUR_API_KEY.
Claude Code, from your project folder:
Codex reads the key from an environment variable, so it stays out of the file. Add this to ~/.codex/config.toml, then run export POSTSHIBA_API_KEY=YOUR_API_KEY in your shell profile.
Windsurf uses serverUrl in mcp_config.json:
Any other client that supports Streamable HTTP with custom headers works with the same URL and header.
The key must go in the Authorization header. A token in the query string is rejected. Use app.postshiba.com, not postshiba.com.
What the tools can do
| Key | Tools |
|---|---|
| Send only | Four tools: whoami, send_email, send_template_email, and send_on_cluster. |
| Full access | Every /api/v1 endpoint in the REST API, such as create_cluster, create_sending_domain, send_email, and list_team_message_events. |
| Support | Five tools: whoami, lookup_recipient, get_analytics, get_status, and destroy_suppression. See Ask your assistant. |
Pick the smallest key that does the job. An assistant acts on whatever it reads, including text in emails, web pages, and files, so a prompt injection can call any tool the key allows. Use a Full access key while you set things up, then delete it if you don't need it. Give an agent that only sends mail a Send only key.
The team comes from the key, so tools never take a team id. MCP requests are limited to 600 per minute per key.
Send gates match REST. While your account is pending production approval, sends go only to team member emails, live inbox addresses, and inbox forward-to addresses. Anything else returns 403 kyc_required. See Does PostShiba require production approval?
Secrets stay out of tool results
MCP removes secrets from every response: webhook signing secrets, inbox webhook_secret, DKIM private keys, and SMTP passwords. Copy those from the dashboard.
The one exception is create_smtp_credential, which returns the new password once. Cluster create issues a default SMTP user but hides its password, so call create_smtp_credential when the assistant needs one.
Prompts to try
Paste one of these into Cursor after the server connects. The dashboard's AI page has the same prompts.
CLI skill
The postshiba CLI ships an agent skill that uses the same API key. Install it with postshiba skills install or npx skills add postshiba/postshiba-cli. It is also in the PostShiba Cursor plugin. See Send emails with the CLI.