@zapier/zapier-sdk-mcp

中文文档
0.28.3发布于 2026/11/03SEE LICENSE IN LICENSETypeScriptES Module

MCP server for Zapier SDK

原始使用文档
文档目录28 节
  1. What is MCP?
  2. Installation
  3. Usage
  4. Starting the MCP Server
  5. Using with Claude Code
  6. Programmatic Usage
  7. Stability
  8. How It Works
  9. Available Tools
  10. Error Handling
  11. Architecture
  12. Development
  13. Building
  14. Testing
  15. Table of Contents
  16. Available Tools
  17. Accounts
  18. Actions
  19. Apps
  20. Client Credentials
  21. Connections
  22. HTTP Requests
  23. Human Inputs (Experimental)
  24. Next Gen Zaps (Beta)
  25. Next Gen Zaps (Experimental)
  26. Tables
  27. Triggers
  28. Virtual File System (Experimental)

Zapier SDK MCP Server

A MCP (Model Context Protocol) server implementation for the Zapier SDK, allowing AI assistants to interact with Zapier's APIs through a standardized protocol.

What is MCP?

The Model Context Protocol (MCP) is a protocol developed by Anthropic that enables AI assistants like Claude and Cursor to interact with external tools and data sources through a standardized interface. This package creates an MCP server that exposes all Zapier SDK functions as MCP tools.

Installation

This package is part of the Zapier SDK monorepo and is automatically installed when you install the CLI:

npm install -D @zapier/zapier-sdk-cli

Usage

Starting the MCP Server

You can start the MCP server using the CLI:

# Start the MCP server
npx zapier-sdk mcp

# Enable debug logging
npx zapier-sdk mcp --debug

Using with Claude Code

To use this MCP server with Claude Code, add it to your MCP configuration:

{
  "mcpServers": {
    "zapier-sdk": {
      "command": "npx",
      "args": ["zapier-sdk", "mcp"]
    }
  }
}

Programmatic Usage

You can also use the server programmatically:

import { createZapierMcpServer, startMcpServer } from "@zapier/zapier-sdk-mcp";

// Create and configure the server
const server = createZapierMcpServer({ debug: true });

// Or start it directly
await startMcpServer({ debug: true });

Stability

Every tool belongs to one of three stability tiers. Stable tools are exposed by default; opt into wider tiers with ZapierMcpServerOptions.stability, --stability <level> on zapier-sdk mcp, or ZAPIER_STABILITY=<level> in the environment.

TierContract
StableThe surface we intend to keep. While the SDK is in Open Beta (0.x), a breaking change can still land in a minor release; we deprecate first where we can, and every one is called out in the changelog with a migration note.
BetaFunctionally complete and ready to build against, but the shape may still change as it settles. Changes land in minor releases with a changelog migration note, without a deprecation period.
ExperimentalStill being designed; may change shape or disappear in any release, without notice.

Non-stable tool descriptions are prefixed with [Beta] / [Experimental] so agents see the tier inline.

How It Works

The MCP server:

  1. Dynamically discovers all available Zapier SDK functions from the SDK's internal registry
  2. Converts function schemas from Zod format (used internally by the SDK) to JSON Schema format (required by MCP)
  3. Exposes functions as MCP tools with kebab-case naming (e.g., listApps becomes list-apps)
  4. Handles tool execution by validating inputs, calling the appropriate SDK function, and returning results

Available Tools

All Zapier SDK functions are automatically exposed as MCP tools:

  • list-apps - List available Zapier apps
  • list-actions - List actions for a specific app
  • get-action - Get details about a specific action
  • run-action - Execute a Zapier action
  • list-connections - List your connections
  • And many more...

Error Handling

The server provides comprehensive error handling:

  • Validation errors include the expected input schema
  • Unknown tools list all available alternatives
  • Execution errors provide context about which function failed
  • Debug mode provides detailed error logging

Architecture

AI Assistant (Claude)
      ↓ MCP Protocol
MCP Server (@zapier/zapier-sdk-mcp)
      ↓ Function Calls
Zapier SDK (@zapier/zapier-sdk)
      ↓ HTTP Requests
Zapier APIs

The MCP server acts as an adapter, translating between the MCP protocol and the Zapier SDK's function-based interface.

Development

Building

pnpm build

Testing

pnpm test

Table of Contents

Available Tools

All SDK functions are automatically exposed as MCP tools using kebab-case naming.

