# Add Cursor

Use Cursor (local Agent SDK) as a full agent provider, planning, tool orchestration...

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-cursor -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-cursor -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-cursor -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-cursor -g -a gemini-cli -y`

## Description

Use Cursor (local Agent SDK) as a full agent provider, planning, tool orchestration, MCP tools, session resume, alongside or instead of Claude. Cursor-account sign-in or API key, held by the credential gateway. Per-group via `ncl groups config update --provider cursor`. Distinct from using Cursor as a cloud agent (those run on Cursor VMs and are not this provider).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Cursor agent provider

> Shortcut: `pnpm exec tsx setup/index.ts --step provider-auth cursor` performs this whole install (payload files, barrels, SDK pin, image rebuild) plus auth in one command. The steps below are the same operations, for agent-driven or manual application.

NanoClaw selects each group's agent backend from `container_configs.provider` (default `claude`). This skill installs the Cursor provider: copy the payload from this skill's `payload/`, append one import to each of the five provider and contract barrels, pin `@cursor/sdk` in the agent-runner tree, rebuild, then run the auth walk-through.

The provider runs `@cursor/sdk` in-process inside the container (`Agent.create` / `resume` / `send`): native streaming, MCP tools, a local agent store (the continuation is a Cursor `agentId`). It integrates through the provider contracts only, a data-only host contract declares the composed `AGENTS.md`, the per-group `.cursor-shared` state volume at `~/.cursor`, the two Cursor-native skill directories and the Cursor model domains; the runtime contract declares the execution stance, model mapping, memory hooks, MCP mapping, and archives each exchange into `conversations/` through core's shared exchange archive.

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-cursor/SKILL.md
