# Whop + WordPress.com — Pipedream Connect

> Connect a user's Whop and WordPress.com accounts and expose tools for both apps directly in your product or your agent.

- Apps: Whop (`whop`) + WordPress.com (`wordpress_com`)
- This page (HTML): https://pipedream.com/apps/whop/integrations/wordpress-com
- One `external_user_id` owns both connected accounts, and each account stays independently revocable.

## One session, both toolsets (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: whop,wordpress_com`
- `x-pd-app-slug` takes a comma-separated list, so `whop,wordpress_com` is one session on one transport. Both toolsets arrive from a single `listTools()`, and a tool is called exactly as it would be in a single-app session.

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "whop,wordpress_com",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// One list, both toolsets: Whop and WordPress.com tools arrive
// together, each keyed by its own app's slug.

// e.g. run Create Checkout Session:
const result = await mcp.callTool({
  name: "whop-create-checkout-session",
  arguments: {
    affiliateCode: "Affiliate Code",
    metadata: "Metadata",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## Both apps from your backend

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const externalUserId = "{external_user_id}" // any stable ID for this user in your system

const [whopTools, wordpressComTools] =
  await Promise.all([
    pd.components.list({ app: "whop" }),
    pd.components.list({ app: "wordpress_com" }),
  ])

// One external user owns both connected accounts, so either app's tools
// run on their behalf with the same externalUserId.
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Whop

- API slug: `whop` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Commerce
- Website: https://whop.com/
- App page (HTML): https://pipedream.com/apps/whop
- Tools: 6 actions · 4 triggers

Full tool list, API proxy, and SDK quickstart: https://pipedream.com/apps/whop.md

### Actions (6)

- [Create Checkout Session](https://pipedream.com/apps/whop/actions/create-checkout-session.md) — `whop-create-checkout-session`
- [Create Promo Code](https://pipedream.com/apps/whop/actions/create-promo-code.md) — `whop-create-promo-code`
- [List Affiliate Code Options](https://pipedream.com/apps/whop/actions/list-affiliate-code-options.md) — `whop-list-affiliate-code-options`
- [List Membership ID Options](https://pipedream.com/apps/whop/actions/list-membership-id-options.md) — `whop-list-membership-id-options`
- [List Plan Id Options](https://pipedream.com/apps/whop/actions/list-plan-id-options.md) — `whop-list-plan-id-options`
- [Terminate Membership](https://pipedream.com/apps/whop/actions/terminate-membership.md) — `whop-terminate-membership`

### Triggers (4)

- [New Membership Invalidated (Instant)](https://pipedream.com/apps/whop/triggers/new-membership-invalidated-instant.md) — `whop-new-membership-invalidated-instant`
- [New Membership Validated (Instant)](https://pipedream.com/apps/whop/triggers/new-membership-validated-instant.md) — `whop-new-membership-validated-instant`
- [New Payment Failed (Instant)](https://pipedream.com/apps/whop/triggers/new-payment-failed-instant.md) — `whop-new-payment-failed-instant`
- [New Payment Succeeded (Instant)](https://pipedream.com/apps/whop/triggers/new-payment-succeeded-instant.md) — `whop-new-payment-succeeded-instant`

## WordPress.com

- API slug: `wordpress_com` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Productivity
- Website: https://wordpress.com/
- Managed OAuth scopes: `global`
- App page (HTML): https://pipedream.com/apps/wordpress-com
- Tools: 4 actions · 3 triggers

Full tool list, API proxy, and SDK quickstart: https://pipedream.com/apps/wordpress-com.md

### Actions (4)

- [Create New Post](https://pipedream.com/apps/wordpress-com/actions/create-post.md) — `wordpress_com-create-post`
- [Delete Post](https://pipedream.com/apps/wordpress-com/actions/delete-post.md) — `wordpress_com-delete-post`
- [List Site ID or Domain Options](https://pipedream.com/apps/wordpress-com/actions/list-site-id-options.md) — `wordpress_com-list-site-id-options`
- [Upload Media](https://pipedream.com/apps/wordpress-com/actions/upload-media.md) — `wordpress_com-upload-media`

### Triggers (3)

- [New Comment](https://pipedream.com/apps/wordpress-com/triggers/new-comment.md) — `wordpress_com-new-comment`
- [New Follower](https://pipedream.com/apps/wordpress-com/triggers/new-follower.md) — `wordpress_com-new-follower`
- [New Post](https://pipedream.com/apps/wordpress-com/triggers/new-post.md) — `wordpress_com-new-post`

---

- Whop: https://pipedream.com/apps/whop.md · WordPress.com: https://pipedream.com/apps/wordpress-com.md
- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
