Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs-v2/pages/connect/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Before sending requests to the API, make sure to [authenticate using a Pipedream
<Tabs items={['Node.js', 'HTTP (cURL)']}>
<Tabs.Tab>
```javascript
// Initialize the Pipedream client with the SDK
// Initialize the Pipedream SDK client

import { createBackendClient } from "@pipedream/sdk/server";

Expand Down
41 changes: 31 additions & 10 deletions docs-v2/pages/connect/mcp/developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Pipedream provides [{process.env.PUBLIC_APPS}+ APIs as MCP servers](https://mcp.
```javascript
import { createBackendClient } from "@pipedream/sdk/server";

// Initialize the Pipedream client with the SDK
// Initialize the Pipedream SDK client
const pd = createBackendClient({
environment: PIPEDREAM_ENVIRONMENT,
credentials: {
Expand All @@ -105,7 +105,7 @@ const apps = await pd.getApps();
```javascript
import { createBackendClient } from "@pipedream/sdk/server";

// Initialize the Pipedream client with the SDK
// Initialize the Pipedream SDK client
const pd = createBackendClient({
environment: PIPEDREAM_ENVIRONMENT,
credentials: {
Expand Down Expand Up @@ -148,7 +148,7 @@ To authenticate requests to Pipedream's MCP server, you need to include an acces
```javascript
import { createBackendClient } from "@pipedream/sdk/server";

// Initialize the Pipedream client with the SDK
// Initialize the Pipedream SDK client
const pd = createBackendClient({
environment: PIPEDREAM_ENVIRONMENT,
credentials: {
Expand Down Expand Up @@ -182,19 +182,40 @@ curl -s -X POST https://api.pipedream.com/v1/oauth/token \
Include these headers in every HTTP request:

```javascript
{
Authorization: `Bearer ${PIPEDREAM_ACCESS_TOKEN}`,
"x-pd-project-id": PIPEDREAM_PROJECT_ID, // proj_xxxxxxx
"x-pd-environment": PIPEDREAM_ENVIRONMENT // development | production
}
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { createBackendClient } from "@pipedream/sdk/server";

// Initialize the Pipedream SDK client
const pd = createBackendClient({
environment: PIPEDREAM_ENVIRONMENT,
credentials: {
clientId: PIPEDREAM_CLIENT_ID,
clientSecret: PIPEDREAM_CLIENT_SECRET,
},
projectId: PIPEDREAM_PROJECT_ID
});

// Retrieve your developer access token via the Pipedream SDK
const accessToken = await pd.rawAccessToken();
const serverUrl = process.env.MCP_SERVER_URL || "https://remote.mcp.pipedream.net";

const transport = new StreamableHTTPClientTransport(new URL(serverUrl), {
requestInit: {
headers: {
"Authorization": `Bearer ${accessToken}`,
"x-pd-project-id": PIPEDREAM_PROJECT_ID, // proj_xxxxxxx
"x-pd-environment": PIPEDREAM_ENVIRONMENT // development | production
}
}
});
```

### Self-host Pipedream's MCP server

Hosting the MCP server locally or in your app will expose these routes:

- `GET /:external_user_id/:app` - App-specific connection endpoint
- `POST /:external_user_id/:app/messages` - App-specific message handler
- `GET /:external_user_id/:app`: app-specific connection endpoint
- `POST /:external_user_id/:app/messages`: app-specific message handler

#### Using the `Dockerfile`

Expand Down
4 changes: 2 additions & 2 deletions docs-v2/pages/connect/mcp/openai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Callout, Tabs, Steps } from 'nextra/components'

# Using Pipedream MCP with OpenAI

Access {process.env.PUBLIC_APPS}+ 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](https://platform.openai.com/docs/guides/tools?api-mode=responses) .
Access {process.env.PUBLIC_APPS}+ 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](https://platform.openai.com/docs/guides/tools-remote-mcp).

<Callout type="info">
Pipedream Connect includes built-in user authentication for [every MCP server](https://mcp.pipedream.com), 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](/connect/mcp/developers/#user-account-connections).
Expand Down Expand Up @@ -51,7 +51,7 @@ Below is an end to end example showing how to:
import OpenAI from 'openai';
import { createBackendClient } from "@pipedream/sdk/server";

// Initialize the Pipedream client with the SDK
// Initialize the Pipedream SDK client
const pd = createBackendClient({
environment: PIPEDREAM_ENVIRONMENT,
credentials: {
Expand Down
Loading