# QStash — Pipedream Connect

> QStash is an HTTP based messaging and scheduling solution for the serverless and edge runtimes.

- API slug: `qstash` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Infrastructure & Cloud
- Website: https://console.upstash.com/
- This page (HTML): https://pipedream.com/apps/qstash
- Tools: 7 actions · 1 trigger

## Connect via MCP (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: qstash`

```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": "qstash",
      },
    },
  },
)

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

const { tools } = await mcp.listTools()

// e.g. run Create Endpoint:
const result = await mcp.callTool({
  name: "qstash-create-endpoint",
  arguments: {
    topicId: "QStash Topic",
    endpointUrl: "Endpoint URL",
  },
})
```

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

## SDK

```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 result = await pd.actions.run({
  id: "qstash-create-endpoint",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    qstash: { authProvisionId: "apn_xxxxxxx" },
    topicId: "QStash Topic",
    endpointUrl: "Endpoint URL",
  },
})
```

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

## Actions (7)

### `qstash-create-endpoint` — Create Endpoint (Write)

Create a new HTTP endpoint on a QStash topic.

Full schema: https://pipedream.com/apps/qstash/actions/create-endpoint.md

### `qstash-create-topic` — Create Topic (Write)

Create a new QStash topic that emits to multiple endpoints.

Full schema: https://pipedream.com/apps/qstash/actions/create-topic.md

### `qstash-list-endpoints` — List Endpoints (Read-only)

Lists all your existing QStash endpoints.

Full schema: https://pipedream.com/apps/qstash/actions/list-endpoints.md

### `qstash-list-topics` — List Topics (Read-only)

List all your existing QStash topics.

Full schema: https://pipedream.com/apps/qstash/actions/list-topics.md

### `qstash-publish-endpoint-message` — Publish Endpoint Message (Write)

Publish a message a callback endpoint

Full schema: https://pipedream.com/apps/qstash/actions/publish-endpoint-message.md

### `qstash-publish-topic-message` — Publish Topic Message (Write)

Publish a message to a topic

Full schema: https://pipedream.com/apps/qstash/actions/publish-topic-message.md

### `qstash-verify-webhook` — Verify Webhook (Read-only)

Verify an incoming QStash webhook to an endpoint. Only to be used with the Publish Endpoint action.

Full schema: https://pipedream.com/apps/qstash/actions/verify-webhook.md

## Triggers (1)

### `qstash-new-topic-webhook` — New Topic Webhook (Instant)

Emit new events on each new QStash topic message

Full schema: https://pipedream.com/apps/qstash/triggers/new-topic-webhook.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
