@@ -47,6 +47,8 @@ PIPEDREAM_PROJECT_ID=your_project_id # proj_xxxxxxx
4747PIPEDREAM_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)
8397const 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
93119const notionApps = await pd .getApps ({ q: " notion" });
94120const 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
190211npx @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
203224git clone https://github.com/PipedreamHQ/pipedream
204225cd 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
216234See 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
220246The [ MCP inspector] ( https://modelcontextprotocol.io/docs/tools/inspector ) can be helpful when debugging tool calls.
221247
@@ -228,7 +254,7 @@ Enter the server URL:
228254If 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
234260If running locally:
0 commit comments