KA

khanhbkqt/antigravity-sub-agent-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

14 stars 10 forks 质量 69 趋势 20MIT

一个MCP服务器,允许一个主要的AI剂在Antigravity IDE上产出子剂. 代表的任务包括全生命周期管理:创建级联、自动接收工具行动以及提取结果.

概览

一个MCP服务器,允许一个主要的AI剂在Antigravity IDE上产出子剂. 代表的任务包括全生命周期管理:创建级联、自动接收工具行动以及提取结果。 通过运输运行——配置为mcp config.json中的命令,不需要手动服务器启动. - Node.js 18+ - Antigravity IDE 运行,至少打开一个工作空间 未设置时,服务器自动检测正确的LS实例(见下文工作空间检测). 提交任务并获取返回任务列表(~1s). 子代理运行于后. 与启动的参数相同 agent. 返回用于获取 代理 结果的任务Id。 等待多个提交的任务,并立即返回所有结果. 1. (初级):父进程是 LS —— 读取 -- -- csrf token和 --workspace id 从它的命令行2(倒计时):匹配工作空间参数与运行 LS 例3(最后手段): 任何可用的用途

概述(AI 翻译)

一个MCP服务器,允许一个主要的AI剂在Antigravity IDE上产出子剂. 代表的任务包括全生命周期管理:创建级联、自动接收工具行动以及提取结果。

通过stdio运输运行——在mcp_config.json中配置为command,不需要手动服务器启动.

– – . . .

□ 目录

  • 如何运作 项目结构
  • 设置
  • MCP工具
  • 型号异形
  • 关键特征
  • 调试
  • 贡献
  • 承认
  • 执照

如何运作

□ 项目结构

□ 设置

· 先决条件

  • 节点.js 18+
  • 反重力IDE运行,至少打开一个工作空间

QQ 安装

配置反重力

添加到您的 [[T2] :

环境变量

· 变量 · 默认 · · 说明 · · |. QQ[ [T3]] 自动检测QQ语言服务器端口QQ QQ [ [T4]] 自动检测的 CSRF 标志 QQ ANTIGRAVITY_TLS 使用 TLS 。

未设置时,服务器自动检测正确的LS实例(见下文工作空间检测).

□ MCP 工具

[[T7]——无障碍

提交任务并获得 taskId 立即** ** (~1s) 。 子代理运行于后.

与 start_agent 相同的参数.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Antigravity Sub-Agent MCP Server

An MCP server that lets a main AI agent spawn sub-agents on Antigravity IDE. Delegates tasks with full lifecycle management: creating cascades, auto-accepting tool actions, and extracting results.

Runs via stdio transport — configure as a command in mcp_config.json, no manual server start needed.


Table of Contents

How It Works

Main Agent (Claude/Gemini/etc)
  ↓ MCP tool call
  ↓
index.js (stdio MCP server)
  ↓ autoDetect(workspace) → finds correct LS instance
  ↓ startCascade() → sendMessage(SYSTEM_PROMPT + task)
  ↓
completion-loop.js (polls until done)
  ├─ RUNNING → keep polling (auto-accept if steps stall)
  ├─ WAITING_FOR_USER → auto-accept.js handles it
  ├─ IDLE → treat as completed
  ├─ Question detected → auto-reply "proceed" (max 3)
  └─ COMPLETED → extract final text
  ↓
Returns result to Main Agent

Project Structure

antigravity-sub-agent-mcp/
├── package.json
├── index.js                  # stdio MCP server (2 tools)
├── lib/
│   ├── ls-detector.js        # LS auto-detection (PPID + process scan + workspace matching)
│   ├── cascade-client.js     # HTTP client for LS API (JSON + binary + streaming)
│   ├── completion-loop.js    # Smart polling with auto-accept integration
│   ├── auto-accept.js        # Interaction payload builder for WAITING steps
│   └── protobuf.js           # Binary protobuf encoder/decoder
├── docs/                     # Internal architecture documentation
├── LICENSE                   # MIT License
├── CONTRIBUTING.md           # Contribution guide
├── CODE_OF_CONDUCT.md        # Contributor Covenant
└── CHANGELOG.md              # Release history

Setup

Prerequisites

  • Node.js 18+
  • Antigravity IDE running with at least one workspace open

Install

cd antigravity-sub-agent-mcp
npm install

Configure Antigravity

Add to your mcp_config.json:

{
  "mcpServers": {
    "antigravity-sub-agent": {
      "command": "node",
      "args": ["/absolute/path/to/antigravity-sub-agent-mcp/index.js"]
    }
  }
}

Environment Variables

Variable Default Description
ANTIGRAVITY_PORT auto-detect Language Server port
ANTIGRAVITY_CSRF auto-detect CSRF token
ANTIGRAVITY_TLS true Use TLS
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "antigravity-sub-agent": { "command": "node", "args": ["/absolute/path/to/antigravity-sub-agent-mcp/index.js"] } } }