Skip to content

Fix MCP servers not being discovered for Gong and Salesforce plugins - #192

Merged
SamSokolin merged 1 commit into
mainfrom
ssokolin/fix-plugin-mcp-schema
Aug 5, 2026
Merged

Fix MCP servers not being discovered for Gong and Salesforce plugins#192
SamSokolin merged 1 commit into
mainfrom
ssokolin/fix-plugin-mcp-schema

Conversation

@SamSokolin

@SamSokolin SamSokolin commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes "$schema": "https://cursor.com/schemas/mcp.json" from third_party/gong/mcp.json and third_party/salesforce/mcp.json.

After #191 merged and the repo reindexed, both plugins registered with zero components — their MCP servers were silently dropped. The $schema key is the cause.

Root cause

parsePluginMcpConfig rejects the entire config when mcp.json declares a $schema that isn't locally recognized:

const mcpSchemaId = readSchemaId(data);
if (mcpSchemaId !== undefined) {
  if (resolveSchemaVersion(mcpSchemaId).kind === "unsupported") {
    return null;
  }
  ...
}

SUPPORTED_SCHEMA_IDS contains exactly two identifiers, both from the Agent Plugins 1.0.0 spec:

  • https://agent-plugins.org/schemas/1.0.0/plugin.schema.json
  • https://agent-plugins.org/schemas/1.0.0/mcp.schema.json

https://cursor.com/schemas/mcp.json is not one of them, so it resolves to unsupported, parsePluginMcpConfig returns null, and discovery records no MCP servers. The plugin still indexes fine — it just has nothing in it.

gmail, google-drive, and google-calendar omit $schema entirely, which is why they were unaffected and showed 1 component.

Worth noting the URL is not bogus in general: https://cursor.com/schemas/mcp.json is the correct $schema for a user's ~/.cursor/mcp.json. It just isn't valid for a plugin-owned mcp.json, which is governed by the Agent Plugins spec ids.

Verification

Ran the real parser against both files, before and after:

gong (fixed)            -> [ "gong" ]
gong (as-merged)        -> NULL (0 servers)
salesforce (fixed)      -> [ "salesforce" ]
salesforce (as-merged)  -> NULL (0 servers)

node scripts/validate-plugins.mjs passes.

Follow-up worth considering

scripts/validate-plugins.mjs did not catch this — it validates plugin.json and marketplace.json against the local JSON Schemas but never parses mcp.json. A plugin can therefore pass CI and index with its MCP servers silently discarded. A check that runs parsePluginMcpConfig over each plugin's declared mcpServers and fails when a plugin declares MCP but resolves to zero servers would have caught this at PR time. Happy to add it separately if that seems worthwhile.


Note

Low Risk
Third-party JSON-only change with no application code or auth flow modifications; restores intended MCP discovery behavior.

Overview
Gong and Salesforce plugin MCP configs no longer declare "$schema": "https://cursor.com/schemas/mcp.json". That URL is valid for user ~/.cursor/mcp.json but is not in the Agent Plugins 1.0.0 supported schema list, so parsePluginMcpConfig was returning null and both plugins indexed with zero MCP components.

The server definitions (mcpServers entries, auth, URLs) are unchanged; only the schema line is removed, matching plugins like Gmail that never set $schema.

Reviewed by Cursor Bugbot for commit b01315d. Bugbot is set up for automated code reviews on this repo. Configure here.

Both mcp.json files declared $schema: https://cursor.com/schemas/mcp.json.
parsePluginMcpConfig treats any $schema outside SUPPORTED_SCHEMA_IDS (the two
agent-plugins.org 1.0.0 ids) as unsupported and returns null, so indexing found
zero MCP servers and both plugins registered with no components.

The Google plugins omit $schema entirely, which is why they were unaffected.
Removing the key restores discovery.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SamSokolin
SamSokolin merged commit 8185ad9 into main Aug 5, 2026
1 check passed
github-actions Bot added a commit to SmailG/claude-cursor-plugins that referenced this pull request Aug 5, 2026
…cursor/ssokolin/fix-plugin-mcp-schema

chore: sync with cursor/plugins — Merge pull request cursor#192 from cursor/ssokolin/fix-plugin-mcp-schema
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.

1 participant