# Promoter MCP

Connect an agent to Promoter over hosted MCP or install the stdio client. Both use the workspace's scoped API key and the same REST commands.

## Let your assistant set you up

The [promoter-setup skill](https://promoter-app-asaf-katz-s-projects.vercel.app/skills/promoter-setup/SKILL.md) takes Claude or Codex through the whole setup with you: account, key, this connection, business details, teammates and your LinkedIn account. It never starts a campaign or turns sending on.

```sh
mkdir -p ~/.claude/skills/promoter-setup && curl -fsSL https://promoter-app-asaf-katz-s-projects.vercel.app/skills/promoter-setup/SKILL.md -o ~/.claude/skills/promoter-setup/SKILL.md
mkdir -p ~/.codex/skills/promoter-setup && curl -fsSL https://promoter-app-asaf-katz-s-projects.vercel.app/skills/promoter-setup/SKILL.md -o ~/.codex/skills/promoter-setup/SKILL.md
```

## Connect Codex to hosted MCP

1. [Create a free Promoter workspace](https://promoter-app-asaf-katz-s-projects.vercel.app/?signup=1&view=api), or [open API & MCP](https://promoter-app-asaf-katz-s-projects.vercel.app/?view=api) if you already have an account.
2. Select your workspace and create a key using the campaign drafting permissions. Add import permission for CSV or Sales Navigator if your workflow needs it. Keep sending permission separate until you want the agent to start reviewed campaigns.
3. Put the key in Codex's private environment as `PROMOTER_API_KEY`. Add this to Codex configuration:

```toml
[mcp_servers.promoter]
url = "https://promoter-app-asaf-katz-s-projects.vercel.app/mcp"
bearer_token_env_var = "PROMOTER_API_KEY"
default_tools_approval_mode = "writes"
```

The endpoint uses stateless Streamable HTTP. An unauthenticated connection offers only `promoter_get_started`, which returns the signup and documentation links. Workspace tools require the key. The custom ChatGPT plugin installation uses delegated OAuth, which is pending. See the [CTO outreach walkthrough](https://promoter-app-asaf-katz-s-projects.vercel.app/developers/linkedin-cto-outreach).

## Install without repository access

Download [promoter-mcp-0.9.0.tgz](https://promoter-app-asaf-katz-s-projects.vercel.app/downloads/promoter-mcp-0.9.0.tgz), extract it into a directory you control, and install the exact locked dependencies:

```sh
tar -xzf promoter-mcp-0.9.0.tgz
(cd /absolute/path/promoter-mcp-0.9.0 && npm ci --ignore-scripts)
node /absolute/path/promoter-mcp-0.9.0/server.mjs
```

Use Node.js 22.21 or newer. Installation uses the public npm registry for the official SDK and its locked dependencies. The archive contains source, README, package metadata and lockfile only; no keys, environment files, tests or `node_modules`. The separate download manifest records its hashes. Do not use `npx promoter-mcp`: this private client is not published to that registry name.

Version 0.9.0 adds the workspace's business details (read and save), renaming the workspace and cleaning lead names. Version 0.8.0 added workspace blacklist management and importing commenters and reactions from a LinkedIn post URL. The [0.6.0 archive](https://promoter-app-asaf-katz-s-projects.vercel.app/downloads/promoter-mcp-0.6.0.tgz) remains available for existing installations.

For a repository checkout, equivalent commands are:

```sh
(cd /absolute/path/to/repository/standalone/mcp && npm ci --ignore-scripts)
node /absolute/path/to/repository/standalone/mcp/server.mjs
```

All runtime imports resolve relative to the files. The launch command does not depend on the MCP client's current directory. Configure the private environment below before launching; the process expects an MCP client on stdin, rather than serving a browser page.

## Create and configure a workspace key

Sign in normally, select the intended workspace, and use **API & MCP** to create a key. Copy the one-time secret into your MCP client's private credential settings or a private environment file. Choose only the permissions needed; sending permission is separate from draft management. Never paste a key into chat, commit it, or put it in a command-line argument.

The process reads:

| Environment variable | Value |
|---|---|
| `PROMOTER_API_KEY` | Your private `pmk_` workspace API key. Required. No Supabase session token, service key or provider key is accepted. |
| `PROMOTER_API_BASE_URL` | Optional. Defaults to `https://promoter-app-asaf-katz-s-projects.vercel.app`. This release accepts that production origin or an explicit localhost/127.0.0.1/IPv6-loopback app for testing. |
| `PROMOTER_WORKSPACE_ID` | Optional UUID assertion. If supplied, it must match the key's bound workspace. If omitted, the key's workspace is used, without bootstrap or fallback. |

A client configuration has this shape. Replace the path and set the secret using your client's private credential mechanism; the placeholder is not a working key:

```json
{
  "mcpServers": {
    "promoter": {
      "command": "node",
      "args": ["/absolute/path/promoter-mcp-0.9.0/server.mjs"],
      "env": {
        "PROMOTER_API_BASE_URL": "https://promoter-app-asaf-katz-s-projects.vercel.app",
        "PROMOTER_WORKSPACE_ID": "<your-workspace-UUID>",
        "PROMOTER_API_KEY": "<your-private-workspace-key>"
      }
    }
  }
}
```

Alternatively, a local Node launch can use `node --env-file=/absolute/private/promoter.env /absolute/path/promoter-mcp-0.9.0/server.mjs`. Keep that environment file private. This setup does not change any global Codex/client configuration automatically.

## Permissions and tools

`promoter_get_access` shows the current actor, workspace, role and effective permissions. `tools/list` is filtered by those fresh permissions and native role limits. Every tool call checks access again; the application independently validates the same key, current canonical membership and native state.

| Scope | Tools and purpose |
|---|---|
| `read` | Workspace, sender/campaign/lead/action/import lists and details, billing/team status where role allows, operations, owner-only post reads |
| `campaigns:write` | Create/edit empty drafts, pause/stop/archive campaigns; owner or admin edits the business details, owner renames the workspace; inline contacts additionally need `leads:write`, and start additionally needs `sending:write` |
| `leads:write` | Add contacts, edit explicit personal facts before start, and soft remove recipients while preserving receipts/dedupe |
| `senders:write` | Manage a sender you connected or pause a workspace sender as owner. Enabling also needs `sending:write`. |
| `imports:write` | CSV preview/staging; selected commit additionally needs `leads:write`; owner-only Sales Navigator additionally needs `read` and actual premium entitlement |
| `team:write` | Current owner manages invitation/join links, explicitly sends or resumes exact-recipient email invitations, removes members or revokes invitations |
| `billing:write` | Current workspace owner opens a Stripe checkout or portal link for explicit payment review |
| `sending:write` | Explicit activation/enablement, combined with its resource permission. Does not bypass pacing, reply stop, capacity or provider restrictions |

API keys are workspace-wide over owned senders in this milestone. There is no per-sender key allowlist. Internal unlimited access does not grant a role or extra key scopes, and does not remove safety/provider read limits.

Creation/import tools leave outreach unstarted. Only explicit start/enable tools request those changes. A stopped or removed recipient retains delivery history and dedupe; removal cannot recall an accepted provider action. The native API may refuse removal/archive while work is in flight. Conditional graphs and six supported message variables use the same native validation and send guards as the app. Arbitrary provider actions and raw SQL/HTTP proxying are not exposed.

Provider login/consent, Hosted Auth completion, invitation acceptance, account signup and API-key lifecycle remain normal signed-in human flows. This client never obtains passwords, copies browser sessions, creates an impersonation token, handles provider API keys, runs cron/workers, or grants internal access. When a sender seat is available, the connection tool returns a Hosted Auth URL. Open it while signed into the same account.

## Team invitations and seat review

`promoter_invite_member` creates an invitation link for one exact verified email address and sends no email. `promoter_send_email_invitation` is a separate, explicit mail action: supply the exact recipient, role and a stable UUID `idempotency_key`. The server uses its configured invitation template, not arbitrary message text. This client exposes no general email-sending or resend tool.

Workspace membership is unlimited. Inviting or joining does not use sender seats. A reusable **operator-only** link permits unlimited uses by default or a specified maximum before expiry or revocation. Each person signs in with a confirmed email and accepts explicitly. Already active members keep their role. Removing or revoking a link does not remove existing members. The full secret URL is returned once at creation.

The Early Access plan is **$29 per LinkedIn sender per month**. A verified connection or active connection reservation uses a sender seat. At capacity, `promoter_begin_connection` returns `status: "sender_seat_required"` and an open request ID. Promoter requests one email notification to the workspace owner. Only the owner can choose a total sender quantity in Stripe. After the signed payment update confirms capacity, the member can retry the connection.

An older invitation delivery in `awaiting_capacity` can still be resumed explicitly using its saved ID. Status reads, checkout returns and webhooks never resume it automatically. Provider acceptance confirms the provider received an email request. Uncertain email outcomes are held for review.

## Failures and receipts

Requests have a 45-second bound and a 4-MiB response ceiling. There is no automatic pagination or request retry. Follow the API pagination cursor/offset deliberately and preserve explicit import idempotency keys. Use paginated lead/action tools for complete collections; campaign detail is a bounded view.

Tool errors return a sanitized code, HTTP status when known, `ambiguous_write`, and `automatic_retry:false`. A timeout or uncertain successful-response read after a write is not proof of failure. Inspect the saved campaign/import/action before another mutation. Do not repeat an uncertain send or start another campaign to evade a receipt hold.

stdout carries MCP protocol only. Diagnostics do not print arguments, raw API errors, environment values or keys. Successful human handoff links are returned to the authorized caller, so treat them as private. Revoking a key or its creator's membership takes effect at the API boundary; an already accepted external action may still settle and retain its receipt.

## API reference and protocol

The normal API contract is available at [GET /api/openapi](https://promoter-app-asaf-katz-s-projects.vercel.app/api/openapi). The source registry and coverage matrix distinguish implemented tools from human-only and server-only operations.

This client pins the official `@modelcontextprotocol/sdk` 1.32.2 and Zod 4.6.7. The SDK owns stdio framing, negotiation and tool protocol validation; this is not a hand-written echo of a requested protocol version. Its latest supported protocol is `2025-11-25`, with `2025-06-18`, `2025-03-26`, `2024-11-05` and `2024-10-07` compatibility. The later `2026-07-28` specification is not claimed. Official references: [stdio transport](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports), [stdio credential guidance](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization), [official SDK](https://github.com/modelcontextprotocol/typescript-sdk).


## Duration, personalization and conditional sequences

Call `promoter_get_sequence_capabilities` for the exact live field, condition and duration registry. `promoter_normalize_delay` accepts `{"value":2,"unit":"hours"}` and returns `{"type":"wait","minutes":120}`; whole days mean 24 elapsed hours. Wait nodes accept either canonical minutes or `duration: {value, unit}`. Promoter stores integer minutes (5..129600, multiples of 5). Call `promoter_validate_sequence` before connecting a sender to check a full graph and get back normalized steps. Sender spacing and limits can delay work further.

Contacts and CSV mapping support `first_name`, `last_name`, `display_name`, `company_name`, `job_title`, `location`. A CSV column called full_name can be explicitly mapped to display_name; no names or current employer are inferred. Omit an unknown field; an explicit empty string means empty. Do not provide provenance, provider credentials or generated facts. Templates use exactly these six `{{field_name}}` tokens. `promoter_update_lead_personalization` edits a recipient before start with explicit user provenance. Started snapshots remain immutable. `promoter_preview_campaign` takes actual `campaign_id`/`lead_id`, shows exact rendered text and missing facts, and performs no provider calls or sends.

Existing linear steps need no format field. For branches, choose `sequence_format: "graph_v1"`, an explicit `entry_node_id`, and stable lowercase node IDs. Every action/wait has `next`; a condition has `on_true`, `on_false`, and `on_unknown: "review"`. Targets are node IDs or terminal `complete`/`review`. Maximum 20 nodes; loops, unreachable nodes and missing destinations are rejected. Conditions are `connected`, `invitation_pending`, or `data` with one of the six fields and operator `exists`, `contains`, or `not_contains` (substring comparisons are case-sensitive). Unknown stays unknown and requires review. The native lease-fenced decision log is available via `promoter_list_condition_decisions`.

Example steps for an already-connected branch, with a two-hour wait after either a confirmed existing connection or observed invitation acceptance:

```json
{
  "sequence_format":"graph_v1",
  "entry_node_id":"connection",
  "steps":[
    {"id":"connection","type":"condition","condition":"connected","on_true":"delay","on_false":"invite","on_unknown":"review"},
    {"id":"invite","type":"connection_request","note":"Hi {{first_name}}","next":"delay"},
    {"id":"delay","type":"wait","minutes":120,"next":"welcome"},
    {"id":"welcome","type":"message","text":"Hi {{first_name}} {{last_name}}, how are things at {{company_name}}?","next":"complete"}
  ]
}
```

Supply the campaign name and sender account ID through the creation tool, then add actual recipients with the required explicit facts. This example does not enable a sender or start outreach. Current connection/reply evidence is checked before outbound work regardless of the selected branch. A fresh inbound reply stops every remaining branch. A day unit does not configure working-day schedules, and connection/Premium status never grants an unsupported InMail action.

## Reading a large campaign

`promoter_get_campaign` returns counts of people by state and at most the first 100 recipients and actions; `has_more` says there are more. Read every recipient with `promoter_list_campaign_people` and every action with `promoter_list_campaign_activity`, passing `pagination.next_cursor` back as `cursor` until `has_more` is false.

## Workspace lead library and background imports

The library is separate from campaign enrollments. Store up to1,000 explicit contacts per CSV/JSON batch, organize reusable named lists, search/filter, edit six facts and CRM notes/status with an expected revision, suppress future outreach or archive a lead. Known imported facts are preserved on duplicate intake. Existing campaign snapshots keep their data; future enrollments capture current library revision.

Queue selected IDs into a campaign using a stable idempotency key. Draft/paused campaigns stay inactive. Queueing into a running campaign additionally requires sending:write and may make recipients due immediately. Sender-global deduplication and native limits remain authoritative.

Resumable discovery sources include Sales Navigator filters, a native people-search URL, a saved lead list, and the people who reacted to or commented on a LinkedIn post. Create a job with a sender, source and idempotency key. Results enter the workspace library. Jobs retain their progress when a read budget is exhausted and support pause, resume and cancel.

In hosted MCP or stdio client 0.7.0 and later, use `promoter_create_discovery_job` with `source_kind: "post_comments"` or `"post_reactions"` and `source: {"post_url": "<link copied from the LinkedIn post>"}`. The sender must be able to view the post. Read the results with `promoter_list_discovery_items`. The same request works with `POST /api/discovery`.

Safe library tables use tenant RLS and authenticated read-only policies. Browser mutations and worker RPCs are denied. Raw job leases/authorization metadata remain server-only and absent from API/MCP output. Every command rechecks actor, tenant, current scopes and native guards. API keys cannot provision credentials or impersonate another workspace.

## Workspace blacklist

The workspace owner can use `promoter_list_blacklist` to read blocked LinkedIn profiles and `promoter_add_blacklist_entry` to block a profile by URL. Add a reason when it helps your team understand the block. Matching imports are labeled Blacklisted, and outreach to those profiles is blocked across the workspace.

`promoter_remove_blacklist_entry` requires both `leads:write` and `sending:write`. Confirm intent before removing a block. Removal allows future outreach and preserves the history of actions already stopped.
