Cowork desktop: Custom MCP connector URL field doesn't expand environment variables
Summary
The "Agregar conector personalizado" (Add custom connector) UI in Cowork desktop does not expand environment variable references like ${VAR} or ${VAR:-default} in the URL field. The string is sent literally to the MCP server, causing DNS/connection failures.
Reproduction
- Open Cowork desktop → Customize → Conectores → Agregar conector personalizado
- In the URL field, paste:
${POWI_MCP_URL:-https://us-central1-powi-staging-488705.cloudfunctions.net/powiMcpServer} - (Optional) Configuración avanzada → set Authorization header:
Bearer ${POWI_MCP_TOKEN} - Save → click "Conectar"
Expected
Cowork resolves ${POWI_MCP_URL} from the environment (or applies the :- default value) and connects to the MCP server.
Actual
Error: "Couldn't reach the MCP server. You can check the server URL and verify the server is running."
Reference ID: ofid_667d0f69e01971cc
The literal string ${POWI_MCP_URL:-...} is sent as the URL, which is not a valid HTTP target.
Why this matters
Plugins distributed via marketplace declare MCP servers in .mcp.json using the documented ${VAR} syntax (supported by Claude Code CLI). When the same plugin is consumed via Cowork desktop, the connector pre-fills with the literal placeholder and breaks. This forces users to manually edit and paste expanded URLs/tokens at install time, which defeats the portability of distributing plugins with env-var defaults.
In our case the plugin lives at marketplace admin431/PoWi-Mobile, version powi-claude-plugin@1.4.0, and declares an HTTP MCP server with Bearer auth — both fields use \\${VAR}\ placeholders that work fine via CLI but fail in Cowork.
Workaround
Replace the placeholder with the literal expanded URL/token in the connector form. Loses portability across staging/prod environments.
Environment
- Cowork desktop (Windows 11)
- Plugin: \
powi-claude-plugin@1.4.0\from marketplace \admin431/PoWi-Mobile\ - MCP server type: \
http\, Bearer auth header
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