MCP GOGRAB AI REFERENCE

Comprehensive guidelines for AI-assisted development within the Editor platform

MCP GoGrab AI - Complete Reference

Session: 77 | Last Updated: 2026-01-31


Overview

mcp-gograb-ai is a comprehensive MCP (Model Context Protocol) server with 78 tools for intelligent development assistance. It provides:

Location: MCP/mcp-gograb-ai/


Quick Start

For Claude Desktop

Add to ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "gograb-ai": {
      "command": "node",
      "args": ["/path/to/editor2/MCP/mcp-gograb-ai/dist/server.js"],
      "env": {
        "GOGRAB_BACKEND_URL": "http://localhost:3001",
        "GOGRAB_WORKSPACE": "editor2"
      }
    }
  }
}

For Claude Code / Cursor

Already configured via .mcp.json in the workspace root.


Tool Categories

1. Core Intelligence (Always Use First)

Tool Purpose
preflight Get context BEFORE any task. Returns past decisions, conventions, warnings. Call first on every task.
log_decision Record a decision after implementation. Enables learning from outcomes.
find_similar Search past decisions by query. Use when preflight isn't enough.
get_stats Get system statistics and training state.

2. Session Management

Tool Purpose
mcp_init Initialize MCP session with health check and mode selection.
select_mode Execute mode selection (quick, orchestrated, search, stats).
get_session_info Get current session number and workspace.
set_session Enforce a specific session number. v12.1: log_decision and preflight use this session when not overridden in args.
register_chat_context Register chat context at conversation start.
get_chat_context Get current chat context with drift detection.
update_chat_session Change the chat's session.
lock_chat_session Lock or unlock session to prevent drift.

3. Multi-Agent Collaboration (Session 74+)

Tool Purpose
create_handoff Create a task handoff to another agent.
get_pending_handoffs Get handoffs waiting for this agent.
respond_to_handoff Acknowledge, start, complete, or reject a handoff.
get_handoff Get details of a specific handoff.
send_agent_message Send direct message to another agent.
agent_status Get agent identity and connection status.
agent_connect Connect to real-time agent network.
agent_events Get pending events from other agents.

4. Conventions & Learning

Tool Purpose
get_conventions Get codebase conventions by category.
add_convention Add a new convention.
report_outcome Report if a decision worked (for learning).
get_pending_outcomes Get decisions awaiting feedback.
get_lifecycle_status Check decision validation progress.
learn_from_outcomes Update anti-pattern detection from failures.

5. Code Intelligence

Tool Purpose
code_review Review files for issues, security, patterns.
test_gen Generate unit tests for components.
docs_intelligence Generate documentation, explain code.
self_healing Diagnose errors, suggest fixes, auto-patch.

6. Space Builder Tools

Tool Purpose
space_generate QuickGenerate-style widget/module generation.
analyze_requirement Extract module specs from requirements.
validate_module Validate module against editor2 standards.

7. Knowledge & Graph

Tool Purpose
graph Knowledge graph operations (entities, relations, impact).
mine_patterns Extract patterns from successful decisions.
predict_outcome ML-based prediction before implementing.
transfer_intelligence Transfer learning between AI tiers.

8. Web & Documentation

Tool Purpose
web_search Search web via Tavily API.
docs_search Search library documentation (Angular, RxJS, etc.).
get_ai_generation_rules Get AI generation rules and templates.

9. Workflow & Recovery

Tool Purpose
workflow Session recovery, project discovery, task state.
behavior_mode Set AI behavioral mode (brainstorming, focused, debug).
persona Activate AI persona (architect, frontend, security, etc.).
token_efficiency Compress content, analyze redundancy.

10. Git Integration

Tool Purpose
git_session_analyzer Analyze uncommitted changes, suggest branch routing.
init_git_tracking Initialize git tracking for session.

11. Tool Contexts (Session 75.7)

Tool Purpose
list_contexts List available tool contexts for agent type.

12. Browser Automation (Session 76)

Tools for browser automation and testing via the browser agent.

Tool Purpose
browser_navigate Navigate to a URL in the browser
browser_click Click an element using CSS selector
browser_fill Fill a form field with text
browser_screenshot Take a screenshot (full page or element)
browser_extract Extract content from page elements
browser_execute Execute JavaScript in page context
browser_wait Wait for condition (element, network, delay)
browser_status Get browser automation status
browser_close Close browser session for agent

Example - E2E Test Flow:

// Navigate to login page
browser_navigate({ url: "https://app.example.com/login" })

// Fill in credentials
browser_fill({ selector: "#email", value: "[email protected]" })
browser_fill({ selector: "#password", value: "password123" })

// Click submit button
browser_click({ selector: "button[type='submit']" })

// Wait for navigation
browser_wait({ condition: "network_idle", timeout: 5000 })

