Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions scripts/verify-plugin.mjs
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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');
Expand All @@ -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');
}
Expand Down