Skip to content

Conversation

@dannyroosevelt
Copy link
Collaborator

@dannyroosevelt dannyroosevelt commented May 20, 2025

WHY

Summary by CodeRabbit

  • Documentation
    • Updated documentation to reflect the rebranding to Pipedream Connect and its expanded integration with OpenAI tool calls.
    • Improved clarity in introductory text and callouts, emphasizing built-in user authentication and simplified setup.
    • Added a structured "Steps" component for clearer getting started instructions, including environment setup and usage examples.
    • Enhanced and clarified code and cURL examples, demonstrating complete end-to-end integration flows.
    • Made minor wording improvements for better readability and consistency.

@vercel
Copy link

vercel bot commented May 20, 2025

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

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview May 20, 2025 11:59pm
pipedream-docs ⬜️ Ignored (Inspect) May 20, 2025 11:59pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) May 20, 2025 11:59pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 20, 2025

Walkthrough

The documentation was revised to rebrand "Pipedream MCP" as "Pipedream Connect," introducing a structured "Steps" component and clarifying environment variable setup. It added detailed examples for discovering MCP servers via the SDK, obtaining access tokens, and making OpenAI tool calls with updated headers. The cURL example was rewritten for a complete OAuth and request flow, and wording improvements were made throughout.

Changes

File(s) Change Summary
docs-v2/pages/connect/mcp/openai.mdx Rebranded "Pipedream MCP" to "Pipedream Connect," added a "Steps" component for setup instructions, clarified environment variables, expanded SDK usage examples for app discovery and token retrieval, updated OpenAI request examples with new headers, rewrote cURL example for full OAuth flow, and improved explanatory text.

Poem

🐇
In docs we leap, with steps anew,
Pipedream Connect—now clear for you!
OpenAI calls, with headers tight,
Examples shine, instructions right.
From app discovery to cURL’s delight,
We’ve hopped ahead—docs now bright!
—Your friendly rabbit, coding in the light.

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 16th. 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: 1

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

5-5: Fix typo in "capabilties".

The word “capabilties” is misspelled—should be capabilities.


37-37: Introduce "Discover available MCP servers" section.

Great to show how to find which MCP servers (apps) are available. Consider explaining what process.env.PUBLIC_APPS resolves to in the docs build context.

Also applies to: 39-39


41-45: Provide code examples for listing all apps.

The snippet is concise and informative. You may want to add a note about paginating through apps.next if more than one page of results is expected.

Also applies to: 47-49


52-53: Add "Search for a specific app" tab.

These examples clearly demonstrate how to filter apps by name. Consider mentioning that the query is case-insensitive.

Also applies to: 54-57


124-127: Optional: Polish the cURL example.

The end-to-end flow is clear, but you can streamline quoting for bash substitution and ensure consistency:

-  "client_secret": "'$PIPEDREAM_CLIENT_SECRET'"
+  "client_secret": "$PIPEDREAM_CLIENT_SECRET"

Also, consider adding -s to subsequent curl commands for quieter output and noting that jq is required.

Also applies to: 130-133, 135-138, 140-144, 156-161