// Take screenshot of result
browser_screenshot({ name: "login-success", fullPage: false })

// Extract page title to verify
browser_extract({ selector: "h1.welcome", attribute: "textContent" })

13. Desktop Connectivity (Session 76)

Tools for desktop file operations and system integration. Sandboxed to Documents, Downloads, and tmp/gograb-agent for security.

Tool Purpose
desktop_read_file Read file from allowed directories
desktop_write_file Write file to allowed directories
desktop_list_files List directory contents
desktop_execute_command Execute sandboxed shell command
desktop_clipboard_get Get clipboard content
desktop_clipboard_set Set clipboard content
desktop_status Get desktop service status

Security Notes:

Example - File Operations:

// List files in allowed directory
desktop_list_files({ path: "~/Documents/projects" })

// Read a file
desktop_read_file({ path: "~/Documents/config.json" })

// Write output file
desktop_write_file({
  path: "~/Documents/output.json",
  content: JSON.stringify(results, null, 2)
})

// Copy text to clipboard
desktop_clipboard_set({ content: "Copied from agent!" })

// Get clipboard content
desktop_clipboard_get()

14. Task Runner (Session 76)

Tools for scheduling tasks and creating multi-step workflows.

Tool Purpose
task_create Create scheduled or manual task
task_execute Execute a task by ID
task_list List registered tasks
workflow_create Create multi-step workflow
workflow_run Run a workflow
task_status Get task runner status

Example - Workflow with Sequential Tasks:

// Create individual tasks
task_create({
  id: "backup-db",
  name: "Backup Database",
  type: "manual",
  command: "pg_dump -U admin mydb > backup.sql"
})

task_create({
  id: "compress-backup",
  name: "Compress Backup",
  type: "manual",
  command: "gzip backup.sql"
})

task_create({
  id: "upload-backup",
  name: "Upload to S3",
  type: "manual",
  command: "aws s3 cp backup.sql.gz s3://backups/"
})

// Create workflow with all tasks
workflow_create({
  id: "full-backup",
  name: "Full Database Backup",
  tasks: ["backup-db", "compress-backup", "upload-backup"],
  sequential: true
})

// Execute the workflow
workflow_run({ workflowId: "full-backup" })

// Check status
task_status()

15. RPC & Agent Discovery (Session 76)

Tools for direct agent-to-agent communication and discovery.

Tool Purpose
call_agent Direct agent-to-agent RPC call
find_agents_for_task Find available agents for a task

Example - Agent Discovery and RPC:

// Find agents capable of browser testing
find_agents_for_task({ 
  taskType: "browser_testing",
  capabilities: ["screenshot", "navigation"]
})

// Direct RPC call to specific agent
call_agent({
  agentId: "browser-agent-001",
  method: "runTest",
  params: {
    testSuite: "login-flow",
    timeout: 30000
  }
})

16. Outcome Tracking (Session 77)

Advanced outcome tracking with backend integration and module-specific reporting.

Tool Purpose
track_outcome Advanced outcome tracking with backend integration
report_module_outcome Module-specific outcome reporting

Example - Tracking Outcomes:

// Track a decision outcome with full context
track_outcome({
  decisionId: "dec-12345",
  outcome: "success",
  metrics: {
    executionTime: 1250,
    resourceUsage: "low",
    errorCount: 0
  },
  evidence: {
    testsPassed: 15,
    testsFailed: 0,
    coverage: 92.5
  },
  notes: "Migration completed without issues"
})

// Report outcome for a specific module
report_module_outcome({
  module: "user-management",
  feature: "password-reset",
  outcome: "success",
  version: "2.1.0",
  details: {
    usersAffected: 1500,
    completionRate: 99.8
  }
})

MCP Resources (Session 75.8)

Poll-able resources for Claude Desktop:

