Skip to content

feat: add vercel-mcp to nuxi (admin only)#2343

Merged
HugoRCD merged 12 commits into
mainfrom
feat/nuxi-vercel-mcp
Jul 24, 2026
Merged

feat: add vercel-mcp to nuxi (admin only)#2343
HugoRCD merged 12 commits into
mainfrom
feat/nuxi-vercel-mcp

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Jul 22, 2026

Copy link
Copy Markdown
Member

Add a lot of new capabilities and improve current workflows

CleanShot 2026-07-22 at 22 34 15@2x

@HugoRCD HugoRCD self-assigned this Jul 22, 2026
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
nuxt Ready Ready Preview, Comment Jul 24, 2026 3:01pm

Request Review

@HugoRCD
HugoRCD marked this pull request as ready for review July 23, 2026 12:05
@HugoRCD
HugoRCD requested a review from atinux as a code owner July 23, 2026 12:05
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 65c2be78-e90a-44ae-80aa-a1d946855715

📥 Commits

Reviewing files that changed from the base of the PR and between 60680eb and e8aa8fd.

📒 Files selected for processing (1)
  • layers/nuxi/agent/connections/vercel-mcp.ts

📝 Walkthrough

Walkthrough

Adds admin-gated Vercel MCP and AI Gateway integrations with environment-backed authorization and session instructions. Introduces an analytics digest skill, Monday schedule, Slack delivery runner, and authenticated operations trigger. Expands weekly digest data collection and output rules with analytics, agent, and AI Gateway metrics. Updates weekly and firehose schedule times, runtime documentation, preview commands, and environment-file ignore patterns.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding an admin-only Vercel MCP integration to Nuxi.
Description check ✅ Passed The description is vague, but it still broadly matches the PR’s workflow and capability additions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/nuxi-vercel-mcp

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
.gitignore (1)

29-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exclude the checked-in environment template from this broad rule.

.env* also matches .env.example; add !.env.example after this rule, or use narrower local-only patterns, so future template changes are not silently ignored.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitignore at line 29, Update the .gitignore environment rule by adding an
exception for .env.example immediately after .env*, ensuring the checked-in
template remains trackable while other environment files stay ignored.
.env.example (1)

50-53: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep the new dotenv keys in linter order.

