DocumentationFundamentals

MCP Server

Use the Webhook Relay MCP server to manage buckets, webhook logs, transform functions, and cloud service connections from AI agents.

Overview

Webhook Relay provides an MCP (Model Context Protocol) server that lets AI agents manage your webhook infrastructure programmatically.

You can configure and access MCP from:

The MCP API endpoint is:

  • https://my.webhookrelay.com/v1/mcp

Authentication

Authenticate requests with a Bearer token in the Authorization header:

Authorization: Bearer <token>

Configure MCP in Webhook Relay

Open the MCP page in your Webhook Relay account and use the provided configuration values in your MCP client or agent:

Webhook Relay MCP configuration

Connect Claude.ai

In your Claude.ai settings click to add a new connection, name it webhookrelay and set URL to https://my.webhookrelay.com/v1/mcp.

Once added, click "connect", this will authenticate your account. Try asking questions like "list all buckets" or "create a new bucket".

Claude.ai connection

Use MCP from an Agent

Once configured, your agent can call MCP tools to create and manage buckets, inspect webhook logs, and work with transform functions:

Webhook Relay MCP usage from an agent

Resource

The MCP server exposes the following resource:

URIDescription
webhookrelay://docs/functions/javascript-apiComplete API reference for writing JavaScript transform functions. Covers the request object (r), config (cfg), HTTP client, crypto, time, BigQuery, and Mailgun modules.

Tools

Bucket Management

ToolDescriptionParams
list_bucketsList all webhook buckets for the account, including their inputs (public endpoints) and outputs (forwarding destinations).None
create_bucketCreate a new bucket with a public endpoint. Optionally create an output in the same call by providing a destination URL. Returns the public webhook URL. Supports attaching transform functions at creation time via input_function_id and output_function_id.name (required), description, destination, internal, input_function_id, output_function_id
update_bucketUpdate a bucket's name or description.id (required), name, description
delete_bucketDelete a bucket and all its inputs/outputs (destructive).id (required)

Webhook Logs

ToolDescriptionParams
list_webhook_logsList webhook logs in summary format (status, method, timestamp, duration). Read-only.bucket_id, limit (default 20, max 100), offset
get_webhook_logGet full details of a single webhook log including request/response headers and body. Read-only.id (required)

Transform Functions

ToolDescriptionParams
list_functionsList all transform functions in the account. Read-only.None
get_functionGet a function's full details including source code. Read-only.id (required)
create_functionCreate a new transform function. Supported drivers: lua, js.name (required), driver (required), code (required)
update_functionUpdate an existing function's name, driver, or code.id (required), name, driver, code
executeExecute a transform function with a synthetic request payload. Useful for testing functions before attaching them.function_id (required), method, headers, body

Function Attachments

ToolDescriptionParams
attach_functionAttach a transform function to an input or output so it processes webhooks in transit.resource_type (input or output), resource_id (required), function_id (required)
detach_functionDetach a transform function from an input or output.resource_type (input or output), resource_id (required)

Service Connections

ToolDescriptionParams
list_service_connectionsList all service connections (GCP, AWS, Azure) for the account. Read-only.None
get_service_connectionGet details of a specific service connection. Read-only.id (required)
create_service_connectionCreate a new service connection to a cloud provider.name (required), provider (required), credentials (required)
update_service_connectionUpdate a service connection's name or credentials.id (required), name, credentials
delete_service_connectionDelete a service connection (destructive).id (required)

Service Connection Inputs

ToolDescriptionParams
list_service_connection_inputsList cloud event subscription inputs for a bucket. Read-only.bucket_id (required)
create_service_connection_inputSubscribe to cloud events (PubSub, SQS, SNS, S3, GCS) and forward them into a bucket.bucket_id (required), service_connection_id (required), subscription (required)
delete_service_connection_inputDelete a service connection input from a bucket (destructive).bucket_id (required), input_id (required)

Service Connection Outputs

ToolDescriptionParams
list_service_connection_outputsList cloud service outputs for a bucket. Read-only.bucket_id (required)
create_service_connection_outputForward webhooks from a bucket to cloud services (PubSub, SQS, SNS, S3, GCS).bucket_id (required), service_connection_id (required), destination (required)
delete_service_connection_outputDelete a service connection output from a bucket (destructive).bucket_id (required), output_id (required)

Key Concepts

  • Bucket: A logical container grouping one or more inputs with one or more outputs.
  • Input: A public endpoint (URL) that receives webhooks from third parties.
  • Output: A destination URL where received webhooks are forwarded. Set internal=true for localhost destinations (requires a local relay agent).
  • Function: A Lua or JavaScript snippet that transforms webhooks in transit. Functions are attached to inputs (runs before routing) or outputs (runs before forwarding).
  • Service Connection: Credentials for a cloud provider (GCP, AWS, Azure) that enable cloud event subscriptions (inputs) and cloud service forwarding (outputs).

Important Behavior for JavaScript Functions

Before creating or updating JavaScript transform functions, agents must first read:

  • webhookrelay://docs/functions/javascript-api

JavaScript transforms run in a custom runtime. They must mutate the global r object directly, and standard Node.js/browser APIs are not available.

Did this page help you?