@zapier/zapier-sdk-mcp
v0.4.7
Published
MCP server for Zapier SDK
Maintainers
Readme
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-cliUsage
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 --debugUsing 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 });How It Works
The MCP server:
- Dynamically discovers all available Zapier SDK functions from the SDK's internal registry
- Converts function schemas from Zod format (used internally by the SDK) to JSON Schema format (required by MCP)
- Exposes functions as MCP tools with kebab-case naming (e.g.,
listAppsbecomeslist-apps) - 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 appslist-actions- List actions for a specific appget-action- Get details about a specific actionrun-action- Execute a Zapier actionlist-authentications- List your authentications- 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 APIsThe MCP server acts as an adapter, translating between the MCP protocol and the Zapier SDK's function-based interface.
Development
Building
pnpm buildTesting
pnpm testTable of Contents
Available Tools
All SDK functions are automatically exposed as MCP tools using kebab-case naming.
Accounts
get-profile
Get current user's profile information
Actions
get-action
Get detailed information about a specific action
get-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.
list-actions
List all actions for a specific app
list-input-field-choices
Get the available choices for a dynamic dropdown input field
list-input-fields
Get the input fields required for a specific action
run-action
Execute an action with the given inputs
Apps
get-app
Get detailed information about a specific app
list-apps
List all available apps with optional filtering
Authentications
find-first-authentication
Find the first authentication matching the criteria
find-unique-authentication
Find a unique authentication matching the criteria
get-authentication
Get a specific authentication by ID
list-authentications
List available authentications with optional filtering
HTTP Requests
request
Make authenticated HTTP requests through Zapier's Relay service
