Skip to content

fix(mcp): make UPSUN_API_TOKEN env var optional#34

Merged
pjcdawkins merged 1 commit into
mainfrom
fix/mcp-optional-api-token
May 17, 2026
Merged

fix(mcp): make UPSUN_API_TOKEN env var optional#34
pjcdawkins merged 1 commit into
mainfrom
fix/mcp-optional-api-token

Conversation

@pjcdawkins
Copy link
Copy Markdown
Collaborator

Summary

  • plugins/upsun/.mcp.json referenced ${UPSUN_API_TOKEN}, which Claude Code validates as a required env var. Installing the plugin without setting the token fails with Missing environment variables: UPSUN_API_TOKEN, even though the MCP server (mcp.upsun.com/mcp) authenticates via OAuth by default and the README documents OAuth as the default flow.
  • Switch to ${UPSUN_API_TOKEN:-} (shell-style empty default). When the var is unset the header is sent empty and the OAuth flow takes over via the server's www-authenticate: Bearer challenge. Users who do set the env var continue to get header-based auth.

🤖 Generated with Claude Code

The .mcp.json header used ${UPSUN_API_TOKEN} which Claude Code treats as
a required env var, so installing the plugin without setting the token
fails with "Missing environment variables: UPSUN_API_TOKEN" even though
the MCP server authenticates via OAuth by default.

Switch to the ${UPSUN_API_TOKEN:-} shell-style default so the header is
sent empty when the var is unset, and OAuth handles auth as documented.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 17, 2026 10:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the Upsun MCP server plugin configuration so installation doesn’t fail when UPSUN_API_TOKEN is not set, aligning the default behavior with the documented OAuth-based auth flow.

Changes:

  • Updates the MCP header interpolation from ${UPSUN_API_TOKEN} to ${UPSUN_API_TOKEN:-} to avoid requiring the env var at install time.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pjcdawkins pjcdawkins merged commit f2a6df2 into main May 17, 2026
5 checks passed
@pjcdawkins pjcdawkins deleted the fix/mcp-optional-api-token branch May 17, 2026 10:25
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