📜 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 9d78c8b and 2ce6143.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • docs-v2/pages/connect/mcp/openai.mdx (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: validate-links
  • GitHub Check: Lint Code Base
🔇 Additional comments (12)
docs-v2/pages/connect/mcp/openai.mdx (12)

1-1: Verify the import of Steps from Nextra.

You’ve added Steps to the import list from nextra/components, which is great for structuring the guide. Please confirm that the version of Nextra in use actually exports Steps (it’s a relatively new component) and update the package if needed.


8-8: Callout clarifies built-in auth—good enhancement.
This clearly explains that no custom auth flow or token management is required.


11-11: Introduce a structured "Getting started" section using <Steps>.

The new heading and wrapper improve readability by breaking the workflow into discrete steps.

Also applies to: 13-13


15-15: Add "Set up your environment" step heading.

This clearly delineates the first action needed—excellent for developer onboarding.


20-20: Validate the link to project creation docs.

You link to /projects/#creating-projects; please verify that the anchor matches the target heading in the live site to avoid broken links.


24-24: Clarify developer vs. end-user requirements.

The callout is spot-on to distinguish who needs to sign up—no changes needed here.


27-27: Introduce environment variables section.

Good step to show where to configure your Pipedream credentials.


34-34: Add OPENAI_API_KEY env var.

Including the OpenAI key is critical—this completes the required vars list.


62-62: Outline the steps for the OpenAI integration.

Your bullet list succinctly covers initializing the SDK, selecting the server, auth, and making the tool call—very helpful.

Also applies to: 64-69


169-169: Close the <Steps> component.

The closing tag is in place—this correctly caps the stepper layout.


173-173: Reaffirm account connection benefits.

This line effectively summarizes the core value proposition—no changes needed.


183-183: Confirm "Return a link" implementation detail.

Noting that no client-side code is required here is helpful.

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: 2

♻️ Duplicate comments (3)
docs-v2/pages/connect/mcp/openai.mdx (3)

39-39: Duplicate: Flagged PUBLIC_APPS usage
(See earlier comment on line 5 about process.env.PUBLIC_APPS consistency.)


75-83: ⚠️ Potential issue

Incorrect env var references in createBackendClient
You’re passing raw identifiers instead of process.env.*, which will cause runtime errors. For example:

 const pd = createBackendClient({
-  environment: PIPEDREAM_ENVIRONMENT,
+  environment: process.env.PIPEDREAM_ENVIRONMENT,
   credentials: {
-    clientId: PIPEDREAM_CLIENT_ID,
-    clientSecret: PIPEDREAM_CLIENT_SECRET,
+    clientId: process.env.PIPEDREAM_CLIENT_ID,
+    clientSecret: process.env.PIPEDREAM_CLIENT_SECRET,
   },
-  projectId: PIPEDREAM_PROJECT_ID
+  projectId: process.env.PIPEDREAM_PROJECT_ID,
 });

104-111: ⚠️ Potential issue

Fix env var usage in tool headers
As with the Pipedream client, these need process.env.*. For example:

  headers: {
-   Authorization: `Bearer ${accessToken}`,
-   "x-pd-project-id": PIPEDREAM_PROJECT_ID,
-   "x-pd-environment": PIPEDREAM_ENVIRONMENT
+   Authorization: `Bearer ${accessToken}`,
+   "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID,
+   "x-pd-environment": process.env.PIPEDREAM_ENVIRONMENT,
  },

Also verify the MCP domain (mcp.pipedream.net) is correct and accessible.

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

20-20: Verify project link anchor
Ensure /projects/#creating-projects matches the actual heading slug in that page (e.g., it might be #creating-a-project). Confirm the fragment to avoid a broken link.


44-45: Clarify pd context in snippet
The snippet uses pd.getApps() without showing how pd was initialized. Add a note such as:

// `pd` is the Pipedream client from createBackendClient()—see “Node.js” tab for init

85-89: Add error handling for app search
If apps.data is empty, apps.data[0] will throw. Consider guarding this:

if (!apps.data?.length) {
  throw new Error("No MCP apps found for the given query");
}
const appSlug = apps.data[0].name_slug;

90-91: Optional: Handle access token errors
await pd.rawAccessToken() may fail. Wrapping in try/catch can surface errors more clearly:

try {
  accessToken = await pd.rawAccessToken();
} catch (err) {
  console.error("Failed to fetch MCP access token:", err);
  throw err;
}

93-94: Use a placeholder or env var for externalUserId
Hardcoding 'abc-123' may confuse readers. Consider:

const externalUserId = process.env.EXTERNAL_USER_ID || "abc-123";
📜 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 2ce6143 and a7a11c8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • docs-v2/pages/connect/mcp/openai.mdx (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: pnpm publish
  • GitHub Check: validate-links
🔇 Additional comments (12)
docs-v2/pages/connect/mcp/openai.mdx (12)

1-1: Import Steps component
The Steps component is now used in the document, so this import is necessary and correctly added.


5-5: Verify PUBLIC_APPS reference
You’re rendering {process.env.PUBLIC_APPS} in the markdown. Confirm that PUBLIC_APPS is defined at build time—otherwise it will display as undefined. If you intended to show a static count (e.g., “200+”), consider replacing this with a literal.


8-8: Clarify built-in authentication callout
The updated callout succinctly explains the built-in auth benefits.


11-11: Add “Getting started” section
The new section heading correctly introduces the tutorial steps.


15-15: Add “Set up your environment” subsection
This subsection clearly outlines the required environment variables.


24-24: Approve developer requirements callout
Clarifies that end users don’t need a Pipedream account—good improvement.


37-37: Add “Discover available MCP servers” subsection
This heading nicely segments the flow.


101-101: Validate model name
"gpt-4.1" does not match a published OpenAI model. Confirm the correct identifier (e.g., "gpt-4").


115-116: Approve input example
The prompt clearly demonstrates using the tool.


168-168: Approve <Steps> closure
The <Steps> component is correctly closed.


172-172: Approve account connection introduction
This text effectively describes the core feature.


182-182: Approve “Return a link” detail
The note clarifies that no implementation is required.

Comment on lines 29 to 35
```bash
OPENAI_API_KEY=your_openai_api_key
PIPEDREAM_CLIENT_ID=your_client_id
PIPEDREAM_CLIENT_SECRET=your_client_secret
PIPEDREAM_PROJECT_ID=your_project_id
PIPEDREAM_ENVIRONMENT=development
```
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

Add PUBLIC_APPS to environment setup
You reference process.env.PUBLIC_APPS earlier but haven’t listed it here. Consider adding:

PUBLIC_APPS=your_public_apps_count

so readers know to define it.

🤖 Prompt for AI Agents
In docs-v2/pages/connect/mcp/openai.mdx around lines 29 to 35, the environment
variable PUBLIC_APPS is referenced but not included in the setup instructions.
Add a line defining PUBLIC_APPS in the environment variables section, for
example, PUBLIC_APPS=your_public_apps_count, to ensure users know to define it.

Comment on lines +96 to 97
const client = new OpenAI();

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

Include OPENAI_API_KEY in OpenAI client
new OpenAI() needs the API key context. Update to:

- const client = new OpenAI();
+ const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
📝 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
// Initialize OpenAI client
const client = new OpenAI();
// Initialize OpenAI client
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
🤖 Prompt for AI Agents
In docs-v2/pages/connect/mcp/openai.mdx around lines 96 to 97, the OpenAI client
is initialized without passing the required API key. Update the client
initialization to include the OPENAI_API_KEY by passing it as a parameter or
configuration option to the OpenAI constructor to ensure proper authentication.

@dannyroosevelt dannyroosevelt merged commit 2d1fb4c into master May 21, 2025
9 checks passed
@dannyroosevelt dannyroosevelt deleted the danny/connect-docs-mcp-1 branch May 21, 2025 00:06
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