-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Danny/connect docs mcp 1 #16732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Danny/connect docs mcp 1 #16732
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThe 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
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit 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. Note ⚡️ Faster reviews with cachingCodeRabbit 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 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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_APPSresolves 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.nextif 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
-sto subsequentcurlcommands for quieter output and noting thatjqis 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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 ofStepsfrom Nextra.You’ve added
Stepsto the import list fromnextra/components, which is great for structuring the guide. Please confirm that the version of Nextra in use actually exportsSteps(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: AddOPENAI_API_KEYenv 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.
…edream into danny/connect-docs-mcp-1
…edream into danny/connect-docs-mcp-1
There was a problem hiding this 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: FlaggedPUBLIC_APPSusage
(See earlier comment on line 5 aboutprocess.env.PUBLIC_APPSconsistency.)
75-83:⚠️ Potential issueIncorrect env var references in
createBackendClient
You’re passing raw identifiers instead ofprocess.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 issueFix env var usage in tool headers
As with the Pipedream client, these needprocess.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-projectsmatches 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: Clarifypdcontext in snippet
The snippet usespd.getApps()without showing howpdwas 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
Ifapps.datais 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 intry/catchcan 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 forexternalUserId
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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: ImportStepscomponent
TheStepscomponent is now used in the document, so this import is necessary and correctly added.
5-5: VerifyPUBLIC_APPSreference
You’re rendering{process.env.PUBLIC_APPS}in the markdown. Confirm thatPUBLIC_APPSis defined at build time—otherwise it will display asundefined. 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.
| ```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 | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_countso 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.
| const client = new OpenAI(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| // 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.
WHY
Summary by CodeRabbit