Skip to content

Conversation

@RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Nov 10, 2025

  • For CLI, add warnings for unresolved secrets, or throw error if in headless
  • For extensions, make warnings more explanatory/up-to-date and move to mcp connection class

Summary by cubic

Detect unresolved MCP secrets and surface clear errors in extensions; in headless CLI, throw an error to prevent misconfigured runs. Secret checks are now done at connection time for more accurate feedback.

  • Bug Fixes

    • Show an error when MCP server config has unresolved secrets and list their names.
    • In headless CLI, treat unresolved secrets as errors and mark MCP status as error.
    • Add guidance links for personal/org secrets and “Include in Env”.
  • Refactors

    • Move secret validation from YAML load to MCPConnection and CLI service.
    • Use getTemplateVariables and decodeSecretLocation to extract secret names from server config.

Written for commit 0b011ea. Summary will update automatically on new commits.

@RomneyDa RomneyDa requested a review from a team as a code owner November 10, 2025 03:56
@RomneyDa RomneyDa requested review from sestinj and removed request for a team November 10, 2025 03:56
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 10, 2025
@github-actions
Copy link

github-actions bot commented Nov 10, 2025

✅ Review Complete

Code Review Summary

⚠️ Continue configuration error. Please verify that the assistant exists in Continue Hub.


Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 3 files

Prompt for AI agents (all 2 issues)

Understand the root cause of the following 2 issues and fix them.


<file name="core/context/mcp/MCPConnection.ts">

<violation number="1" location="core/context/mcp/MCPConnection.ts:172">
decodeSecretLocation expects a colon-delimited secret location (e.g. &quot;user:slug/secret&quot;), but this passes plain secret keys like &quot;OPENAI_API_KEY&quot;. When unresolved secrets are present, decodeSecretLocation throws and connectClient crashes instead of collecting the warning.</violation>
</file>

<file name="extensions/cli/src/services/MCPService.ts">

<violation number="1" location="extensions/cli/src/services/MCPService.ts:257">
decodeSecretLocation is being invoked on every template variable, so any non-secret placeholder (e.g. ${{ inputs.* }}) makes rest undefined inside decodeSecretLocation and causes connectServer to throw before establishing the connection.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.


try {
if (unrendered.length > 0) {
const message = `${serverConfig.name} MCP Server has unresolved secrets: ${unrendered.join(", ")}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This seems duplicate but the message is different enough for CLI since process.env is supported that I decided to leave them separate.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 19, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Nov 19, 2025
@sestinj sestinj merged commit 465ca62 into main Nov 19, 2025
56 of 58 checks passed
@sestinj sestinj deleted the dallin/error-untemplated-mcp-secrets branch November 19, 2025 18:43
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Nov 19, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
@sestinj
Copy link
Contributor

sestinj commented Nov 19, 2025

🎉 This PR is included in version 1.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

lgtm This PR has been approved by a maintainer released size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants