Skip to content

MCP: next update#912

Merged
N2D4 merged 5 commits into
devfrom
mcp-set
Oct 1, 2025
Merged

MCP: next update#912
N2D4 merged 5 commits into
devfrom
mcp-set

Conversation

@osammotg
Copy link
Copy Markdown
Contributor

@osammotg osammotg commented Sep 22, 2025

High-level PR Summary

This PR makes minor updates to the MCP (Management Control Plane) with two simple changes: 1) Consolidating file tracing configurations in next.config.mjs to include content files, and 2) Renaming a variable in the route handler for better clarity without changing functionality. Both changes are straightforward refactors that don't alter system behavior.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 docs/next.config.mjs
2 docs/src/app/api/internal/[transport]/route.ts

Review by RecurseML

🔍 Review performed on 7a0bf86..c328f56

  Severity     Location     Issue     Delete  
Low docs/src/app/api/internal/[transport]/route.ts:251 Misleading variable name
⏭️ Files skipped (trigger manually) (1)
  Locations     Trigger Analysis  
docs/next.config.mjs Analyzed

Need help? Join our Discord

Summary by CodeRabbit

  • Chores
    • Updated docs site build configuration to include both content and API specification assets in output tracing across all paths, improving completeness and reliability of deployed documentation.
  • Refactor
    • Minor internal variable renaming in an API route handler with no functional impact or user-visible changes.

Note

Expand Next.js output tracing to cover content files and rename a variable in the MCP setup-instructions tool.

  • Docs build config (docs/next.config.mjs):
    • Expand outputFileTracingIncludes for /**/* to include ./content/**/* alongside ./openapi/**/* (consolidates tracing; removes separate /api/**/* entry).
  • MCP route (docs/src/app/api/internal/[transport]/route.ts):
    • Rename variable for setup instructions path and use it consistently (instructionsFromCurrentFile).

Written by Cursor Bugbot for commit 2d87e58. This will update automatically on new commits. Configure here.

@vercel
Copy link
Copy Markdown

vercel Bot commented Sep 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
stack-backend Ready Ready Preview Comment Sep 30, 2025 11:41am
stack-dashboard Ready Ready Preview Comment Sep 30, 2025 11:41am
stack-demo Ready Ready Preview Comment Sep 30, 2025 11:41am
stack-docs Ready Ready Preview Comment Sep 30, 2025 11:41am

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 22, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ N2D4
❌ osammotg
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 22, 2025

Walkthrough

Updated Next.js output file tracing to include both content and OpenAPI paths via a single glob. Renamed a local constant in an internal API route reading setup instructions, without altering behavior or outputs.

Changes

Cohort / File(s) Summary
Docs build config
docs/next.config.mjs
Consolidated outputFileTracingIncludes: replaced separate '/api//*' and '//' mappings with a single '/**/' mapping to include ./content/**/* and ./openapi/**/*.
Internal API route
docs/src/app/api/internal/[transport]/route.ts
Renamed local constant from instructionsPath to instructionsFromCurrentFile; file path and read logic unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A whisk of whiskers, I tap-tap keys,
Tracing widened through docs’ trees.
OpenAPI meets content’s glow,
One glob to catch the files that flow.
I nibble names—just a tidy rename—
Hop along, deploy the same. 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “MCP: next update” is overly vague and does not clearly convey the primary changes of consolidating file tracing globs in next.config.mjs or renaming a variable in the route handler, making it hard for a reviewer to understand the main impact at a glance. Please update the title to succinctly reflect the core changes, for example “docs: consolidate outputFileTracingIncludes globs and rename instructionsPath variable,” so that the intent of the PR is immediately clear.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The pull request description includes the required CONTRIBUTING.md guideline comment as specified in the repository template and provides a clear high-level summary of changes, an estimated review time, and a suggested review order, making it comprehensive and aligned with the expected structure.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mcp-set

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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR makes two small configuration updates related to MCP (Model Context Protocol) integration. The changes include a variable renaming in the MCP handler route and a consolidation of Next.js output file tracing configuration.

