Skip to content

Commit 670ec7b

Browse files
Rev on hosted MCP docs (#16754)
* Rev on hosted MCP docs * Update developers.mdx * Update pnpm-lock.yaml * Update developers.mdx
1 parent cd3067c commit 670ec7b

File tree

4 files changed

+72
-41
lines changed

4 files changed

+72
-41
lines changed

docs-v2/pages/connect/mcp/_meta.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@ export default {
22
"index": "Overview",
33
"developers": "Developers",
44
"users": "Consumers",
5-
"openai": {
6-
title: "OpenAI",
7-
display: "hidden",
8-
},
5+
"openai": "OpenAI",
96
} as const

docs-v2/pages/connect/mcp/developers.mdx

Lines changed: 57 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ PIPEDREAM_PROJECT_ID=your_project_id # proj_xxxxxxx
4747
PIPEDREAM_ENVIRONMENT=development # development | production
4848
```
4949

50+
Learn more about [environments in Pipedream Connect](/connect/managed-auth/environments).
51+
5052
### Authentication
5153

5254
#### Developer authentication
@@ -79,6 +81,18 @@ Pipedream provides [{process.env.PUBLIC_APPS}+ APIs as MCP servers](https://mcp.
7981
<Tabs items={['List all apps', 'Search for a specific app']}>
8082
<Tabs.Tab>
8183
```javascript
84+
import { createBackendClient } from "@pipedream/sdk/server";
85+
86+
// Initialize the Pipedream client with the SDK
87+
const pd = createBackendClient({
88+
environment: PIPEDREAM_ENVIRONMENT,
89+
credentials: {
90+
clientId: PIPEDREAM_CLIENT_ID,
91+
clientSecret: PIPEDREAM_CLIENT_SECRET,
92+
},
93+
projectId: PIPEDREAM_PROJECT_ID
94+
});
95+
8296
// Get all available apps (paginated)
8397
const apps = await pd.getApps();
8498

@@ -89,6 +103,18 @@ const apps = await pd.getApps();
89103
</Tabs.Tab>
90104
<Tabs.Tab>
91105
```javascript
106+
import { createBackendClient } from "@pipedream/sdk/server";
107+
108+
// Initialize the Pipedream client with the SDK
109+
const pd = createBackendClient({
110+
environment: PIPEDREAM_ENVIRONMENT,
111+
credentials: {
112+
clientId: PIPEDREAM_CLIENT_ID,
113+
clientSecret: PIPEDREAM_CLIENT_SECRET,
114+
},
115+
projectId: PIPEDREAM_PROJECT_ID
116+
});
117+
92118
// Search by app name
93119
const notionApps = await pd.getApps({ q: "notion" });
94120
const gmailApps = await pd.getApps({ q: "gmail" });
@@ -100,13 +126,17 @@ const slackApps = await pd.getApps({ q: "slack" });
100126
### Use Pipedream's remote MCP server
101127

102128
<Callout type="info">
103-
Pipedream MCP server supports both SSE and streamable HTTP transport types, with no configuration required by the developer or MCP client.
129+
The remote MCP server is in beta, and we're looking for feedback. During the beta, the API is subject to change.
104130
</Callout>
105131

132+
#### Supported transport types
133+
134+
The Pipedream MCP server supports both SSE and streamable HTTP transport types, with no configuration required by the developer or MCP client.
135+
106136
#### Base URL
107137

108138
```
109-
https://mcp.pipedream.net
139+
https://remote.mcp.pipedream.net
110140
```
111141

112142
#### API Authentication
@@ -161,61 +191,57 @@ Include these headers in every HTTP request:
161191

162192
### Self-host Pipedream's MCP server
163193

194+
Hosting the MCP server locally or in your app will expose these routes:
195+
196+
- `GET /:external_user_id/:app` - App-specific connection endpoint
197+
- `POST /:external_user_id/:app/messages` - App-specific message handler
198+
164199
#### Using the `Dockerfile`
165200

166-
If you have Docker installed locally, you can build and run the container from the [reference implementation](https://github.com/PipedreamHQ/pipedream/blob/master/modelcontextprotocol/Dockerfile):
201+
You can build and run the container from the [reference implementation](https://github.com/PipedreamHQ/pipedream/blob/master/modelcontextprotocol/Dockerfile):
167202

168203
```console
169204
> docker build -t pipedream-connect .
170205
> docker run -d --name pd-mcp -p 3010:3010 --env-file .env pipedream-connect:latest
171206
```
172207

173-
This exposes a generic MCP server at [http://localhost:3010/:external_user_id/:app](http://localhost:3010/:external_user_id/:app).
174-
175-
#### Start the server with Streamable HTTP Transport
176-
177-
```bash
178-
pnpm dev:http
179-
```
180-
181-
You can use the optional env var `PD_SDK_DEBUG` to print out all the requests and responses going to the Connect API:
182-
183-
```bash
184-
PD_SDK_DEBUG=true pnpm dev:http
185-
```
186-
187-
#### Start the server with SSE
208+
#### Running the server using npx
188209

189210
```bash
190211
npx @pipedream/mcp sse
191212
```
192213

193-
This exposes routes at:
194-
- `GET /:external_user_id/:app` - App-specific SSE connection endpoint
195-
- `POST /:external_user_id/:app/messages` - App-specific message handler
214+
<Callout type="warning">
215+
The current npx package only supports the `sse` transport type, `http` is coming soon.
216+
</Callout>
196217

197-
#### Customize for your needs
218+
#### Running the server locally
198219

199-
You can also host and customize the MCP server for your specific requirements:
220+
You can also run the server locally and even customize the MCP server for your specific requirements:
200221

201222
```bash
202223
# Clone the repo
203224
git clone https://github.com/PipedreamHQ/pipedream
204225
cd pipedream/modelcontextprotocol
205226

206227
# Install dependencies
207-
npm install
228+
pnpm install
208229

209-
# Build
210-
npm run build
211-
212-
# Run the SSE server
213-
npm run start:sse:prod
230+
# Start the server
231+
pnpm dev:http
214232
```
215233

216234
See the [MCP server README](https://github.com/PipedreamHQ/pipedream/blob/master/modelcontextprotocol/README.md) for detailed instructions on customization options.
217235

218-
### Use the MCP inspector
236+
#### Debugging
237+
238+
You can use the optional env var `PD_SDK_DEBUG` to print out all the requests and responses going to the Connect API:
239+
240+
```bash
241+
PD_SDK_DEBUG=true pnpm dev:http
242+
```
243+
244+
### Using the MCP inspector
219245

220246
The [MCP inspector](https://modelcontextprotocol.io/docs/tools/inspector) can be helpful when debugging tool calls.
221247

@@ -228,7 +254,7 @@ Enter the server URL:
228254
If using Pipedream's remote server:
229255

230256
```
231-
https://mcp.pipedream.net/{external_user_id}/{app_slug}
257+
https://remote.mcp.pipedream.net/{external_user_id}/{app_slug}
232258
```
233259

234260
If running locally:

docs-v2/pages/connect/mcp/openai.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const response = await client.responses.create({
8282
{
8383
type: 'mcp',
8484
server_label: 'Notion',
85-
server_url: `https://mcp.pipedream.net/${externalUserId}/${appSlug}`,
85+
server_url: `https://remote.mcp.pipedream.net/${externalUserId}/${appSlug}`,
8686
headers: {
8787
Authorization: `Bearer ${accessToken}`,
8888
"x-pd-project-id": PIPEDREAM_PROJECT_ID,
@@ -129,7 +129,7 @@ curl -X POST https://api.openai.com/v1/chat/completions \
129129
{
130130
"type": "mcp",
131131
"server_label": "Notion",
132-
"server_url": "https://mcp.pipedream.net/abc-123/'$APP_SLUG'",
132+
"server_url": "https://remote.mcp.pipedream.net/abc-123/'$APP_SLUG'",
133133
"headers": {
134134
"Authorization": "Bearer '"$ACCESS_TOKEN"'",
135135
"x-pd-project-id": "$PIPEDREAM_PROJECT_ID",

pnpm-lock.yaml

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)