Skip to content

fix: remove shell-style string interpolation from MCP config#29

Merged
MattBro merged 2 commits intomainfrom
matt/fix-cursor-mcp-string-interpolation
Apr 16, 2026
Merged

fix: remove shell-style string interpolation from MCP config#29
MattBro merged 2 commits intomainfrom
matt/fix-cursor-mcp-string-interpolation

Conversation

@MattBro
Copy link
Copy Markdown
Collaborator

@MattBro MattBro commented Apr 15, 2026

Problem

Cursor and automations built on Cursor (like Lovable) don't support shell-style ${VAR:-default} string interpolation in MCP configs. Cursor only supports ${env:NAME}, ${userHome}, ${workspaceFolder}, etc.

Our mcp.json used ${POSTHOG_MCP_URL:-https://mcp.posthog.com/mcp}, which meant the URL was passed as a literal string instead of resolving to https://mcp.posthog.com/mcp. This broke the MCP connection for anyone installing from the Cursor marketplace.

Reported by Lovable via shared Slack channel, flagged by Georgiy.

Changes

  • Hardcode https://mcp.posthog.com/mcp in mcp.json and .mcp.json (removes the ${POSTHOG_MCP_URL:-...} wrapper)
  • Bump .cursor-plugin/plugin.json version from 1.0.41.1.2 to match the Claude plugin
  • Self-hosted users can still override the URL via POSTHOG_MCP_URL in their local MCP config per the README

How did you test this?

  • Verified the Cursor MCP docs confirm ${VAR:-default} is not a supported interpolation syntax
  • The change is a straightforward URL hardcode — no behavior change for PostHog Cloud users

Follow-up

After merging, we need to reach out to Cursor to update the marketplace listing (original setup was via email/form).

🤖 Generated with Claude Code

Cursor (and automations like Lovable) don't support `${VAR:-default}`
syntax in MCP configs. This caused the MCP URL to be passed as a
literal string instead of resolving to the actual endpoint.

Self-hosted users can still override via POSTHOG_MCP_URL in their
local MCP config per the README instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MattBro MattBro requested a review from rafaeelaudibert April 15, 2026 12:09
Comment thread .cursor-plugin/plugin.json Outdated
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MattBro MattBro merged commit 301cdec into main Apr 16, 2026
10 checks passed
@MattBro MattBro deleted the matt/fix-cursor-mcp-string-interpolation branch April 16, 2026 20:46
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