From 9b0ac14b0374ff421bb620b2140dd68bc0a4614e Mon Sep 17 00:00:00 2001 From: hopeatina Date: Thu, 21 May 2026 22:48:57 -0500 Subject: [PATCH] Add Cursor MCP install deeplink --- README.md | 16 ++++++++++++++++ scripts/verify-plugin.mjs | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/README.md b/README.md index a218b6b..74d884e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,22 @@ This repo contains the plugin artifact needed for Cursor Marketplace submission 3. Restart Cursor or run `Developer: Reload Window` 4. Confirm the plugin loads from `~/.cursor/plugins/local/orgx` +## Install the OrgX MCP server in Cursor + +Use this one-click install link if you want the hosted OrgX MCP server in +Cursor before the full plugin is available in Cursor Marketplace: + +[Add OrgX MCP to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=orgx&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vbWNwLnVzZW9yZ3guY29tL21jcCJ9) + +Cursor should prompt to add an `orgx` MCP server with: + +```json +{ + "type": "http", + "url": "https://mcp.useorgx.com/mcp" +} +``` + ## Hook behavior Cursor lifecycle hooks call `scripts/hooks/record-work-graph-event.mjs`. The diff --git a/scripts/verify-plugin.mjs b/scripts/verify-plugin.mjs index 462d1f3..0e39555 100644 --- a/scripts/verify-plugin.mjs +++ b/scripts/verify-plugin.mjs @@ -1,6 +1,9 @@ import { existsSync, readFileSync } from 'node:fs'; import { resolve } from 'node:path'; +const CURSOR_MCP_DEEPLINK_PATTERN = + /cursor:\/\/anysphere\.cursor-deeplink\/mcp\/install\?name=([^&\s)]+)&config=([A-Za-z0-9_-]+)/; + const requiredFiles = [ '.cursor-plugin/plugin.json', '.mcp.json', @@ -23,6 +26,7 @@ if (missing.length) { const manifest = JSON.parse(readFileSync(resolve('.cursor-plugin/plugin.json'), 'utf8')); const mcp = JSON.parse(readFileSync(resolve('.mcp.json'), 'utf8')); const hooks = JSON.parse(readFileSync(resolve('hooks/hooks.json'), 'utf8')); +const readme = readFileSync(resolve('README.md'), 'utf8'); if (!manifest.name || !manifest.version) { throw new Error('plugin.json must include at least name and version'); @@ -32,6 +36,19 @@ if (!mcp.mcpServers || !mcp.mcpServers.orgx || !mcp.mcpServers.orgx.url) { throw new Error('.mcp.json must define the orgx MCP server'); } +const deeplinkMatch = readme.match(CURSOR_MCP_DEEPLINK_PATTERN); +if (!deeplinkMatch) { + throw new Error('README.md must include an Add OrgX MCP to Cursor deeplink'); +} +const [, deeplinkName, deeplinkConfig] = deeplinkMatch; +if (decodeURIComponent(deeplinkName) !== 'orgx') { + throw new Error(`Cursor MCP deeplink must install the orgx server; got ${deeplinkName}`); +} +const decodedDeeplinkConfig = JSON.parse(Buffer.from(deeplinkConfig, 'base64url').toString('utf8')); +if (JSON.stringify(decodedDeeplinkConfig) !== JSON.stringify(mcp.mcpServers.orgx)) { + throw new Error('Cursor MCP deeplink config must match .mcp.json mcpServers.orgx'); +} + if (!hooks.hooks || !hooks.hooks.sessionStart) { throw new Error('hooks/hooks.json must include sessionStart hooks'); }