Skip to content

fix(vscode): switch all 15 extensions to real mcpServerDefinitionProviders API#359

Merged
Germey merged 2 commits into
mainfrom
fix/vscode-real-mcp-provider
May 31, 2026
Merged

fix(vscode): switch all 15 extensions to real mcpServerDefinitionProviders API#359
Germey merged 2 commits into
mainfrom
fix/vscode-real-mcp-provider

Conversation

@acedatacloud-dev
Copy link
Copy Markdown
Member

What

Replaces the broken VS Code extension manifest with a real, working one for
all 15 MCP marketplace extensions (mcp-suno, mcp-midjourney, …,
mcp-shorturl).

Why this is needed

The release shipped via PR #356 / #358 used contributes.mcpServers plus a
root-level contributes.inputs block. Neither is a valid VS Code
contribution point — VS Code parses the manifest, finds no recognised
contribution, and registers nothing.

User-visible symptom: install the extension → nothing happens. No token
prompt, no server in Configure Tools, no entry in the MCP tools panel.

Verified against:

  • src/vs/workbench/contrib/mcp/common/mcpConfiguration.ts in
    microsoft/vscode — the only MCP extension point is
    mcpServerDefinitionProviders.
  • vscode.d.ts confirms vscode.McpHttpServerDefinition,
    vscode.McpStdioServerDefinition,
    vscode.lm.registerMcpServerDefinitionProvider, and a
    resolveMcpServerDefinition hook for runtime auth.
  • Downloaded acedatacloud.mcp-suno@2026.531.0 from the marketplace and
    confirmed the manifest VS Code receives is byte-identical to our broken
    one.
  • Downloaded upstash.context7-mcp and confirmed it ships exactly the
    shape this PR adopts (just stdio instead of http).

How

For each <service>/vscode/:

  • package.jsoncontributes.mcpServerDefinitionProviders: [{id, label}]
    • commands (Set / Clear API Token) + main: ./extension.js +
      engines.vscode: ^1.101.0 (first stable release with the API; Context7
      uses the same).
  • New extension.js — vanilla JS, no build step. Registers the provider
    and resolves the server with a Bearer token sourced from
    $ACEDATACLOUD_API_TOKEN, then VS Code SecretStorage, then an
    interactive showInputBox prompt as last resort. Two commands let users
    rotate or clear the stored token.
  • README.md "Configuration" section rewritten to describe the new flow;
    manual mcp.json snippets demoted to alternatives.
  • In-repo version bumped 0.2.0 → 0.3.0; CalVer pipeline will assign the
    real marketplace version on push to main.

scripts/build_vscode_extensions.py was updated to be the single source of
truth — re-running it reproduces all 45 changed files byte-for-byte.

Verification

$ cd suno/vscode && npx -y @vscode/vsce package --no-git-tag-version
 INFO  Files included in the VSIX:
mcp-suno-0.3.0.vsix
├─ extension/
│  ├─ LICENSE.txt
│  ├─ changelog.md
│  ├─ extension.js          [3.32 KB]
│  ├─ icon.png
│  ├─ package.json
│  └─ readme.md
 DONE  Packaged: …/mcp-suno-0.3.0.vsix (8 files, 65.74 KB)

# packaged manifest (from inside the .vsix):
main:        ./extension.js
engines:     { vscode: ^1.101.0 }
contributes: ['mcpServerDefinitionProviders', 'commands']
provider:    [{id: 'acedatacloud.suno', label: 'Suno MCP'}]

No publish-workflow changes needed: vsce package ships extension.js as
plain JS, no compile step required.

Follow-up

Once this merges, the per-service publish.yml jobs in each sub-repo will
auto-publish a fresh CalVer build (2026.<MMDD>.0) to the marketplace and
fix the 15 broken extensions currently live.

…iders API

The previous release shipped a manifest using `contributes.mcpServers` +
root-level `contributes.inputs` — neither of which are valid VS Code
contribution points. VS Code parsed the manifest, found nothing it
recognised, and silently registered nothing. Result: installing the
extension did literally nothing — no token prompt, no MCP server in
Configure Tools.

Verified against:
  - src/vs/workbench/contrib/mcp/common/mcpConfiguration.ts in
    microsoft/vscode (extensionPoint: 'mcpServerDefinitionProviders' is
    the only one that exists).
  - vscode.d.ts (`McpHttpServerDefinition`, `McpStdioServerDefinition`,
    `McpServerDefinitionProvider`, `lm.registerMcpServerDefinitionProvider`).
  - Upstash Context7 marketplace package (reference working extension).

This change:
  - `package.json` now uses `contributes.mcpServerDefinitionProviders`
    + `activationEvents: []` + `main: ./extension.js` and contributes
    two commands (Set / Clear API Token) under the MCP category.
  - Adds a vanilla-JS `extension.js` per service that calls
    `vscode.lm.registerMcpServerDefinitionProvider` and returns a
    `McpHttpServerDefinition` pointing at the hosted endpoint. The
    `resolveMcpServerDefinition` hook reads the token from (in order)
    $ACEDATACLOUD_API_TOKEN, VS Code SecretStorage, or an interactive
    showInputBox prompt — and injects it as a Bearer header.
  - Bumps `engines.vscode` to ^1.101.0 (first stable release with the
    API, also Context7's minimum).
  - Bumps the in-repo `version` to 0.3.0; the marketplace will see
    a fresh CalVer build on the next push to main.
  - Rewrites the README "Configuration" section to describe the new
    flow and demotes the manual mcp.json snippets to alternatives.

No publish-workflow changes required — `vsce package` happily picks
up the plain-JS `extension.js` from disk (verified locally: VSIX
ships with the right main + contribution point).

Codegen reflects all of the above; `python3 scripts/build_vscode_extensions.py`
remains the single source of truth for these 15 directories.
- Replace misleading sk- placeholder with neutral API key placeholder
- Point users to /console/applications (Applications -> API Key)
- Rename user-facing text from 'API token' to 'API key' in popup,
  command titles, error/info toasts, and README quick-start/config sections
- Regenerate all 15 vscode extension bundles via codegen
@Germey Germey merged commit 7a44c35 into main May 31, 2026
76 checks passed
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