Pipedream's MCP server allows you to run your own Model Context Protocol server for over 2,500 apps and APIs. This lets you manage authentication, configure parameters, and make API requests to various services, all within your own infrastructure.
Before getting started with the MCP server, you'll need:
First, you need to prepare your environment with Pipedream credentials:
PIPEDREAM_CLIENT_ID=your_client_id
PIPEDREAM_CLIENT_SECRET=your_client_secret
PIPEDREAM_PROJECT_ID=your_project_id
PIPEDREAM_PROJECT_ENVIRONMENT=development
The simplest way to get started is using npx
to run the server directly.
For local testing or editor integration:
npx @pipedream/mcp stdio --app slack
With a specific user ID:
npx @pipedream/mcp stdio --app slack --external-user-id user123
For internet-facing services:
npx @pipedream/mcp sse
This starts a server on port 3010 with these routes:
You can specify a custom port and default app:
npx @pipedream/mcp sse --app slack --port 8080
If you prefer Docker, build and run the container:
docker build -t pipedream-connect .
docker run -d --name pd-mcp -p 3010:3010 --env-file .env pipedream-connect:latest
For a more customized setup:
npm install
cp .env.example .env
npm run build
npm run start:sse:prod
When using the MCP server, especially with the SSE interface, you need to understand two key parameters:
external_user_id
: Your user's unique identifier in your systemapp
: The app's "name slug" (e.g., "slack", "gmail", "twitter")http://localhost:3010/:external_user_id/:app
For example, to connect user "123" to Slack:
http://localhost:3010/123/slack
After establishing the connection, the server will register tools for the app.
To send messages to the server, POST to:
http://localhost:3010/:external_user_id/:app/messages?sessionId=<sessionId>
Where <sessionId>
is provided in the response from the initial connection.
You can use the MCP Inspector for debugging:
npx @modelcontextprotocol/inspector node ./dist/src/cli.js stdio --app APP --external-user-id USER_ID
Then open http://localhost:5173/ and set the transport type to STDIO.
When hosting your own server, implement OAuth support to protect access to customer data. MCP supports server authorization using OAuth as specified in the protocol.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.