Skip to content

Conversation

@dannyroosevelt
Copy link
Collaborator

@dannyroosevelt dannyroosevelt commented May 21, 2025

WHY

Summary by CodeRabbit

  • Documentation
    • Expanded and reorganized the MCP server deployment and usage guide with detailed setup, authentication, customization, and debugging instructions.
    • Enhanced clarity by adding overviews, environment variable explanations, and explicit route descriptions.
    • Introduced a new section on the MCP inspector tool for debugging.
    • Simplified the OpenAI integration documentation by consolidating code examples into referenced sections and improving formatting for readability.

@vercel
Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2025 6:18am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
pipedream-docs ⬜️ Ignored (Inspect) May 21, 2025 6:18am
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) May 21, 2025 6:18am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 21, 2025

Walkthrough

The documentation for Pipedream's MCP server was extensively revised. The developers' guide was rewritten to provide detailed explanations, improved examples, and new sections on customization and debugging. The OpenAI integration documentation was simplified by consolidating code examples and redirecting users to dedicated sections for in-depth instructions, enhancing clarity and usability.

Changes

File(s) Change Summary
docs-v2/pages/connect/mcp/developers.mdx Rewrote and expanded the MCP server deployment and usage guide with detailed concepts, improved environment variable instructions, new sections on remote usage, authentication, Docker/self-hosting, route descriptions, customization, and the MCP inspector tool. Enhanced layout with tabs and callouts.
docs-v2/pages/connect/mcp/openai.mdx Simplified documentation by replacing inline code examples with links to detailed sections, demoting a heading, annotating environment variable examples, and removing redundant examples. Updated formatting and consolidated instructions for clarity.

Poem

In the warren of docs, we hopped with care,
Expanding the guides with details to share.
Tabs and callouts now light up the way,
With links to explore and less code on display.
From Docker to headers, and inspector in tow—
The MCP journey’s easier, as any bunny would know! 🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs-v2/pages/connect/mcp/openai.mdx (1)

147-149: Avoid duplicate account-connections references
You now have two references to the account-connections section (once in the info callout and again here). To reduce redundancy, consider removing one or redirecting solely from the page’s intro.

docs-v2/pages/connect/mcp/developers.mdx (2)

3-3: Consistency in page title punctuation
Consider adding an apostrophe after "Pipedream" for consistency with other docs (e.g., Add Pipedream’s MCP…) or ensure this style matches the project's headline conventions.


9-9: Grammar: use “on GitHub” instead of “in GitHub”
Change the preposition to improve readability:

-Pipedream's MCP server code is [publicly available in GitHub](…)
+Pipedream's MCP server code is [publicly available on GitHub](…)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~9-~9: The preposition “on” seems more likely in this position than the preposition “in”.
Context: ... MCP server code is [publicly available in GitHub](https://github.com/PipedreamHQ/...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION_IN_ON)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 005a4c3 and c399e6e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • docs-v2/pages/connect/mcp/developers.mdx (3 hunks)
  • docs-v2/pages/connect/mcp/openai.mdx (3 hunks)
🧰 Additional context used
🪛 LanguageTool
docs-v2/pages/connect/mcp/developers.mdx

[uncategorized] ~9-~9: The preposition “on” seems more likely in this position than the preposition “in”.
Context: ... MCP server code is [publicly available in GitHub](https://github.com/PipedreamHQ/...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION_IN_ON)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: validate-links
🔇 Additional comments (18)
docs-v2/pages/connect/mcp/openai.mdx (5)

8-8: Verify account-connections link accuracy
The info callout now points to /connect/mcp/developers/#account-connections. Please confirm that this anchor exists exactly in the developer guide (it currently appears as ### Account connections). Consistency ensures the link doesn’t 404.


11-11: Heading level demotion appropriate
Downgrading "Getting started" from a tertiary (###) to a secondary (##) heading improves the hierarchy on this page. Ensure it aligns with the overall site-level heading conventions.


33-34: Ensure environment variable consistency
Great addition of PIPEDREAM_PROJECT_ID and PIPEDREAM_ENVIRONMENT with inline comments. Double-check that these names and values match the ones used in your SDK examples and the developer guide to avoid user confusion.


39-39: Simplified discovery link
Replacing the inline discovery examples with a single link to the developer guide streamlines this page effectively. Confirm the /connect/mcp/developers/#discover-available-mcp-servers target is correct and up-to-date.


144-144: Trivial closing tag change
This update only adjusts the closing </Tabs> placement. The rendering appears unaffected, so no action is required here.

docs-v2/pages/connect/mcp/developers.mdx (13)

1-1: Approve import addition of Tabs
Including Tabs from nextra/components aligns with the new tabbed code examples. This import is necessary and correct.


11-12: Verify intra-page anchor targets
Links to #use-pipedreams-remote-mcp-server and #self-host-pipedreams-mcp-server must exactly match section IDs. Ensure anchors respect dashes and casing so they resolve properly.


18-22: Approve external_user_id explanation
The external_user_id section clearly explains its purpose and links to the external users API. Good clarity and structure.


24-27: Approve app route param details
The description of the app parameter and the pointer to discovery instructions are concise and accurate.


29-31: Account connections section clarity
The new "Account connections" section succinctly describes connection methods without code duplication. Well-placed and easy to follow.


63-67: Ensure unified environment variable usage
You've introduced PIPEDREAM_PROJECT_ID and PIPEDREAM_ENVIRONMENT here; confirm they match examples across other docs (e.g., OpenAI page) and the SDK initialization code.


73-83: Approve discover-MCP-servers code examples
The tabbed examples for listing and searching apps are clear, showing both methods. Good use of Tabs.


111-141: Approve authentication code snippets
Node.js and cURL examples for obtaining an access token are well-formatted and accurate. They align with the SDK usage patterns shown earlier.


146-154: Approve required headers section
Listing the necessary HTTP headers, including x-pd-project-id and x-pd-environment, ensures users won’t miss required metadata.


163-165: Approve Docker self-host instructions
The Docker commands for building and running the MCP server are correct and reference the official Dockerfile.


171-179: Approve server startup commands
Instructions for both Streamable HTTP and SSE transports, along with debug flags, are comprehensive and clear.


196-208: Approve customization guide
The cloning, build, and SSE run steps for customizing the MCP server accurately reference the repo structure and commands.


216-222: Approve MCP inspector instructions
The steps to use the inspector tool, including the CLI command and URL formats for both remote and local servers, are helpful and error-free.

@dannyroosevelt dannyroosevelt merged commit 7918c48 into master May 21, 2025
8 of 9 checks passed
@dannyroosevelt dannyroosevelt deleted the danny/mcp-hosted-servers branch May 21, 2025 06:19
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (4)
docs-v2/pages/connect/mcp/developers.mdx (4)

1-1: Remove unused import Steps
The Steps component is imported but never used in this file, which can lead to linter warnings and confusion.

-import { Callout, Steps, Tabs } from 'nextra/components'
+import { Callout, Tabs } from 'nextra/components'

3-5: Provide a fallback or require PUBLIC_APPS
The intro interpolates {process.env.PUBLIC_APPS} directly. If this environment variable isn’t set at build time, you’ll see an empty string or a runtime error. Consider either:

  1. Documenting that PUBLIC_APPS must be defined in .env.
  2. Adding a fallback in the MDX, e.g.:
-Add Pipedream's MCP server ... to {process.env.PUBLIC_APPS}+ APIs and 10,000+ tools.
+Add Pipedream's MCP server ... to {process.env.PUBLIC_APPS ?? '10,000'}+ APIs and 10,000+ tools.

44-48: Include PUBLIC_APPS in the environment variables setup
Since the tutorial references process.env.PUBLIC_APPS, add it to the list of required env vars. For example:

 Set the following environment variables:
 
 ```bash
 PIPEDREAM_CLIENT_ID=your_client_id
 PIPEDREAM_CLIENT_SECRET=your_client_secret
+PIPEDREAM_PROJECT_ID=your_project_id           # proj_xxxxxxx
+PIPEDREAM_ENVIRONMENT=development             # development | production
+PUBLIC_APPS=10000                             # number of public apps exposed

---

`82-87`: **Show `pd` initialization before using `pd.getApps()`**  
The snippet calls `pd.getApps()` without demonstrating how `pd` was created. Add a brief note or one‐liner to remind users to initialize the client, e.g.:  
```diff
+// Ensure you’ve initialized the Pipedream client:
+// const pd = createBackendClient({ environment: process.env.PIPEDREAM_ENVIRONMENT, credentials: { clientId: process.env.PIPEDREAM_CLIENT_ID, clientSecret: process.env.PIPEDREAM_CLIENT_SECRET }, projectId: process.env.PIPEDREAM_PROJECT_ID });
 
 // Get all available apps (paginated)
 const apps = await pd.getApps();
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between c399e6e and cb8effc.

📒 Files selected for processing (2)
  • docs-v2/pages/connect/mcp/developers.mdx (3 hunks)
  • docs-v2/pages/connect/mcp/openai.mdx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs-v2/pages/connect/mcp/openai.mdx
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
  • GitHub Check: validate-links

Comment on lines +155 to +159
{
Authorization: `Bearer ${PIPEDREAM_ACCESS_TOKEN}`,
"x-pd-project-id": PIPEDREAM_PROJECT_ID, // proj_xxxxxxx
"x-pd-environment": PIPEDREAM_ENVIRONMENT // development | production
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Clarify header variable references
The JavaScript snippet shows bare PIPEDREAM_ACCESS_TOKEN, PIPEDREAM_PROJECT_ID, etc., which aren’t defined. Update to use the accessToken variable and read env vars via process.env:

-{
-  Authorization: `Bearer ${PIPEDREAM_ACCESS_TOKEN}`,
-  "x-pd-project-id": PIPEDREAM_PROJECT_ID,
-  "x-pd-environment": PIPEDREAM_ENVIRONMENT // development | production
-}
+{
+  Authorization: `Bearer ${accessToken}`,
+  "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID,
+  "x-pd-environment": process.env.PIPEDREAM_ENVIRONMENT, // development | production
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
Authorization: `Bearer ${PIPEDREAM_ACCESS_TOKEN}`,
"x-pd-project-id": PIPEDREAM_PROJECT_ID, // proj_xxxxxxx
"x-pd-environment": PIPEDREAM_ENVIRONMENT // development | production
}
{
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID,
"x-pd-environment": process.env.PIPEDREAM_ENVIRONMENT, // development | production
}
🤖 Prompt for AI Agents
In docs-v2/pages/connect/mcp/developers.mdx around lines 155 to 159, the code
snippet uses undefined variables like PIPEDREAM_ACCESS_TOKEN and
PIPEDREAM_PROJECT_ID directly. Update the snippet to use the variable
accessToken for the token and access environment variables via process.env for
project ID and environment, ensuring the example is clear and functional.

Comment on lines +119 to +135

Pipedream's MCP servers can run in two modes:
// Initialize the Pipedream client with the SDK
const pd = createBackendClient({
environment: PIPEDREAM_ENVIRONMENT,
credentials: {
clientId: PIPEDREAM_CLIENT_ID,
clientSecret: PIPEDREAM_CLIENT_SECRET,
},
projectId: PIPEDREAM_PROJECT_ID
});

##### Stdio (for local testing)
// Get access token for MCP server auth
const accessToken = await pd.rawAccessToken();

console.log(accessToken);
```
</Tabs.Tab>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix Node.js snippet to read from process.env and handle await correctly
As written, the snippet references bare identifiers (PIPEDREAM_*) which will cause ReferenceError. Also, top-level await requires an ES module context. Proposed diff:

-import { createBackendClient } from "@pipedream/sdk/server";
-
-// Initialize the Pipedream client with the SDK
-const pd = createBackendClient({
-  environment: PIPEDREAM_ENVIRONMENT,
-  credentials: {
-    clientId: PIPEDREAM_CLIENT_ID,
-    clientSecret: PIPEDREAM_CLIENT_SECRET,
-  },
-  projectId: PIPEDREAM_PROJECT_ID
-});
-
-// Get access token for MCP server auth
-const accessToken = await pd.rawAccessToken();
-
-console.log(accessToken);
+import { createBackendClient } from "@pipedream/sdk/server";
+
+// Example assumes ES module with top‐level await enabled
+const pd = createBackendClient({
+  environment: process.env.PIPEDREAM_ENVIRONMENT,
+  credentials: {
+    clientId: process.env.PIPEDREAM_CLIENT_ID,
+    clientSecret: process.env.PIPEDREAM_CLIENT_SECRET,
+  },
+  projectId: process.env.PIPEDREAM_PROJECT_ID,
+});
+
+// Retrieve and log the access token
+const accessToken = await pd.rawAccessToken();
+console.log(accessToken);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { createBackendClient } from "@pipedream/sdk/server";
Pipedream's MCP servers can run in two modes:
// Initialize the Pipedream client with the SDK
const pd = createBackendClient({
environment: PIPEDREAM_ENVIRONMENT,
credentials: {
clientId: PIPEDREAM_CLIENT_ID,
clientSecret: PIPEDREAM_CLIENT_SECRET,
},
projectId: PIPEDREAM_PROJECT_ID
});
##### Stdio (for local testing)
// Get access token for MCP server auth
const accessToken = await pd.rawAccessToken();
console.log(accessToken);
```
import { createBackendClient } from "@pipedream/sdk/server";
// Example assumes ES module with top-level await enabled
const pd = createBackendClient({
environment: process.env.PIPEDREAM_ENVIRONMENT,
credentials: {
clientId: process.env.PIPEDREAM_CLIENT_ID,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET,
},
projectId: process.env.PIPEDREAM_PROJECT_ID,
});
// Retrieve and log the access token
const accessToken = await pd.rawAccessToken();
console.log(accessToken);
🤖 Prompt for AI Agents
In docs-v2/pages/connect/mcp/developers.mdx around lines 119 to 135, the Node.js
snippet incorrectly uses bare identifiers for environment variables and
top-level await without an async context. Fix this by replacing all
`PIPEDREAM_*` variables with `process.env.PIPEDREAM_*` to correctly access
environment variables. Also, wrap the asynchronous code inside an async function
or use an immediately invoked async function expression to properly handle the
await keyword.

Comment on lines +139 to +146
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "'$PIPEDREAM_CLIENT_ID'",
"client_secret": "'$PIPEDREAM_CLIENT_SECRET'"
}'
```
</Tabs.Tab>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct quoting in the cURL -d payload
Single-quoted strings in Bash do not expand variables. Change to double quotes and escape inner quotes so ${PIPEDREAM_*} is interpolated correctly:

-curl -s -X POST https://api.pipedream.com/v1/oauth/token \
-  -H "Content-Type: application/json" \
-  -d '{
-    "grant_type": "client_credentials", 
-    "client_id": "'$PIPEDREAM_CLIENT_ID'", 
-    "client_secret": "'$PIPEDREAM_CLIENT_SECRET'"
-  }'
+curl -s -X POST https://api.pipedream.com/v1/oauth/token \
+  -H "Content-Type: application/json" \
+  -d "{
+    \"grant_type\": \"client_credentials\",
+    \"client_id\": \"${PIPEDREAM_CLIENT_ID}\",
+    \"client_secret\": \"${PIPEDREAM_CLIENT_SECRET}\"
+  }"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
curl -s -X POST https://api.pipedream.com/v1/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "'$PIPEDREAM_CLIENT_ID'",
"client_secret": "'$PIPEDREAM_CLIENT_SECRET'"
}'
```
curl -s -X POST https://api.pipedream.com/v1/oauth/token \
-H "Content-Type: application/json" \
-d "{
\"grant_type\": \"client_credentials\",
\"client_id\": \"${PIPEDREAM_CLIENT_ID}\",
\"client_secret\": \"${PIPEDREAM_CLIENT_SECRET}\"
}"
🤖 Prompt for AI Agents
In docs-v2/pages/connect/mcp/developers.mdx around lines 139 to 146, the cURL
command uses single quotes around the JSON payload, preventing Bash from
expanding the environment variables. Change the outer quotes to double quotes
and escape the inner double quotes properly so that the ${PIPEDREAM_CLIENT_ID}
and ${PIPEDREAM_CLIENT_SECRET} variables are correctly interpolated in the
payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants