# Gen-Zero Autonomous Agent MCP Installation Guide

This document is formatted for AI coding agents (Claude Code, Codex, Antigravity, Cursor, Windsurf, Roo Code, etc.) to autonomously discover, configure, and connect to the Gen-Zero Model Context Protocol (MCP) server.

---

## 1. Service Specification

- **Service Name**: Gen-Zero MCP Engine
- **Protocol**: Standard MCP over Server-Sent Events (SSE)
- **Hosted Public Endpoint**: `https://api.gen-zero.ai/sse`
- **Authentication**: Token-based query param or `Bearer` header
- **Public Community Token**: `gz_public_free`
- **Direct SSE URL**: `https://api.gen-zero.ai/sse?token=gz_public_free`

---

## 2. One-Command Autonomous Installation

Run the command corresponding to your agent environment:

### Claude Code CLI
```bash
claude mcp add gen-zero -- "https://api.gen-zero.ai/sse?token=gz_public_free"
```

### Codex CLI
```bash
codex mcp add gen-zero --url "https://api.gen-zero.ai/sse?token=gz_public_free"
```

### Google Antigravity CLI
```bash
agy mcp add gen-zero "https://api.gen-zero.ai/sse?token=gz_public_free"
```

---

## 3. Configuration File Specifications

If configuring via JSON configuration files directly:

### Cursor (`~/.cursor/mcp.json` or `.cursor/mcp.json` in workspace)
```json
{
  "mcpServers": {
    "gen-zero": {
      "url": "https://api.gen-zero.ai/sse?token=gz_public_free"
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "gen-zero": {
      "url": "https://api.gen-zero.ai/sse",
      "headers": {
        "Authorization": "Bearer gz_public_free"
      }
    }
  }
}
```

---

## 4. Connection Verification & Health Check

Execute a non-destructive SSE probe to verify connectivity before initiating agent tool sessions:

```bash
curl -i -N -m 3 "https://api.gen-zero.ai/sse?token=gz_public_free"
```

### Expected Response
```http
HTTP/2 200
content-type: text/event-stream

event: endpoint
data: /message?session_id=...
```

Requests without a valid token or with invalid tokens receive `HTTP 401 Unauthorized`.

---

## 5. Available Agent Capabilities

Once connected, Gen-Zero provides agents with deterministic verification and Pareto-optimal decision tools:

1. **`plan_search`**:
   - Executes multi-objective Monte Carlo Tree Search (PUCT) across high-dimensional action spaces.
   - Evaluates candidate plans against risk gates, dead-end detection, and safety manifolds.
   - Returns the non-dominated Pareto frontier plans.

2. **`policy_gate`**:
   - Sub-millisecond (<1ms) deterministic action auditing.
   - Categorizes planned mutations into 5 safety tiers: `Proceed`, `Escalate`, `Confirm`, `HardStop`.
   - Prevents unverified hallucinated commands without incurring additional LLM inference tokens.

3. **`audit_trace`**:
   - Inspects cryptographically verifiable execution traces with zero state mutation.

---

## 6. Security & Sandboxing Policy

- The public community endpoint operates in a read-only / simulation sandbox.
- It does not mutate local host systems, files, or persistent storage.
- Agent actions requiring local execution are gated by explicit user consent or local policy tiers.
