Detected country: US
logo
Sign InBook a Demo
GuideRecipesDeveloper

Developer Docs

  • Developer foundations
    • How do I authenticate with the Ballet API?
    • How do I connect to Ballet's MCP endpoint?
    • How do I run a playbook over the REST API?
    • How do I stream playbook run events?
    • How do I trigger and react to playbooks with webhooks?
    • How do I wake a suspended run with reply or resume?
  • How do I use Ballet playbooks in an agent framework?
    • How do I call Ballet playbooks from Google ADK?
    • How do I call Ballet playbooks from LangChain?
    • How do I call Ballet playbooks from Mastra?
    • How do I call Ballet playbooks from Pydantic AI?
    • How do I call Ballet playbooks from the Vercel AI SDK?
  • How do playbooks connect to external systems?
    • How do I call external APIs and SDKs from a playbook?
    • How do I connect external MCP servers to playbooks?
    • How do I use secrets and env vars in steps?
  • Introduction
Loading…
logo

Powered by

How do I connect external MCP servers to playbooks?

TL;DR: Ballet acts as an MCP client to external servers. Add a server from the registry or a custom URL under Connectors, authenticate with OAuth or an API key, and its tools become available to steps and agents. OAuth uses discovery + PKCE so most servers connect without pasting tokens.

Who this is for

Developers giving playbooks access to external services that expose an MCP server.

How do I connect a featured server?

  1. Open Connectors → Browse registry.
  2. Pick the service (GitHub, Slack, Linear, Brainfish, Stripe, …) and click Connect.
  3. Authenticate — OAuth sign-in, or paste an API key in the Authorization header.
  4. Confirm the connection shows as active.

When a connect attempt fails because a token is missing, Ballet probes the server's OAuth discovery endpoints and opens the authorization popup automatically if the server supports it.

How do I connect a custom MCP server?

  1. Go to Connectors → Add connector.
  2. Enter the MCP server URL (HTTP or SSE endpoint).
  3. Add required headers (for example Authorization: Bearer ${MY_TOKEN}), referencing Secrets with ${VAR}.
  4. Save and test the connection.

What auth methods are supported?

MethodExample services
OAuth (discovery + PKCE)Slack, Linear, Notion, GitHub
API keyBrainfish, Stripe, Supabase, Datadog
Custom headersProvider-specific (for example a client ID + secret)

OAuth tokens are stored in Ballet's per-tenant encrypted secret store and refreshed automatically near expiry.

How do playbooks use connected tools?

Reference the connected server's tools from Code steps, or let Ask Ballet wire them while building. A playbook can also attach connectors in its own Connectors panel for playbook-specific access.

Related articles

  • How do I connect an MCP server?
  • What is a connector and how do I browse the registry?
  • How do I store credentials with Secrets?
  • HTTP and custom tools