Accounts

Your Zapier user account, the one the SDK is signed in as. Use these to check who that is.

get-profile

Get current user's profile information

Actions

An action is something an app can do, like sending an email or creating a contact. Use these to find an app's actions, see what inputs they need, and run them directly, outside a Zap.

create-action-run

Start an action run and return its ID without waiting for the result. Running an action is asynchronous: this hands back a run ID immediately, and getActionRun fetches the outcome. Reach for this pair when you want to start work and collect it later (fan out many runs, hand the ID to another process, survive a restart). runAction is the one-call form that starts a run and waits for its result.

get-action

Get detailed information about a specific action

get-action-input-fields-schema

Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.

get-action-run

Fetch the current state of an action run started by createActionRun. This is a point-in-time read that returns immediately: a run Zapier has not finished executing comes back with status waiting, so call again to check for a result. runAction starts a run and waits for its result in one call. Results are stored for seven days after the run was created.

list-action-input-field-choices

Get the available choices for a dynamic dropdown input field

list-action-input-fields

Get the input fields required for a specific action

list-actions

List all actions for a specific app

run-action

Execute an action with the given inputs and wait for its results. Each result page includes the action run ID in meta.id.

Apps

An app is a web service that connects with Zapier, like Gmail or Slack. Use these to find apps and the keys other methods use to refer to them.

get-app

Get detailed information about a specific app

list-apps

List all available apps with optional filtering

Client Credentials

SDK client credentials are a client ID and client secret that authenticate your code to the Zapier SDK, separate from the connections that authenticate apps. Use these to create, list, and revoke them.

create-client-credentials

Create new client credentials for the authenticated user

delete-client-credentials

Delete client credentials by client ID

list-client-credentials

List client credentials for the authenticated user

Connections

A connection is an authenticated link between Zapier and your account in an app, like your company's Slack workspace, made with OAuth or an API key. Use these to find existing connections or create new ones for actions, triggers, and API requests to use.

create-connection

Create a new app connection, end-to-end. Mints the start URL via get-connection-start-url, prints it to stderr, opportunistically opens it in a browser when it looks safe to do so (skipping CI / SSH / headless-Linux by default — pass --browser always to force, --browser never to suppress), then polls via wait-for-new-connection until the user completes OAuth and the new connection appears. Returns the connection.

This is the right command for most callers. Reach for the lower-level building blocks when you want either of: (a) hand off the URL and not block on completion — call get-connection-start-url alone, no wait-for-new-connection needed, or (b) do something custom between minting the URL and waiting — call get-connection-start-url, do your work (email or DM the URL, render a QR code, etc.), then wait-for-new-connection.

find-first-connection

Find the first connection matching the criteria

find-unique-connection

Find a unique connection matching the criteria

get-connection

Get details for a specific connection

get-connection-start-url

Mint a short-lived URL that begins an SDK-initiated connection flow. The URL is signed by zapier.com and bound to the current user/account — opening it in a different browser session will fail the binding check. Returns the URL as data so the caller decides what to do with it.

Use this directly (rather than the higher-level create-connection) when you want either of: (a) hand off the URL and not block waiting for completion — call this alone, skip wait-for-new-connection entirely, or (b) do something custom between minting the URL and waiting for the connection — call this, then email or DM the URL, render it as a QR code for mobile sign-in, etc., then call wait-for-new-connection. For the common case where you'd just print and poll back-to-back, create-connection is one call.

