Access + APIs and 10,000+ tools in OpenAI using Pipedream Connect. MCP makes it easy to extend the capabilities of any LLM or agent, and Pipedream offers drop-in support for calling tools in OpenAI.
Pipedream Connect includes built-in user authentication for every MCP server, which means you don’t need to build any authorization flows or deal with token storage and refresh in order to make authenticated requests on behalf of your users. Learn more here.
OpenAI provides an API playground for developers to test prompts and tool calling, which provides an easy way to test Pipedream MCP. Get started below.
These are requirements for you, the developer. Your users do not need to sign up for Pipedream in order to connect their accounts in your app or agent.
Now set the following environment variables (learn more about environments in Pipedream Connect here):
Copy
Ask AI
OPENAI_API_KEY=your_openai_api_keyPIPEDREAM_CLIENT_ID=your_client_idPIPEDREAM_CLIENT_SECRET=your_client_secretPIPEDREAM_PROJECT_ID=your_project_id # proj_xxxxxxxPIPEDREAM_ENVIRONMENT=development # development | production
2
Discover available MCP servers
See here for guidance on discovering the apps Pipedream has available as MCP servers.
3
Generate a model response in OpenAI with Pipedream MCP
Below is an end to end example showing how to:
Initialize the Pipedream SDK
Find the relevant MCP server
Send a prompt to OpenAI with the MCP server as a tool call
Copy
Ask AI
import OpenAI from 'openai';import { createBackendClient } from "@pipedream/sdk/server";// Initialize the Pipedream SDK clientconst pd = createBackendClient({ environment: PIPEDREAM_ENVIRONMENT, credentials: { clientId: PIPEDREAM_CLIENT_ID, clientSecret: PIPEDREAM_CLIENT_SECRET, }, projectId: PIPEDREAM_PROJECT_ID});// Find the app to use for the MCP server// For this example, we'll use Notionconst apps = await pd.getApps({ q: "notion" });const appSlug = apps.data[0].name_slug; // e.g., "notion",// Get access token for MCP server authconst accessToken = await pd.rawAccessToken();// Send the unique ID that you use to identify this user in your systemconst externalUserId = 'abc-123'; // Used in MCP URL to identify the user// Initialize OpenAI clientconst client = new OpenAI();// Make the OpenAI request with the MCP serverconst response = await client.responses.create({ model: 'gpt-4.1', tools: [ { type: 'mcp', server_label: appSlug, server_url: `https://remote.mcp.pipedream.net`, headers: { Authorization: `Bearer ${accessToken}`, "x-pd-project-id": PIPEDREAM_PROJECT_ID, "x-pd-environment": PIPEDREAM_ENVIRONMENT, "x-pd-external-user-id": externalUserId, "x-pd-app-slug": appSlug, }, require_approval: 'never' } ], input: 'Summarize my most recently created Notion doc for me and help draft an email to our customers'});console.log(response);