In the docs API route (docs/src/app/api/internal/[transport]/route.ts), the variable instructionsPath is renamed to instructionsFromCurrentFile to make it more descriptive while maintaining the same functionality of reading from 'content/setup-instructions.md'. This is purely a code clarity improvement with no functional changes.

The more significant change is in the Next.js configuration (docs/next.config.mjs) where the outputFileTracingIncludes configuration is simplified. Previously, there were separate patterns for /api/**/* and /**/*, but now they're consolidated into a single /**/* pattern that includes both ./content/**/* and ./openapi/**/*. This ensures that both content files (needed for MCP documentation serving) and OpenAPI files are properly traced for Vercel deployments.

The changes work together to support the MCP integration where the API route needs runtime access to markdown files from the content directory, requiring proper file tracing configuration for deployment environments.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it contains only cosmetic variable renaming and configuration consolidation
  • Score reflects simple, well-understood changes with clear purpose and no breaking functionality
  • No files require special attention as both changes are straightforward configuration updates

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

try {
const instructionsPath = "content/setup-instructions.md";
const instructions = await readFile(instructionsPath, "utf-8");
const instructionsFromCurrentFile = "content/setup-instructions.md";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The variable name 'instructionsFromCurrentFile' doesn't accurately describe its purpose and content. This variable contains a file path to instructions, not the actual instructions from a file as the name suggests. According to the naming conventions rule, variables should 'use descriptive names that clearly indicate purpose and context'. A more appropriate name would be 'instructionsPath' (which was the original name) or 'instructionsFilePath' to clearly indicate it's storing a path to a file containing instructions.

🔍 This comment matches your naming.mdc rule.

Suggested change
const instructionsFromCurrentFile = "content/setup-instructions.md";
const instructionsFilePath = "content/setup-instructions.md";

React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)

Copy link
Copy Markdown
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/src/app/api/internal/[transport]/route.ts (1)

251-253: Name clarity + robust path resolution for serverless environments

Rename the var for clarity and resolve the path from process.cwd() to avoid cwd-relative pitfalls across Next/Vercel builds.

Apply this diff:

+import { join } from "node:path";
@@
-          const instructionsFromCurrentFile = "content/setup-instructions.md";
-          const instructions = await readFile(instructionsFromCurrentFile, "utf-8");
+          const setupInstructionsPath = join(process.cwd(), "content", "setup-instructions.md");
+          const instructions = await readFile(setupInstructionsPath, "utf-8");
docs/next.config.mjs (2)

14-14: Broadened tracing looks correct; consider narrowing if bundle size/cold starts grow

Including both content and openapi under '//*' should fix runtime reads. If bundles get large, scope the key to just the MCP route subtree (e.g., '/api/internal/') as a follow-up.

Optional: after a canary deploy, check function size and cold start metrics before/after this change.


12-12: Update comment to reflect current intent

The comment says “Include OpenAPI files,” but the config now includes both content and OpenAPI.

Proposed tweak:

-  // Include OpenAPI files in output tracing for Vercel deployments
+  // Include content and OpenAPI files in output tracing for Vercel deployments
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a0bf86 and c328f56.

📒 Files selected for processing (2)
  • docs/next.config.mjs (1 hunks)
  • docs/src/app/api/internal/[transport]/route.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer ES6 Map over Record when representing key–value collections

Files:

  • docs/src/app/api/internal/[transport]/route.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: all-good
  • GitHub Check: docker
  • GitHub Check: setup-tests
  • GitHub Check: build (22.x)
  • GitHub Check: docker
  • GitHub Check: restart-dev-and-test
  • GitHub Check: lint_and_build (latest)
  • GitHub Check: build (22.x)
  • GitHub Check: Security Check

@N2D4 N2D4 merged commit 27f6a91 into dev Oct 1, 2025
20 of 21 checks passed
@N2D4 N2D4 deleted the mcp-set branch October 1, 2025 14:48
Copy link
Copy Markdown

@recurseml recurseml Bot left a comment

Choose a reason for hiding this comment

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

⚙️ Scanning changes in f5a3a99..2d87e58 for bugs...

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.

3 participants