Pair with wait-for-new-connection to detect completion: pass the startedAt returned here straight through (it's the server's mint time, so polling isn't affected by client clock skew). Example (JS):

const {
  data: { url, app, startedAt },
} = await zapier.getConnectionStartUrl({ app: "slack" });
// hand `url` off — print it, DM it, email it, render a button, whatever
const { data: conn } = await zapier.waitForNewConnection({ app, startedAt });

list-connections

List available connections with optional filtering

wait-for-new-connection

Wait for a new connection to appear for the given app. Polls the connections list newest-first until the most recent matching row's date is at or after the started-at timestamp, then returns it. Pair with get-connection-start-url — that mints the URL the user opens, this waits for the resulting connection to land. Errors with a timeout after the configured timeout (default 5 min). Example (JS):

const {
  data: { url, app, startedAt },
} = await zapier.getConnectionStartUrl({ app: "slack" });
// show `url` to the user via the channel they're reading from
const { data: conn } = await zapier.waitForNewConnection({ app, startedAt });

HTTP Requests

Make authenticated requests to an app's API through Zapier's API proxy, using a connection's credentials so your code never handles tokens or keys. Useful when an app's actions don't cover what you need.

fetch

Make authenticated HTTP requests to any API through Zapier. Pass a connectionId to automatically inject the user's stored credentials (OAuth tokens, API keys, etc.) into the outgoing request. Mirrors the native fetch(url, init?) signature with additional Zapier-specific options.

Human Inputs (Experimental)

Collect information from people with Zapier Forms. Use these to create a form and share its link to gather responses.

ℹ️ Experimental. Still being designed; may change shape or disappear in any release, without notice. Pass --stability experimental to zapier-sdk mcp, or set ZAPIER_STABILITY=experimental in the environment, to use these tools.

create-form 🧪 experimental

Create a Zapier Form from a title and optional fields. Forms publish by default and return a shareable hosted_url; set draft to save without publishing.

Next Gen Zaps (Beta)

Next Gen Zaps are a new version of Zaps that run on code, which makes them easier for agents and AI tools to understand. Use these to build, test, publish, and run Next Gen Zaps, and to check on their runs.

ℹ️ Beta. Functionally complete and ready to build against, but the shape may still change as it settles. Changes land in minor releases with a changelog migration note, without a deprecation period. Pass --stability beta to zapier-sdk mcp, or set ZAPIER_STABILITY=beta in the environment, to use these tools.

cancel-durable-run 🧪 beta

Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal.

create-workflow 🧪 beta

Create a durable workflow container. Starts disabled with no version; publish a version to add code.

create-workflow-draft 🧪 beta

Fork a new draft from the workflow's current live version (or a blank stub before the first publish)

delete-workflow 🧪 beta

Delete a durable workflow. Throws ZapierNotFoundError if the workflow doesn't exist; callers wanting idempotency should catch that themselves.

disable-workflow 🧪 beta

Disable a durable workflow so it stops accepting triggers

discard-workflow-draft 🧪 beta

Discard an open workflow draft (soft delete). The draft's unpublished edits stop resolving; the published version is untouched.

enable-workflow 🧪 beta

Enable a durable workflow so it accepts triggers

get-durable-run 🧪 beta

Get the full state of a run-once durable run, including its operations journal

get-trigger-run 🧪 beta

Get the workflow run associated with a deployed workflow's trigger. Useful immediately after firing a trigger, when you have the trigger ID but not yet the run ID. With waitSeconds, the read also waits for the run to be created and to end.

get-workflow 🧪 beta

Get a durable workflow with its current version details and trigger claim status

get-workflow-draft 🧪 beta

Get full details of a workflow draft including source files

get-workflow-run 🧪 beta

Get the current state of a workflow run — a live run of a published workflow version, or a draft run launched via runWorkflowDraft (the kind field says which)

get-workflow-version 🧪 beta

Get full details of a workflow version including source files

import-workflow 🧪 beta

Convert an existing Zap into a durable workflow. Transforms the Zap's latest published version (falling back to its draft only when the Zap has never been published) and puts the resulting source in an open draft. The workflow is created disabled with no published version, so publish the draft to make it live. The original Zap is untouched and keeps running.

list-durable-runs 🧪 beta

List run-once durable runs for the authenticated account, newest first

list-workflow-drafts 🧪 beta

List drafts for a workflow, most recently edited first (open drafts by default)

list-workflow-runs 🧪 beta

List workflow runs for a specific workflow, newest first. Live runs (of published versions) and draft runs share the one list; pass kind to narrow it to one.

list-workflow-versions 🧪 beta

List published versions for a workflow, newest first

list-workflows 🧪 beta

List all active durable workflows for the authenticated account

publish-workflow-draft 🧪 beta

Publish an open draft as a new immutable workflow version. Advances the workflow's live pointer and discards the draft — publish consumes it, so an open draft always means unpublished work. Continue editing by creating a new draft, which forks from the just-published version.

publish-workflow-version 🧪 beta

Publish a new version of a durable workflow. Enables the workflow by default.

run-durable 🧪 beta

Run a workflow's complete source-files map as a run-once durable run on code-substrate-runner (no deployed workflow required). Send every file the workflow needs, not only its entry point. Returns the run ID immediately; poll via getDurableRun for terminal status.

run-workflow 🧪 beta

Run a published workflow and wait for its result: fires the workflow's trigger as the authenticated account, then returns the run once it is finished, failed or cancelled, with output set when it finished. Waits up to 60 seconds unless waitSeconds says otherwise. A run that has not ended after waitSeconds is returned with its current status; wait on it again with getWorkflowRun and waitSeconds.

run-workflow-draft 🧪 beta

Launch a draft test run: execute the draft's current source without publishing it. The draft's payload is snapshotted onto the run at creation, so later edits (or discarding the draft) never change what the run executed. Draft runs are free (not task-charged) and rate limited per user. Without waitSeconds the run comes back at once, initialized; follow it with getWorkflowRun, or list it via listWorkflowRuns with kind: "draft". With waitSeconds, the run is returned once it ends (or as it stands when the wait runs out), with output set when it finished.

trigger-workflow 🧪 beta

Look up a workflow's trigger URL and fire it manually, as the authenticated account.

update-workflow 🧪 beta

Update a durable workflow's name and/or description

update-workflow-draft 🧪 beta

Update (autosave) an open workflow draft

validate-workflow 🧪 beta

Validate durable workflow source without publishing it. Returns source diagnostics; issue kinds are extensible and may be unfamiliar to the client.

Next Gen Zaps (Experimental)

Next Gen Zaps are a new version of Zaps that run on code, which makes them easier for agents and AI tools to understand. Use these to build, test, publish, and run Next Gen Zaps, and to check on their runs.

ℹ️ Experimental. Still being designed; may change shape or disappear in any release, without notice. Pass --stability experimental to zapier-sdk mcp, or set ZAPIER_STABILITY=experimental in the environment, to use these tools.

disable-agentic-management 🧪 experimental

Stop Agentic Management from working on one workflow. Its settings are kept, not deleted: the modes and auto-approve choice stay on file, so calling enableAgenticManagement later resumes with those settings instead of the defaults.

enable-agentic-management 🧪 experimental

Put one workflow under Agentic Management. A workflow disabled earlier comes back with the modes and auto-approve choice it had, unless you pass new ones here.

get-agentic-management-config 🧪 experimental

Read the Agentic Management config for one workflow.

get-agentic-management-intent 🧪 experimental

Read the intent recorded for one workflow version: the plain-language description of what that version of the workflow is meant to do.

update-agentic-management-config 🧪 experimental

Change the modes a workflow runs, whether fixes are applied without approval, or both. A modes list replaces the whole current set rather than adding to it.

update-agentic-management-intent 🧪 experimental

Record what one workflow version is meant to do. Writing again for the same version replaces the text already stored, so there is no separate create and update.

Tables

Tables is Zapier's database tool for storing and managing data. Use these to manage tables, their fields, and their records.

create-table

Create a new table

create-table-fields

Create one or more fields in a table

create-table-records

Create one or more records in a table

delete-table

Delete a table by its ID

delete-table-fields

Delete one or more fields from a table

delete-table-records

Delete one or more records from a table

get-table

Get detailed information about a specific table

get-table-record

Get a single record from a table by ID

list-table-fields

List fields for a table

list-table-records

List records in a table with optional filtering and sorting

list-tables

List tables available to the authenticated user

update-table-records

Update one or more records in a table

Triggers

A trigger is an event in an app that starts your automation, like a new email received. Use these to find an app's triggers and receive their events directly in your code, outside a Zap.

ack-trigger-inbox-messages

Acknowledge messages from a lease. Acked messages are removed from the inbox; unacked ones return to the available pool when the lease expires.

create-trigger-inbox

Create a new trigger inbox subscription. Always creates a new inbox; use ensureTriggerInbox for get-or-create on a stable key.

delete-trigger-inbox

Mark a trigger inbox for deletion

ensure-trigger-inbox

Get-or-create a trigger inbox by key. Idempotent on (user, account, key): returns the existing inbox if a matching subscription is registered, creates a new one otherwise. Throws ZapierConflictError if the key exists with a different subscription.

get-trigger-inbox

Get details of a trigger inbox by ID

get-trigger-input-fields-schema

Get the JSON Schema representation of input fields for a trigger. Returns a JSON Schema object describing the structure, types, and validation rules for the trigger's input parameters.

lease-trigger-inbox-messages

Lease up to N messages from a trigger inbox. Returns messages plus a lease ID; ack within the lease window to remove from the inbox.

list-trigger-inbox-messages

List messages in a trigger inbox (no payload, status-only)

list-trigger-inboxes

List all trigger inboxes for the authenticated user

list-trigger-input-field-choices

Get the available choices for a dynamic dropdown input field on a trigger

list-trigger-input-fields

Get the input fields required for a specific trigger

list-triggers

List all triggers for a specific app

pause-trigger-inbox

Pause a trigger inbox; events stop being collected

release-trigger-inbox-messages

Release messages from a lease back to the inbox without acknowledging them. Released messages become immediately available for re-leasing. The lease attempt still counts against the per-message lease limit; releasing does not refund the attempt.

resume-trigger-inbox

Resume a paused trigger inbox; events resume being collected

update-trigger-inbox

Update settings on an existing trigger inbox

Virtual File System (Experimental)

The Virtual File System is file storage hosted by Zapier. Use these to read, write, and organize files and folders.

ℹ️ Experimental. Still being designed; may change shape or disappear in any release, without notice. Pass --stability experimental to zapier-sdk mcp, or set ZAPIER_STABILITY=experimental in the environment, to use these tools.

append-vfs-file 🧪 experimental

Append content to a file in the Zapier Virtual File System (VFS). Creates the file if it doesn't exist; missing parent directories are created automatically. Safer than reading the file and rewriting it — appends server-side without a read/write round-trip. Paths are absolute (e.g. /Mine/log.md).

copy-vfs-file 🧪 experimental

Copy a file to a new path in the Zapier Virtual File System (VFS). Both from and to are absolute file paths (e.g. /Mine/notes.md), not directories.

create-vfs-directory 🧪 experimental

Create a directory in the Zapier Virtual File System (VFS). Paths are absolute (e.g. /Mine/notes). Idempotent — safe to call on an existing directory.

delete-vfs-path 🧪 experimental

Delete a file or directory in the Zapier Virtual File System (VFS). Works on either; paths are absolute (e.g. /Mine/notes.md). Deletes are recoverable — contact Zapier support to restore an entry.

list-vfs-directory 🧪 experimental

List one page of a directory's contents in the Zapier Virtual File System (VFS). Paths are absolute (e.g. /Mine). Pass the previous page's nextCursor back in cursor to fetch the next page.

move-vfs-path 🧪 experimental

Move (rename) a file or directory in the Zapier Virtual File System (VFS). Both from and to are absolute paths (e.g. /Mine/notes.md). Fails if an entry already exists at to — delete or rename it first.

read-vfs-file 🧪 experimental

Read a file from the Zapier Virtual File System (VFS), the file store behind your context repository. Paths are absolute, e.g. /Mine/notes.md. Returns the content as a UTF-8 string with its size, version, and last-modified time.

stat-vfs-path 🧪 experimental

Inspect metadata for any path (file, directory, shortcut, or stream) in the Zapier Virtual File System (VFS). Paths are absolute (e.g. /Mine/notes.md). Check the type field before reading fields that only exist for certain types.

write-vfs-file 🧪 experimental

Write (create or overwrite) a file in the Zapier Virtual File System (VFS). Paths are absolute (e.g. /Mine/notes.md); missing parent directories are created automatically.

版本与发布记录

@zapier/zapier-sdk-mcp 共发布 267 个版本,首次发布于 2025/08/28;过去 12 个月发布了 236 个版本。

版本发布日期距今
0.28.3latest2026/11/03今天
0.28.22026/11/03今天
0.28.12026/11/03今天
0.28.02026/10/313 天前
0.27.132026/10/295 天前
0.27.122026/10/2212 天前

关于 @zapier/zapier-sdk-mcp 的常见问题

@zapier/zapier-sdk-mcp 是什么?

Zapier SDK的MCP服务器

如何安装 @zapier/zapier-sdk-mcp?

在项目目录运行 npm install @zapier/zapier-sdk-mcp,或使用 pnpm add / yarn add / bun add。

@zapier/zapier-sdk-mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@zapier/zapier-sdk-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@zapier/zapier-sdk-mcp 可以商用吗?

@zapier/zapier-sdk-mcp 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@zapier/zapier-sdk-mcp 还在维护吗?

最新版本 0.28.3 发布于 2026/11/03(今天);至今共发布 267 个版本,其中过去 12 个月发布了 236 个;首次发布于 2025/08/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。