JavaScript / TypeScript SDK#

The @vitalops/opendesk-sdk npm package provides a fully native Node.js SDK — no Python required. All desktop automation runs directly in Node.js using native platform APIs.

Install#

npm install @vitalops/opendesk-sdk

Claude Code / Claude Desktop#

npx opendesk-js install        # register native MCP server
npx opendesk-js uninstall      # remove

Claude Desktop config:

{
  "mcpServers": {
    "opendesk": {
      "command": "node",
      "args": ["/path/to/node_modules/@vitalops/opendesk-sdk/bin/opendesk-mcp.js"]
    }
  }
}

Programmatic usage#

import { OpenDeskClient } from "@vitalops/opendesk-sdk";

const client = new OpenDeskClient();

await client.screenshot({ marks: true });
await client.ui({ action: "click", app: "Safari", title: "Go" });
await client.keyboard({ action: "type", text: "Hello" });

Native MCP server#

import { createMcpServer } from "@vitalops/opendesk-sdk";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = createMcpServer();
await server.connect(new StdioServerTransport());

With Vercel AI SDK#

import { OpenDeskClient } from "@vitalops/opendesk-sdk";
import { generateText } from "ai";
import { anthropic } from "@ai-sdk/anthropic";

const client = new OpenDeskClient();
const shot = await client.screenshot({ marks: true });

await generateText({
  model: anthropic("claude-opus-4-6"),
  messages: [{
    role: "user",
    content: [
      { type: "text", text: "What do you see? Click the most important button." },
      { type: "image", image: shot.attachments[0].content },
    ],
  }],
});

With LangChain.js#

import { OpenDeskClient } from "@vitalops/opendesk-sdk";

const client = new OpenDeskClient();

// Use client methods directly inside your LangChain agent's tool implementations
const shot = await client.screenshot({ marks: true });

Custom session or permission handler#

const client = new OpenDeskClient({
  sessionId: "my-session",
  permissionHandler: async (tool, action, description) => {
    console.log(`Allow: ${description}`);
  },
});

Building something that doesn’t fit the above? The Custom integration guide → gives you direct access to the raw tool API and sandbox configuration.