能力标签
🔌
MCP工具

反重力工作空间

基于 Python · 让 AI 助手直接操作你的系统与工具
英文名:antigravity-workspace-template
⭐ 1.2k Stars 🍴 252 Forks 💻 Python 📄 MIT 🏷 AI 7.8分
7.8AI 综合评分
多智能体MCP协议代码分析知识引擎AI编码
✦ AI Skill Hub 推荐

AI Skill Hub 推荐使用:反重力工作空间 是一款优质的MCP工具。已获得 1.2k 颗 GitHub Star,AI 综合评分 7.8 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。

📚 深度解析
反重力工作空间 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 反重力工作空间,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。反重力工作空间 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 反重力工作空间 评为 AI 评分 7.8 分,属于同类工具中的优质选择。
📋 工具概览

反重力工作空间 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 1.2k
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
正常维护,社区驱动
开源协议
MIT
AI 综合评分
7.8 分
工具类型
MCP工具
Forks
252
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

反重力工作空间 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/study8677/antigravity-workspace-template

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "-------": {
      "command": "npx",
      "args": ["-y", "antigravity-workspace-template"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 反重力工作空间 执行以下任务...
Claude: [自动调用 反重力工作空间 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "_______": {
      "command": "npx",
      "args": ["-y", "antigravity-workspace-template"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 95/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<img src="docs/assets/logo.png" alt="Antigravity Workspace" width="200"/>

Features at a Glance

  ag init             Inject context files into any project (--force to overwrite)
       │
       ▼
  .antigravity/       Shared knowledge base — every IDE reads from here
       │
       ├──► ag-refresh     Dynamic multi-agent self-learning → module knowledge docs + structure map
       ├──► ag-ask         Router → ModuleAgent Q&A with live code evidence
       └──► ag-mcp         Optional MCP server → IDE tool integration

Dynamic Multi-Agent Cluster — During ag-refresh, the engine uses smart functional grouping: files are grouped by import relationships, directory co-location, and filename prefixes. Source code is pre-loaded directly into agent context (no tool calls needed), and build artifacts are automatically filtered out. Each sub-agent analyzes ~30K tokens of focused, functionally related code in a single LLM call and outputs a comprehensive Markdown knowledge document (agents/*.md). For large modules, multiple sub-agents run in parallel — each produces its own agent.md (no merging, no information loss). A Map Agent reads all agent docs and generates map.md — a routing index. During ag-ask, Router reads map.md to select relevant modules, then feeds their agent docs to answer agents. For structural questions (call chains, dependencies, impact analysis), the Router automatically queries GitNexus code graph for precise relationships. Fully language-agnostic — module detection uses pure directory structure, code analysis is done entirely by LLMs. Works with any programming language.

GitAgent — A dedicated agent for analyzing git history — understands who changed what and why.

GitNexus Graph Enrichment (optional) — Install GitNexus to auto-unlock graph-enriched answers. The Router LLM decides when a question needs structural analysis (call chains, dependencies, impact) and queries GitNexus automatically — combining precise graph data with semantic understanding from agent docs.

NLPM Audit Feedback — This repository has benefited from NLPM, a natural-language programming linter for Claude Code plugins, skills, and agent definitions by xiaolai. Its audit helped identify useful improvements in skill frontmatter and dependency hygiene.

---

Advanced Features

<details> <summary><b>MCP Server — Give Claude Code a ChatGPT for your codebase</b></summary>

Instead of reading hundreds of documentation files, Claude Code can call ask_project as a live tool — backed by a dynamic multi-agent cluster: Router routes questions to the right ModuleAgent, returning grounded answers with file paths and line numbers.

Setup:

```bash

1. Install GitNexus (requires Node.js)

npm install -g gitnexus

`ag-setup` — first-time configuration

Run this once per project, right after installing the plugin. Interactive picker for the LLM provider (OpenAI / DeepSeek / Groq / 阿里灵积 / NVIDIA NIM / Ollama local / any OpenAI-compatible endpoint), then writes .env to the project root with OPENAI_BASE_URL, OPENAI_API_KEY, OPENAI_MODEL, AG_ASK_TIMEOUT_SECONDS. Also ensures .env is in .gitignore. Skip it if you already have a working .env.

```

`ag-refresh` — build / refresh the knowledge base

Deploys the multi-agent cluster to read your code: each module gets its own Agent that produces a knowledge doc under .antigravity/agents/*.md, plus a map.md routing index. Run after install, after significant code changes, or when ag-ask returns stale answers. The first refresh auto-creates .antigravity/ — no separate init step needed. Pass quick for an incremental update, failed-only to rerun only previously failed modules.

```

Claude Code (auto-installs the Python engine CLI on first session via SessionStart hook)

/plugin marketplace add study8677/antigravity-workspace-template /plugin install antigravity@antigravity /antigravity:ag-setup # interactive: pick LLM provider, paste API key, writes .env /antigravity:ag-refresh # runs ag-refresh directly; first refresh auto-creates .antigravity/ /antigravity:ag-ask "How does this project work?" # runs ag-ask directly

Codex CLI (install the engine manually first; Codex hooks are not yet supported)

pipx install "git+https://github.com/study8677/antigravity-workspace-template.git#subdirectory=engine" codex plugin marketplace add study8677/antigravity-workspace-template /ag-setup # same flow, no antigravity: prefix in Codex /ag-refresh /ag-ask "How does this project work?"


Codex CLI auto-discovers slash commands from the plugin's `commands/` directory, so the same four commands work without the `antigravity:` namespace prefix (`/ag-setup`, `/ag-refresh`, `/ag-ask`, `/ag-init`). The raw CLI calls (`ag-refresh --workspace .`, `ag-ask "..." --workspace .`) also still work. If your Codex build supports MCP and you want tool-style integration, register `ag-mcp --workspace <project>` separately.

After install + setup you get `ag-ask <question>`, `ag-refresh`, and `ag-init <name>` slash commands in both hosts. MCP remains optional (`ask_project` + `refresh_project`) via `ag-mcp`; see [docs/examples/antigravity.mcp.json](docs/examples/antigravity.mcp.json). See [INSTALL.md](INSTALL.md) for details and troubleshooting.

**Option B — Manual install: engine + CLI via pip**
bash

1. Install engine + CLI

pip install "git+https://github.com/study8677/antigravity-workspace-template.git#subdirectory=cli" pip install "git+https://github.com/study8677/antigravity-workspace-template.git#subdirectory=engine"

3. Build knowledge base (ModuleAgents self-learn each module)

ag-refresh --workspace .

Install both for full experience

pip install "git+https://...#subdirectory=cli" pip install "git+https://...#subdirectory=engine"


For local work on this repository itself:
bash python3 -m venv venv source venv/bin/activate pip install -e ./cli -e './engine[dev]' pytest engine/tests cli/tests ```

---

Install engine

pip install "git+https://github.com/study8677/antigravity-workspace-template.git#subdirectory=engine"

Quick Start

Option A — Plugin install for Claude Code / Codex CLI ```bash

2. Configure .env with any OpenAI-compatible API key

cd my-project cat > .env <<EOF OPENAI_BASE_URL=https://your-endpoint/v1 OPENAI_API_KEY=your-key OPENAI_MODEL=your-model AG_ASK_TIMEOUT_SECONDS=120 EOF

5. (Optional) Register as MCP server for Claude Code

claude mcp add antigravity ag-mcp -- --workspace $(pwd)


**Option C — Context files only (any IDE, no LLM needed)**
bash pip install git+https://github.com/study8677/antigravity-workspace-template.git#subdirectory=cli ag init my-project && cd my-project

CLI Commands

CommandWhat it doesLLM needed?
ag init <dir>Inject cognitive architecture templatesNo
ag init <dir> --forceRe-inject, overwriting existing filesNo
ag refresh --workspace <dir>CLI convenience wrapper around the knowledge-hub refresh pipelineYes
ag ask "question" --workspace <dir>CLI convenience wrapper around the routed project Q&A flowYes
ag-refreshMulti-agent self-learning of codebase, generates module knowledge docs + conventions.md + structure.mdYes
ag-ask "question"Router → ModuleAgent/GitAgent routed Q&AYes
ag-mcp --workspace <dir>**Start MCP server** — exposes ask_project + refresh_project to Claude CodeYes
ag report "message"Log a finding to .antigravity/memory/No
ag log-decision "what" "why"Log an architectural decisionNo

ag ask / ag refresh are available when both cli/ and engine/ are installed. ag-ask / ag-refresh are the engine-only entrypoints.

---

Two Packages, One Workflow

antigravity-workspace-template/
├── cli/                     # ag CLI — lightweight, pip-installable
│   └── templates/           # .cursorrules, CLAUDE.md, .antigravity/, ...
└── engine/                  # Multi-agent engine + Knowledge Hub
    └── antigravity_engine/
        ├── _cli_entry.py    # ag-ask / ag-refresh / ag-mcp + python -m dispatch
        ├── config.py        # Pydantic configuration
        ├── hub/             # ★ Core: multi-agent cluster
        │   ├── agents.py    #   Router + ModuleAgent + GitAgent
        │   ├── contracts.py #   Pydantic models: claims, evidence, refresh status
        │   ├── ask_pipeline.py    # agent.md + graph-enriched ask
        │   ├── refresh_pipeline.py # LLM-driven refresh → agents/*.md + map.md
        │   ├── ask_tools.py
        │   ├── scanner.py   #   multi-language project scanning
        │   ├── module_grouping.py # smart functional file grouping
        │   ├── structure.py
        │   ├── knowledge_graph.py
        │   ├── retrieval_graph.py
        │   └── mcp_server.py
        ├── mcp_client.py    # MCP consumer (connects external tools)
        ├── memory.py        # Persistent interaction memory
        ├── tools/           # MCP query tools + extensions
        ├── skills/          # Skill loader
        └── sandbox/         # Code execution (local / microsandbox)

CLI (pip install .../cli) — Zero LLM deps. Injects templates, logs reports & decisions offline.

Engine (pip install .../engine) — Repository knowledge runtime. Powers ag-ask, ag-refresh, ag-mcp. Uses the OpenAI-compatible endpoint written by ag-setup (OpenAI, DeepSeek, Groq, DashScope, NVIDIA NIM, Ollama, or custom).

New skill packaging updates: - engine/antigravity_engine/skills/graph-retrieval/ — graph-oriented retrieval tools for structure and call-path reasoning. - engine/antigravity_engine/skills/knowledge-layer/ — project knowledge-layer tools for semantic context consolidation.

```bash

Refresh knowledge base first (ModuleAgents self-learn each module)

ag-refresh --workspace /path/to/project

ModuleAgents self-learn your codebase

ag-refresh

Router intelligently routes to the right ModuleAgent

ag-ask "What testing patterns does this project use?"

Head-to-Head Eval: Antigravity vs Codex CLI vs Claude Code (2026-05-09)

Asymmetric benchmark on three real-world Python codebases — fastapi/fastapi, psf/requests, fastapi/sqlmodel — asking each tool the same 36 questions across three difficulty bands. All three tools used gpt-5.5 with high reasoning effort; Codex and Claude had full read access to the workspace. Codex was the grader (4-axis 0–3 rubric, scores verified against actual source).

Question typeAntigravityCodex CLIClaude Code
15 factual lookups**179/180 (99%)**179/180 (99%)178/180 (99%)
12 synthesis (project / arch tour)116/144 (81%)**144/144 (100%)**136/144 (94%)
9 audit / security**105/108 (97%)**104/108 (96%)98/108 (91%)

Combined factual + audit (24 cells): Antigravity 284/288, Codex 283/288, Claude 276/288. Antigravity edges out both — at lower latency than Codex on every single question.

Latency (mean wall-clock per question, same proxy):

Question typeAntigravityCodexClaude
Factual**56s**119s42s
Audit160s177s**100s**

Antigravity is 2.1× faster than Codex on factual and on par with Codex on audit, while matching or beating it on correctness. Claude is fastest on audit but loses 7 percentage points of correctness.

What changed in this repo to get there. Two engine fixes landed during the benchmark, both committed in this branch:

1. _ask_with_agent_md now surfaces project-level docs (conventions.md, module_registry.md, map.md, structure.md) into its answer prompts. Removes the “module knowledge does not include project-wide conventions” refusal pattern. 2. The structured-facts answer agents now have search_code, read_file, list_directory, read_file_metadata, search_by_type bound at runtime, so the LLM can grep and read actual source instead of paraphrasing the KG.

Full report (data, methodology, per-cell tables, caveats): artifacts/benchmark-2026-05-09/REPORT.md.

---

Cross-IDE repository knowledge engine for grounded codebase Q&A.

ag-refresh builds the repository knowledge base. ag-ask routes questions to the right module context with source evidence. Plugins, CLI commands, and MCP are delivery channels around that core workflow.

Language: English | 中文 | Español

License Python CI DeepWiki NLPM

<br/>

<img src="https://img.shields.io/badge/Cursor-✓-000000?style=flat-square" alt="Cursor"/> <img src="https://img.shields.io/badge/Claude_Code-✓-D97757?style=flat-square" alt="Claude Code"/> <img src="https://img.shields.io/badge/Windsurf-✓-06B6D4?style=flat-square" alt="Windsurf"/> <img src="https://img.shields.io/badge/Gemini_CLI-✓-4285F4?style=flat-square" alt="Gemini CLI"/> <img src="https://img.shields.io/badge/VS_Code_+_Copilot-✓-007ACC?style=flat-square" alt="VS Code"/> <img src="https://img.shields.io/badge/Codex-✓-412991?style=flat-square" alt="Codex"/> <img src="https://img.shields.io/badge/Cline-✓-FF6B6B?style=flat-square" alt="Cline"/> <img src="https://img.shields.io/badge/Aider-✓-8B5CF6?style=flat-square" alt="Aider"/>

</div>

<br/>

Before vs After Antigravity

<br/>

`ag-ask` — routed Q&A on the codebase

The main reason this plugin exists. Routes your question to the right ModuleAgent (and GitAgent / GitNexus when applicable), then returns an answer grounded in actual source with file paths and line numbers. Use it before manually grepping or reading files — it's faster and more accurate. Good question shapes: "where is X defined/handled?", "why was Y done this way?", "how does the auth flow work?", "what depends on module Z?".

```

3. `ag-ask` — Router-based Q&A

ag-ask "How does auth work in this project?"

The ask pipeline uses a dual-path architecture: - Semantic path: Router reads map.md → selects modules → reads agents/*.md → LLM answers with code references. Multiple agent docs are read in parallel, then a Synthesizer combines answers. - Graph path (automatic): Router LLM decides if the question needs structural analysis → queries GitNexus for call chains, dependencies, or impact → injects graph data into the answer context. Silently skipped if GitNexus is not installed.

Falls back to the legacy Router → ModuleAgent/GitAgent swarm when agent docs are not yet generated.

---

🎯 aiskill88 AI 点评 A 级 2026-05-24

创新的多智能体框架,整合MCP协议与代码分析能力,1.2k Stars体现社区认可度。架构清晰但文档需完善。

⚡ 核心功能
👥 适合人群
Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师
🎯 使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
⚖️ 优点与不足
✅ 优点
  • +MIT 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
通过MCP协议实现多智能体知识引擎,可自动分析代码库并支持智能问答交互。
💡 AI Skill Hub 点评

总体来看,反重力工作空间 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 反重力工作空间
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 antigravity-workspace-template
Topics 多智能体MCP协议代码分析知识引擎AI编码
GitHub https://github.com/study8677/antigravity-workspace-template
License MIT
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/study8677/antigravity-workspace-template 🌐 官方网站  https://github.com/study8677/antigravity-workspace-template

收录时间:2026-05-24 · 更新时间:2026-05-24 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。