1. Initialize Your Project
If you don’t already have a package.json, create one:
npm init -y
npm pkg set type=module
camera-remote-web-api is an ESM-only package. Setting "type": "module" in your package.json enables ES module syntax (import/export) which is required to use the SDK.
2. Install the Client SDK
npm install camera-remote-web-api
The correct native binary for your current OS is installed automatically (macOS ARM64, Linux x64/ARM64, Windows x64).
After installation, the CLI will walk you through installing any additional platform binaries you need. Follow the prompts to complete setup.
3. Install MCP Servers (Optional)
The CLI also lets you install the AI SDK Assistant and AI Camera Assistant MCP servers during setup. These connect your AI tools (Claude, Claude Code, Cursor) to Sony’s SDK documentation for intelligent search.
You can always install them later — see the MCP Server quickstart for details.
4. Capture a Photo
import { CameraManager } from 'camera-remote-web-api/server';
const manager = new CameraManager({ port: 8080 });
manager.on('camera-ready', async ({ cameraId, camera }) => {
console.log(`${camera.model} connected`);
// Take control of the camera
await manager.client.setPriorityKey(cameraId, { setting: 'pc-remote' });
// Shoot
await manager.client.triggerShutter(cameraId);
console.log('Photo captured!');
});
await manager.start();
// Binary boots → cameras discovered → auto-connected → 'camera-ready' fires
5. Run It
Connect your Sony camera via USB, then:
You should see the camera model name printed, followed by “Photo captured!”.
Next Steps