URI Description
handoffs://pending Pending handoffs for this agent
agents://online Currently connected agents
session://status Session and connection status

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                      MCP SERVER (78 tools)                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ┌───────────────────┐    ┌───────────────────┐                │
│  │  RealtimeClient   │    │  Backend REST     │                │
│  │  (WebSocket)      │    │  API              │                │
│  └─────────┬─────────┘    └─────────┬─────────┘                │
│            │                        │                            │
│            ▼                        ▼                            │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │              Backend AI-API (NestJS)                     │    │
│  │  • Socket.io Gateway (/mcp-stream)                       │    │
│  │  • Native WebSocket (/ws)                                │    │
│  │  • REST Endpoints (/ai-api/*)                            │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                  │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │              VITTO Orchestrator                          │    │
│  │  • Autonomous handoff processing                         │    │
│  │  • AI-powered task planning                              │    │
│  │  • Stale handoff takeover                                │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                  │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │              Extended Capabilities (Session 76-77)       │    │
│  │  • Browser Automation (9 tools)                          │    │
│  │  • Desktop Connectivity (7 tools)                        │    │
│  │  • Task Runner & Workflows (6 tools)                     │    │
│  │  • RPC & Agent Discovery (2 tools)                       │    │
│  │  • Advanced Outcome Tracking (2 tools)                   │    │
│  └─────────────────────────────────────────────────────────┘    │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Dual WebSocket Architecture

Why two gateways?

Gateway Protocol Clients
/mcp-stream Socket.io Dashboard, VITTO, Node.js agents
/ws Native WebSocket Chrome MV3 extensions, VSCode extensions

Chrome Manifest V3 extensions cannot use Socket.io due to Service Worker limitations. The dual setup is architecturally necessary.


Handoff System

Creating a Handoff

create_handoff({
  toAgentType: 'browser',  // or 'code', 'any'
  type: 'test_request',    // or 'verification', 'fix_request', etc.
  summary: 'Test the login page',
  tasks: [
    { description: 'Navigate to /login' },
    { description: 'Submit form with test credentials' }
  ],
  priority: 'high'
})

Responding to a Handoff

respond_to_handoff({
  handoffId: 'handoff-xxx',
  action: 'complete',  // or 'acknowledge', 'start', 'reject'
  taskResults: [
    { taskId: 'task-1', status: 'completed', result: 'Passed' }
  ]
})

Handoff Flow

Claude Code                    Cowork Browser Agent
    │                                │
    │ create_handoff(browser)        │
    │ ──────────────────────────────>│
    │                                │
    │        handoff.created event   │
    │<───────────────────────────────│
    │                                │
    │                    acknowledge │
    │<───────────────────────────────│
    │                                │
    │                       complete │
    │<───────────────────────────────│
    │                                │

What's NOT Needed

The following features were considered but already exist:

Proposed Already Exists As
New MCP server mcp-gograb-ai (78 tools)
Handoff tools create_handoff, respond_to_handoff, etc.
Agent tools agent_status, agent_connect, agent_events
Session tools get_session_info, set_session
WebSocket client RealtimeAgentClient
Backend endpoints All /ai-api/* routes
Browser automation browser_* tools (9 tools)
Desktop operations desktop_* tools (7 tools)
Task scheduling task_*, workflow_* tools (6 tools)

Environment Variables

Variable Default Purpose
GOGRAB_BACKEND_URL http://localhost:3001 Backend API URL
GOGRAB_WORKSPACE editor2 Workspace identifier
MCP_FILTER_TOOLS false Enable agent-type tool filtering

File Locations

Path Purpose
MCP/mcp-gograb-ai/src/server.ts Main server (1700+ lines)
MCP/mcp-gograb-ai/src/tools/handoff.ts Handoff tool handlers
MCP/mcp-gograb-ai/src/services/realtime-agent-client.ts WebSocket client
MCP/mcp-gograb-ai/src/config/tool-contexts.ts Tool groupings
apis/backend-ai-api/src/app/vitto/ VITTO orchestrator
apis/backend-ai-api/src/app/mcp-gateway/ WebSocket gateways

Version History

Version Session Changes
4.0 74 Multi-agent handoffs, RealtimeAgentClient
4.1 75.7 Tool contexts, filtering by agent type
4.2 75.8 MCP Resources, send_agent_message, VITTO orchestrator
5.0 76 Browser Automation (9 tools), Desktop Connectivity (7 tools), Task Runner (6 tools), RPC & Agent Discovery (2 tools)
5.1 77 Outcome Tracking (2 tools) - track_outcome, report_module_outcome

Groundbreaking Features

  1. 78 MCP tools - Most MCP servers have 5-10, we have 78
  2. Multi-agent collaboration - Agents delegate work to each other
  3. VITTO autonomous brain - AI processes handoffs without human intervention
  4. Cross-platform learning - Cursor decisions inform Claude Code
  5. Real-time everywhere - WebSocket events propagate instantly
  6. Tool contexts - Filter tools by agent type for cleaner UX
  7. Browser automation - Full E2E testing capabilities (Session 76)
  8. Desktop connectivity - Sandboxed file/system operations (Session 76)
  9. Task runner - Workflow automation with scheduling (Session 76)
  10. Advanced outcome tracking - Backend-integrated learning (Session 77)

Tool Count Summary

Category Tools Session Added
Core Intelligence 4 Original
Session Management 8 Original
Multi-Agent Collaboration 8 74
Conventions & Learning 6 Original
Code Intelligence 4 Original
Space Builder 3 Original
Knowledge & Graph 4 Original
Web & Documentation 3 Original
Workflow & Recovery 4 Original
Git Integration 2 Original
Tool Contexts 1 75.7
Browser Automation 9 76
Desktop Connectivity 7 76
Task Runner 6 76
RPC & Agent Discovery 2 76
Outcome Tracking 2 77
Total 78 -