Skip to content

nit(mcp): add deeplink button for cursor #6026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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: 15 additions & 1 deletion frontend/src/lib/components/settings/TokensTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@

const workspaces = $derived(ensureCurrentWorkspaceIncluded($userWorkspaces, $workspaceStore))
const mcpBaseUrl = $derived(`${window.location.origin}/api/mcp/w/${newTokenWorkspace}/sse?token=`)
const cursorMcpUrl = $derived(
`cursor://anysphere.cursor-deeplink/mcp/install?name=windmill&config=${encodeURIComponent(
btoa(JSON.stringify({ url: `${mcpBaseUrl}${newMcpToken}` }))
)}`
)
const dispatch = createEventDispatcher()

$effect(() => {
Expand Down Expand Up @@ -223,13 +228,22 @@

{#if newMcpToken}
<div
class="border rounded-md mb-6 px-2 py-2 bg-green-50 dark:bg-green-200 dark:text-green-800 flex flex-row flex-wrap"
class="border rounded-md mb-6 px-2 py-2 bg-green-50 dark:bg-green-200 dark:text-green-800 flex flex-col"
>
<p class="text-sm mb-2">New MCP URL:</p>
<ClipboardPanel content={`${mcpBaseUrl}${newMcpToken}`} />
<p class="pt-1 text-xs">
Make sure to copy this URL now. You won't be able to see it again!
</p>
<div class="flex flex-row justify-end gap-2 items-center">
<a href={cursorMcpUrl} class="pt-2"
><img
src="https://cursor.com/deeplink/mcp-install-dark.svg"
alt="Add windmill MCP server to Cursor"
height="32"
/></a
>
</div>
</div>
{/if}

Expand Down