CONNECT APP
Build with Buildkite
Infrastructure & Cloud
- API key
MCP
Give your agent Buildkite tools
Every Buildkite action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Buildkite account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{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": "buildkite",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Create Build:
const result = await mcp.callTool({
name: "buildkite-create-build",
arguments: {
organizationSlug: "Organization Slug",
pipelineSlug: "Pipeline Slug",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{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": "buildkite",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Build:
result = await session.call_tool("buildkite-create-build", {
"organizationSlug": "Organization Slug",
"pipelineSlug": "Pipeline Slug",
})API PROXY
Call the Buildkite API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Buildkite API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.buildkite.com/v2/user",
})
// Any allowed Buildkite endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.buildkite.com/v2/user
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuYnVpbGRraXRlLmNvbS92Mi91c2Vy?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Buildkite actions from your backend
Connect a user's Buildkite account once, then run Create Build on their behalf from your own code — TypeScript, Python, or plain HTTP.
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: "buildkite-create-build",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
buildkite: { authProvisionId: "apn_xxxxxxx" },
organizationSlug: "Organization Slug",
pipelineSlug: "Pipeline Slug",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="buildkite-create-build",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"buildkite": {"authProvisionId": "apn_xxxxxxx"},
"organizationSlug": "Organization Slug",
"pipelineSlug": "Pipeline Slug",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "buildkite-create-build",
"configured_props": {
"buildkite": { "authProvisionId": "apn_xxxxxxx" },
"organizationSlug": "Organization Slug",
"pipelineSlug": "Pipeline Slug"
}
}'TOOLS
Buildkite actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Build
actionCreates a new build for a pipeline. See the documentationWritev0.0.1 -
Download Artifact
actionReturns a download URL for a specific artifact. See the documentationRead-onlyv0.0.1 -
Get Access Token
actionReturns details about the API access token used to authenticate the request, including its scopes. See the documentationRead-onlyv0.0.1 -
Get Build
actionReturns the details for a single build, including its jobs. See the documentationRead-onlyv0.0.1 -
Get Current User
actionReturns basic details about the user account that sent the request. See the documentationRead-onlyv0.2.0 -
Get Job Environment Variables
actionReturns the environment variables for a specific job in a build. See the documentationRead-onlyv0.0.1 -
Get Job Log
actionReturns the log output for a specific job in a build. See the documentationRead-onlyv0.0.1 -
List Build Annotations
actionReturns a list of annotations for a build. See the documentationRead-onlyv0.0.1 -
List Build Artifacts
actionReturns a list of artifacts for a build. See the documentationRead-onlyv0.0.1 -
List Builds for Pipeline
actionReturns a list of a pipeline's builds, filterable by state, branch, and commit. See the documentationRead-onlyv0.0.1 -
List Organization Slug Options
actionRetrieves available options for the Organization Slug field.Read-onlyv0.0.1 -
List Organizations
actionReturns a list of organizations accessible by the API token. See the documentationRead-onlyv0.0.1 -
List Pipelines
actionReturns a list of an organization's pipelines. See the documentationRead-onlyv0.0.1 -
Rebuild Build
actionCreates a new build from an existing build, preserving lineage. See the documentationWritev0.0.1 -
Retry Job
actionRetries a failed or timed out job. Each job can only be retried once. See the documentationWritev0.0.2
EVENTS
Buildkite triggers
Event sources your backend can deploy for users and receive through a webhook.
No Buildkite triggers are available yet.
MULTI-APP
Use Buildkite with other popular apps
Most products don't stop at one integration. Pair Buildkite with the other apps your users rely on, and ship use cases that span both.
- App slug
- buildkite
- Authentication
- API key
- Categories
- Infrastructure & Cloud
- Actions
- 15
- Triggers
- 0
- API proxy
- Available