Skip to main content
Invoke external Model Context Protocol (MCP) tools over HTTP to extend Conductor with third-party capabilities. The tools operation allows ensembles to call external MCP servers (like GitHub MCP, Brave Search MCP, or custom MCP servers) via HTTP. This enables integration with any MCP-compatible service without requiring subprocess execution.

Overview

With Cloudflare’s announcement of MCP support (November 2024), Conductor implements HTTP-only MCP transport for secure, scalable tool integration on the edge. This approach:
  • Works in Cloudflare Workers (no Node.js required)
  • Scales horizontally with zero configuration
  • Provides built-in auth (bearer tokens, OAuth)
  • Supports HMAC signature verification
  • Integrates seamlessly with existing infrastructure

Basic Usage

Configuration

Agent Config

Input

The agent input becomes the tool’s arguments:
Becomes:

Output

Setup MCP Servers

1. Configure MCP Servers

Create conductor.config.ts:

2. Set Environment Variables

MCP Server Examples

GitHub MCP

Interact with GitHub repositories, pull requests, and issues:

Brave Search MCP

Web search with Brave Search API:

Custom MCP Server

Call your own MCP server:

Common Patterns

Sequential Tool Calls

Parallel Tool Calls

Tool with Fallback

Caching Tool Discovery

This is useful when:
  • MCP server’s tool list doesn’t change often
  • You want to reduce latency
  • You’re making many tool calls to the same server

Authentication

Bearer Token

HTTP Request:

OAuth

OAuth flow:
  1. Conductor requests token from tokenUrl using client credentials
  2. Token is cached and reused for subsequent requests
  3. Token is automatically refreshed when expired

HMAC Signature

For MCP servers that require signature verification:
Request includes:

Error Handling

Tool Invocation Errors

Check Tool Errors

Tools can return isError: true even if the HTTP request succeeds:

Timeout Handling

Testing

Mock MCP Tools

Integration Testing

Best Practices

1. Set Appropriate Timeouts

2. Cache Tool Discovery

3. Handle Tool Failures

4. Use Typed Inputs

5. Document Tool Usage

Limitations

HTTP Only: Conductor only supports HTTP transport for MCP. Stdio/subprocess MCP servers are not supported in Cloudflare Workers. No Streaming: The current implementation doesn’t support streaming responses from MCP servers. Tool Discovery: Tool discovery is performed on-demand. Use cacheDiscovery: true to cache the tool list. OAuth Refresh: OAuth token refresh is automatic but requires the MCP server to support token refresh.

Next Steps

MCP Integration

Complete MCP integration guide

Expose as MCP

Expose ensembles as MCP tools

think Operation

Combine tools with AI

Testing

Test tool integrations