docs(mcp): add one-click Cursor and VS Code install links (#5334)

Add "Add to Cursor" and "Install in VS Code" buttons to the OpenWork
Connect installer and the same links to the Cursor and VS Code guides,
in each editor's documented install-link format. Remove the Codex and
ChatGPT "Open settings + copy URL" buttons so a button always installs.

The parity check stops forbidding Cursor install links. That guard came
from #2696, when OpenWork rejected Cursor Desktop's OAuth callback;
#3059 allowlisted the callback with PKCE S256 enforced. The check now
rebuilds both links from MCP_SERVER_URL and fails if the installer or
the guides drift.
This commit is contained in:
Jalil authored and GitHub committed 2026-09-24 16:19:00 -07:00
1 parent 71b5ec0830
commit 7208754148
4 files changed
+30 -23

No files matched your search

@@ -26,9 +26,10 @@ pinned into the token. If you do not have an account, create a
## Cursor Desktop
Add OpenWork as a remote MCP server in Cursor's MCP settings, paste the server
URL, and start OAuth from Cursor's connection prompt. Sign in to OpenWork and
pick the organization Cursor should use.
[Add OpenWork to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=openwork&config=eyJ1cmwiOiJodHRwczovL2FwaS5vcGVud29ya2xhYnMuY29tL21jcC9hZ2VudCJ9)
in one click, or add OpenWork as a remote MCP server in Cursor's MCP settings
and paste the server URL. Then start OAuth from Cursor's connection prompt,
sign in to OpenWork, and pick the organization Cursor should use.
Cursor Desktop's OAuth callback is the private-use URI
`cursor://anysphere.cursor-mcp/oauth/callback`. OpenWork accepts exactly this
@@ -26,7 +26,8 @@ pinned into the token. If you do not have an account, create a
## Setup
Run this command:
[Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22openwork%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fapi.openworklabs.com%2Fmcp%2Fagent%22%7D)
in one click, or run this command:
```sh
code --add-mcp '{"name":"openwork","type":"http","url":"https://api.openworklabs.com/mcp/agent"}'
@@ -1,7 +1,7 @@
export const OpenWorkConnectInstaller = () => {
const MCP_SERVER_URL = "https://api.openworklabs.com/mcp/agent";
const CODEX_CONNECTIONS_DEEPLINK = "codex://settings/connections";
const CHATGPT_SETTINGS_URL = "https://chatgpt.com/#settings/Connectors";
const CURSOR_INSTALL_LINK = "cursor://anysphere.cursor-deeplink/mcp/install?name=openwork&config=eyJ1cmwiOiJodHRwczovL2FwaS5vcGVud29ya2xhYnMuY29tL21jcC9hZ2VudCJ9";
const VS_CODE_INSTALL_LINK = "vscode:mcp/install?%7B%22name%22%3A%22openwork%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fapi.openworklabs.com%2Fmcp%2Fagent%22%7D";
const CODEX_LOGIN_COMMAND = "codex mcp login openwork";
const CODEX_RECONNECT_COMMAND = `codex mcp logout openwork
codex mcp login openwork`;
@@ -13,10 +13,12 @@ opencode mcp auth openwork`;
id: "cursor",
label: "Cursor",
eyebrow: "Cursor Desktop and Web/Agents",
helper: "Setup-only for Cursor Desktop and Cursor Web/Agents. Cursor Desktop's OAuth callback cursor://anysphere.cursor-mcp/oauth/callback is accepted with PKCE S256 enforced.",
helper: "Click Add to Cursor and approve the install, then sign in when Cursor asks. On Cursor Web or Agents, paste the server URL instead.",
supportStatus: "Setup only",
supportExplanation: "Setup guide only: paste the server URL into Cursor and start OAuth. Cursor Desktop's cursor://anysphere.cursor-mcp/oauth/callback callback is accepted through an exact allowlist with PKCE S256 enforced. Native proof is not complete.",
copyText: MCP_SERVER_URL,
installLink: CURSOR_INSTALL_LINK,
installLabel: "Add to Cursor",
},
{
id: "codex",
@@ -71,10 +73,12 @@ opencode mcp auth openwork`;
id: "vs-code",
label: "VS Code",
eyebrow: "VS Code MCP command",
helper: "Run this from a shell with the VS Code CLI on your path, then start OAuth from VS Code's MCP server prompt.",
helper: "Click Install in VS Code, or run this from a shell with the VS Code CLI on your path. Then start OAuth from VS Code's MCP server prompt.",
supportStatus: "Setup only",
supportExplanation: "Setup guide only: add the server with the VS Code CLI, then start OAuth from VS Code's MCP server prompt. Native proof is not complete.",
copyText: `code --add-mcp '{"name":"openwork","type":"http","url":"${MCP_SERVER_URL}"}'`,
installLink: VS_CODE_INSTALL_LINK,
installLabel: "Install in VS Code",
},
{
id: "any-client",
@@ -164,13 +168,9 @@ opencode mcp auth openwork`;
<h3 className="mb-0 mt-2 text-xl font-semibold text-gray-950 dark:text-white">{activeInstall.label}</h3>
<p className="mb-4 mt-1 text-sm text-gray-500 dark:text-gray-400">{activeInstall.helper}</p>
</div>
{activeInstall.id === "codex" ? (
<a href={CODEX_CONNECTIONS_DEEPLINK} onClick={() => void copyText(MCP_SERVER_URL)} className="shrink-0 rounded-full bg-[#011627] px-5 py-2.5 text-sm font-medium text-white">
Open settings + copy URL
</a>
) : activeInstall.id === "chatgpt-desktop" ? (
<a href={CHATGPT_SETTINGS_URL} target="_blank" rel="noreferrer" onClick={() => copy("chatgpt-url", MCP_SERVER_URL)} className="shrink-0 rounded-full bg-[#011627] px-5 py-2.5 text-sm font-medium text-white">
{copied === "chatgpt-url" ? "Copied URL" : "Open settings + copy URL"}
{activeInstall.installLink ? (
<a href={activeInstall.installLink} className="shrink-0 rounded-full bg-[#011627] px-5 py-2.5 text-sm font-medium text-white">
{activeInstall.installLabel}
</a>
) : null}
</div>
+13 -8
View File
@@ -22,10 +22,6 @@ const serverUrlMatch = landingConfig.match(/export const MCP_SERVER_URL = "([^"]
assert.ok(serverUrlMatch, "Landing installer is missing MCP_SERVER_URL");
const serverUrl = serverUrlMatch[1];
assert.equal(serverUrl, "https://api.openworklabs.com/mcp/agent", "OpenWork Connect must use the public /mcp/agent endpoint");
const codexDeepLinkMatch = landingConfig.match(/export const CODEX_CONNECTIONS_DEEPLINK = "([^"]+)";/);
assert.ok(codexDeepLinkMatch, "Landing installer is missing CODEX_CONNECTIONS_DEEPLINK");
const chatGptSettingsMatch = landingConfig.match(/export const CHATGPT_SETTINGS_URL = "([^"]+)";/);
assert.ok(chatGptSettingsMatch, "Landing installer is missing CHATGPT_SETTINGS_URL");
const clientsMatch = landingConfig.match(/export const CONNECT_CLIENTS[^=]*= \[([^\]]+)\];/);
assert.ok(clientsMatch, "Landing installer is missing CONNECT_CLIENTS");
@@ -86,10 +82,19 @@ const sharedValueNames = [
];
assert.ok(docsInstaller.includes(serverUrl), "Docs installer is using a different MCP server URL");
assert.ok(docsInstaller.includes(codexDeepLinkMatch[1]), "Docs installer is using a different Codex connections link");
assert.ok(docsInstaller.includes(chatGptSettingsMatch[1]), "Docs installer is using a different ChatGPT settings link");
assert.ok(!landingConfig.includes("CURSOR_DEEPLINK") && !docsInstaller.includes("CURSOR_DEEPLINK"), "Cursor desktop install deeplinks must not be exposed");
assert.ok(!landingConfig.includes("cursor.com/en/install-mcp") && !docsInstaller.includes("cursor.com/en/install-mcp"), "Cursor add-to-desktop install links must not be exposed");
// One-click install links must add exactly the public endpoint, in each
// client's documented format, in both the installer and the client guide.
const installLinks = [
["cursor.mdx", `cursor://anysphere.cursor-deeplink/mcp/install?name=openwork&config=${Buffer.from(JSON.stringify({ url: serverUrl })).toString("base64")}`],
["vs-code.mdx", `vscode:mcp/install?${encodeURIComponent(JSON.stringify({ name: "openwork", type: "http", url: serverUrl }))}`],
];
for (const [guide, link] of installLinks) {
const guideText = await readFile(new URL(`../packages/docs/model-context-protocol/${guide}`, import.meta.url), "utf8");
assert.ok(docsInstaller.includes(`"${link}"`), `Docs installer is missing the install link ${link}`);
assert.ok(guideText.includes(`](${link})`), `${guide} is missing the install link ${link}`);
}
assert.ok(!landingConfig.includes("~/.cursor/mcp.json") && !docsInstaller.includes("~/.cursor/mcp.json") && !cloudDocs.includes("~/.cursor/mcp.json"), "Cursor desktop mcp.json must not be shown as a working path");
assert.ok(cloudDocs.includes("cursor://anysphere.cursor-mcp/oauth/callback"), "Cloud MCP docs must name the Cursor Desktop OAuth callback");
assert.ok(cloudDocs.includes("exact allowlist with PKCE S256 enforced") || cloudDocs.includes("exact private-use allowlist with PKCE S256 enforced"), "Cloud MCP docs must explain how Cursor Desktop's private-use callback is accepted");