Documentation Index Fetch the complete documentation index at: https://mintlify.com/aidenybai/react-grab/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The grab add command connects React Grab to your coding agent, enabling seamless context sharing. It supports legacy agent integrations and MCP server installation.
Usage
Arguments
Argument Description [agent]Optional agent name: cursor, claude, copilot, windsurf, or mcp
Options
Option Alias Description Default --yes-ySkip confirmation prompts false--cwd <cwd>-cWorking directory Current directory
Examples
Interactive Mode
Run without arguments to choose from available options:
Select connection mode
Choose between MCP or legacy agent: ? How would you like to connect?
❯ MCP Server (recommended)
Legacy Agent Integration
Select agent (if legacy)
Choose your coding agent: ? Which agent would you like to connect?
❯ Cursor
Claude Desktop
GitHub Copilot
Windsurf
Skip
Review changes
Preview the file changes: --- app/layout.tsx
+++ app/layout.tsx
@@ -10,6 +10,7 @@
<Script
src="//unpkg.com/react-grab/dist/index.global.js"
+ data-agent="cursor"
crossOrigin="anonymous"
/>
)}
Apply changes
Confirm to install the agent integration: ? Apply these changes? (Y/n)
Add Specific Agent
Specify the agent directly:
Cursor
Claude Desktop
GitHub Copilot
Windsurf
MCP Server
Non-Interactive Mode
Install an agent without prompts:
MCP Server Installation
When selecting MCP, the CLI will:
Detect installed agents
Scan for supported agents on your system: Scanning for agents...
✔ Found: Cursor, Claude Desktop
Configure MCP server
Automatically add the MCP server to agent configs: {
"mcpServers" : {
"react-grab" : {
"command" : "npx" ,
"args" : [ "-y" , "@react-grab/mcp-server" ]
}
}
}
Update React Grab
Add MCP metadata to your React Grab installation: --- package.json
+++ package.json
@@ -5,6 +5,7 @@
"dependencies": {
"react": "^18.0.0",
+ "@react-grab/mcp-server": "^0.0.1",
"react-grab": "^0.0.1"
}
Restart agents
Success! MCP server has been configured.
Restart your agents to activate.
Agent Replacement
If you already have an agent installed, you can:
Replace — Remove the existing agent and install the new one
Add alongside — Keep both agents installed
Cancel — Abort the operation
Example
Output:
⚠ Cursor is already installed.
? How would you like to proceed?
❯ Replace with Claude Desktop
Add Claude Desktop alongside existing
Cancel
Output Example
$ grab add cursor
✿ React Grab 0.0.1
✔ Preflight checks.
✔ Adding Cursor.
--- app/layout.tsx
+++ app/layout.tsx
@@ -10,6 +10,7 @@
< Script
src = "//unpkg.com/react-grab/dist/index.global.js"
+ data-agent="cursor"
crossOrigin = "anonymous"
/ >
)}
? Apply these changes ? ( Y/n )
✔ Installing @react-grab/cursor.
✔ Applying changes to app/layout.tsx.
✔ Applying changes to package.json.
Success! Cursor has been added.
Make sure to start the agent server before using it.
Troubleshooting
React Grab Not Installed
✖ Preflight checks.
✗ React Grab is not installed.
Run react-grab init first to install React Grab.
Solution: Run grab init first.
Agent Already Installed
⚠ Cursor is already installed.
Solution: Choose to replace or add alongside the existing agent.
Invalid Agent Name
✗ Invalid agent: unknown
Available agents: cursor, claude, copilot, windsurf
Solution: Use one of the supported agent names.
Supported Agents
Agent Name Description Cursor cursorCursor IDE integration Claude Desktop claudeClaude Desktop app integration GitHub Copilot copilotGitHub Copilot integration Windsurf windsurfWindsurf IDE integration MCP Server mcpModel Context Protocol server (recommended)