dotenv-linter reports that NUXI_VERCEL_PROJECT_ID should precede NUXI_VERCEL_TEAM_ID; reorder them to keep configuration checks clean. As reported by dotenv-linter 4.0.0.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.env.example around lines 50 - 53, Reorder the environment variable
declarations in the .env.example file so that NUXI_VERCEL_PROJECT_ID appears
before NUXI_VERCEL_TEAM_ID, following the alphabetical order expected by
dotenv-linter. Keep the shared comment above both variables unchanged.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@layers/nuxi/agent/connections/vercel-mcp.ts`:
- Around line 19-22: Add validation to ensure VERCEL_TEAM_ID and
VERCEL_PROJECT_ID are defined before exporting VERCEL_MCP_INSTRUCTIONS. If
either value is missing, either throw an error at startup to make these
variables required, or conditionally skip exporting the VERCEL_MCP_INSTRUCTIONS
constant and disable the connection when the IDs are unavailable. This prevents
the instructions from telling the agent to pass undefined values for teamId and
projectId.

In `@layers/nuxi/agent/skills/analytics-digest/SKILL.md`:
- Line 33: Update the sample date range in the Nuxt traffic digest heading to
represent exactly seven days, keeping it consistent with the “last 7 days”
wording and avoiding an eight-date inclusive span.

In `@layers/nuxi/agent/skills/weekly-digest/SKILL.md`:
- Around line 16-26: Update the authorization description for steps 6-9 (the
connection__vercel_mcp__get_web_analytics, ai_gateway__report, and
connection__vercel_mcp__list_agent_runs calls) to accurately reflect which
identity contexts are permitted. Either change the phrasing from
"admin/Slack-only" to "admin/Slack/schedule-only" to acknowledge that scheduled
runs with app auth are allowed, or explicitly document the exact trusted
identities that the authorization helper in admin-mcp-access.ts permits,
ensuring the documented access requirements align with what the code actually
enforces.

In `@layers/nuxi/agent/tools/ai-gateway.ts`:
- Around line 19-34: Update gatewayFetch to apply a timeout to the fetch request
by creating an AbortController or equivalent timeout signal and passing it
through the fetch options. Ensure the signal cancels stalled AI Gateway calls
within the intended request timeout while preserving the existing response and
error handling.
- Around line 49-60: Update the report tool’s inputSchema date validation so it
rejects requests where startDate is later than endDate, while preserving the
existing YYYY-MM-DD validation and inclusive boundary behavior. Add the
cross-field validation at the schema level so invalid windows fail locally
before the /report request is constructed.

---

Nitpick comments:
In @.env.example:
- Around line 50-53: Reorder the environment variable declarations in the
.env.example file so that NUXI_VERCEL_PROJECT_ID appears before
NUXI_VERCEL_TEAM_ID, following the alphabetical order expected by dotenv-linter.
Keep the shared comment above both variables unchanged.

In @.gitignore:
- Line 29: Update the .gitignore environment rule by adding an exception for
.env.example immediately after .env*, ensuring the checked-in template remains
trackable while other environment files stay ignored.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a001a466-a824-472e-bf58-56f96d05c442

📥 Commits

Reviewing files that changed from the base of the PR and between 3cc1854 and f08a5f6.

📒 Files selected for processing (15)
  • .env.example
  • .gitignore
  • layers/nuxi/README.md
  • layers/nuxi/agent/channels/ops.ts
  • layers/nuxi/agent/connections/vercel-mcp.ts
  • layers/nuxi/agent/instructions.ts
  • layers/nuxi/agent/lib/base-instructions.ts
  • layers/nuxi/agent/lib/vercel-connect.ts
  • layers/nuxi/agent/schedules/analytics-digest.ts
  • layers/nuxi/agent/schedules/firehose-summary.ts
  • layers/nuxi/agent/schedules/weekly-digest.ts
  • layers/nuxi/agent/skills/analytics-digest/SKILL.md
  • layers/nuxi/agent/skills/weekly-digest/SKILL.md
  • layers/nuxi/agent/tools/admin-mcp.ts
  • layers/nuxi/agent/tools/ai-gateway.ts

Comment thread layers/nuxi/agent/connections/vercel-mcp.ts Outdated
Comment thread layers/nuxi/agent/skills/analytics-digest/SKILL.md Outdated
Comment thread layers/nuxi/agent/skills/weekly-digest/SKILL.md Outdated
Comment thread layers/nuxi/agent/tools/ai-gateway.ts
Comment thread layers/nuxi/agent/tools/ai-gateway.ts
- guard VERCEL_MCP_INSTRUCTIONS when team/project ids are unset
- add fetch timeout + startDate<=endDate validation to ai-gateway report tool
- fix admin/Slack/schedule-only wording in weekly-digest skill
- fix 7-day sample date range in analytics-digest skill
- alphabetize NUXI_VERCEL_* in .env.example, track .env.example despite .env*

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
layers/nuxi/agent/skills/weekly-digest/SKILL.md (1)

48-48: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Back the “sessions saved” metric with a data query.

The workflow requests web chat counts and vote quality, but no step retrieves saved-session counts. As written, 2 sessions saved has no documented source and may be fabricated, violating the rule against invented metrics. Add an explicit data source or remove this field from the template.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@layers/nuxi/agent/skills/weekly-digest/SKILL.md` at line 48, Update the
weekly digest workflow and its output template so “sessions saved” is either
populated by an explicit query/data-retrieval step or removed entirely. Do not
emit a saved-session count without a documented source; preserve the existing
web chat and vote-quality metrics.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@layers/nuxi/agent/skills/weekly-digest/SKILL.md`:
- Line 48: Update the weekly digest workflow and its output template so
“sessions saved” is either populated by an explicit query/data-retrieval step or
removed entirely. Do not emit a saved-session count without a documented source;
preserve the existing web chat and vote-quality metrics.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f0ea3c53-f761-4d86-8948-023a3f2e66a6

📥 Commits

Reviewing files that changed from the base of the PR and between f08a5f6 and c64ec12.

📒 Files selected for processing (7)
  • .env.example
  • .gitignore
  • layers/nuxi/agent/connections/vercel-mcp.ts
  • layers/nuxi/agent/instructions.ts
  • layers/nuxi/agent/skills/analytics-digest/SKILL.md
  • layers/nuxi/agent/skills/weekly-digest/SKILL.md
  • layers/nuxi/agent/tools/ai-gateway.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • .gitignore
  • layers/nuxi/agent/instructions.ts
  • layers/nuxi/agent/connections/vercel-mcp.ts
  • layers/nuxi/agent/tools/ai-gateway.ts

@HugoRCD
HugoRCD merged commit 8f1df70 into main Jul 24, 2026
10 of 12 checks passed
@HugoRCD
HugoRCD deleted the feat/nuxi-vercel-mcp branch July 24, 2026 14:58
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