This MCP server implementation allows you to run your own Model Context Protocol server powered by Pipedream Connect, giving you access to over 2,500 apps and APIs. You can manage servers for your users within your own application, connect accounts, configure parameters, and make API requests through tools.
Before getting started, you'll need to:
Set up the following environment variables:
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 run the server locally is with npx:
npx @pipedream/mcp
This will start the MCP server on your local machine.
If you prefer Docker, you can 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
This exposes the MCP server at http://localhost:3010/:external_user_id/:app
The MCP server supports two main interfaces:
Access pattern: /{external_user_id}/{app}
This provides an endpoint for each app with all tools available for that specific app. For example, if user "123" wants to connect to Slack, they would use /123/slack
.
The SSE server accepts two important route parameters:
external_user_id
- Your user's unique identifier in your systemapp
- The app's "name slug" found in the Authentication section of any Pipedream appFor example, if user "123" wants to connect to Slack (app slug: "slack"), your MCP client would make a request to the /123/slack
route.
To test your MCP server, you can use the MCP inspector:
npx @modelcontextprotocol/inspector
Use one of these URLs in the inspector:
http://localhost:3010/v1/{external_user_id}/{app}
for Streamable HTTP Transporthttp://localhost:3010/{external_user_id}/{app}
for SSE TransportTo see all requests and responses to the Connect API, set the debug environment variable:
PD_SDK_DEBUG=true pnpm dev:http
This will help you troubleshoot any issues with your MCP server implementation.
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.