Skip to main content
Glama
llg1634

AGY MCP for Windows

by llg1634

AGY MCP for Windows

基于 npm 包 @itoseo/agy-mcp@1.0.0 的 Windows 适配与本地部署版本。

来源、致谢与社区认同

本仓库的初始代码来自 npm 上由 itoseo 发布的 @itoseo/agy-mcp@1.0.0。原始发布包仅包含构建后的 dist/index.jsdist/index.d.tsREADME.mdpackage.json,没有公开的 TypeScript 原始工程、构建配置或源码仓库地址。

本仓库保留原项目的功能定位和许可证,并在 CHANGELOG.md 中明确记录本地改动。原项目作者并未参与本仓库的维护,也不为本仓库的改动背书。

认同 LinuxDo(L站)社区对开放交流、经验共享、来源可追溯与尊重开源许可的实践。这个仓库按同样的原则保留来源、改动与运行边界。

Related MCP server: WinCommander

Windows 改动

原发布包将运行日志固定写入 Linux/POSIX 路径:

/tmp/agy-mcp

本仓库将其替换为 Windows 本地目录:

D:\agy-mcp

每次任务生成独立日志,latest.log 用于定位最近一次任务日志。Windows 无法创建符号链接时,会降级为写入实际日志路径的普通文件,而不会静默失败。

此外,本仓库移除了原发布代码中硬编码的 --dangerously-skip-permissions--sandbox 启动旗标。AGY 的工具权限与产物审查权限改由其官方持久化配置 ~/.gemini/antigravity-cli/settings.json 统一控制。此举不自动降低权限:若你的 AGY 设置为 always-proceed,它仍会以高自主模式执行,请只在可信工作区和可信调用链中使用。

原项目功能说明

以下内容按原 npm README 的结构转录,日志路径和权限旗标描述已按本仓库实际实现修正。

定位与优势

  • CodeX / Claude Code:负责高级思考、架构设计与决策规划。

  • AGY (Antigravity):作为执行子代理(Subagent),负责读取文件、执行代码、应用修改、运行终端等具体编码任务。原 README 默认以 Gemini 3.7 Flash (High) 为示例模型。

核心特性

  • 并发安全与实时流式

    • 终端精准透传:实时将 AGY 思考与生成内容通过 stderr 管道输出至控制台,并发任务自动携带专属短 ID 前缀,例如 [agy:6be7cb]

    • 独立隔离日志:每次调用分配唯一执行 ID,生成专属日志文件 D:\agy-mcp\<executionId>.log

    • 便捷追踪最新任务:自动更新 D:\agy-mcp\latest.log,用于定位最近一次任务日志。

    • 响应携带日志路径:每次工具返回元数据中包含专属 log: D:\agy-mcp\... 路径,便于单独排查。

    • MCP 协议通知:检测客户端 progressToken 后,通过 notifications/progress 推送文本型执行进度。

  • 🎯 显式模型控制:默认传递 --model "Gemini 3.7 Flash (High)";可通过工具参数指定模型与推理强度。

  • 🛡️ 权限由 AGY 官方配置管理:不在 MCP 内硬编码危险启动旗标;请在 AGY 的 settings.json 中审计 toolPermissionartifactReviewPolicyenableTerminalSandbox 与细粒度 permissions

  • 🔄 会话连续性:支持多轮对话(agy_conversation),可在同一个上下文内持续追问与迭代修改。

提供的 MCP 工具

1. agy_prompt

向 Antigravity 发送任务并获取响应。

参数

类型

必填

默认值

说明

prompt

string

-

发送给 Antigravity 的任务描述

cwd

string

当前目录

任务执行的工作目录(绝对路径)

add_dirs

string[]

-

额外的工作目录列表(绝对路径)

mode

string

accept-edits

执行模式:accept-editsplan

model

string

Gemini 3.7 Flash (High)

指定 AI 模型

effort

string

high

推理强度:low / medium / high

timeout_seconds

number

300

MCP 等待 AGY 终端结果的最长时间,单位为秒

2. agy_conversation

延续已有的 Antigravity 对话上下文。

参数

类型

必填

说明

conversation_id

string

上一次 agy_prompt 返回的会话 ID

prompt

string

追加的指令或反馈

timeout_seconds

number

超时时间(秒)

3. agy_models

查询当前环境可用的 Antigravity AI 模型列表。

Windows 本地运行

前提

  1. 安装 Node.js 20 或更高版本。

  2. 安装并完成 Antigravity CLI(agy 的登录。

  3. 在 PowerShell 中确认 AGY 可用:

    agy models
  4. 安装此项目的运行依赖:

    npm ci --omit=dev

启动

项目附带 Windows 启动包装脚本:

run-agy-mcp.cmd

它会将 AGY_EXECUTABLE 设为当前机器安装位置:

C:\Users\Administrator\AppData\Local\agy\bin\agy.exe

这个路径属于本机部署约定。若你的 AGY 位置不同,请修改该脚本,或自行在启动环境中设置 AGY_EXECUTABLE 后运行:

node .\dist\index.js

OpenCode 配置示例

OpenCode 使用 mcp.<name>.timeout 作为 MCP 请求超时,单位为毫秒。对 AGY 一类长任务,建议显式设置为 600 秒:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "agy-local": {
      "type": "local",
      "command": [
        "cmd.exe",
        "/d",
        "/c",
        "D:\\path\\to\\agy-mcp-windows\\run-agy-mcp.cmd"
      ],
      "cwd": "D:\\path\\to\\agy-mcp-windows",
      "enabled": true,
      "timeout": 600000
    }
  },
  "experimental": {
    "mcp_timeout": 600000
  }
}

配置写入后,应完整重启 OpenCode,使已运行的 MCP 客户端实例重新读取设置。

个人使用经验与已知限制

OpenCode 的超时需要手动放宽

这是实际测试中遇到的情况:OpenCode 的 mcp.<name>.timeout 单位是毫秒,并可能成为比 agy_prompt.timeout_seconds 更早触发的外层超时。

例如 timeout: 15000 只代表 15 秒;即使 MCP 工具参数传入 timeout_seconds: 600,OpenCode 仍可能先抛出:

McpError: MCP error -32001: Request timed out

建议把 OpenCode 的 mcp.agy-local.timeout 设为 600000,并同时设置 experimental.mcp_timeout: 600000。这只能放宽 OpenCode 的 MCP 请求层;OpenCode 更外层的模型工具步骤、AGY 自身状态及服务端限制仍可能先结束任务。

timeout_seconds: 600 必须真正作为工具参数传入

本 MCP 的 timeout_seconds 默认是 300 秒。只有 MCP 调用实际带上:

{ "timeout_seconds": 600 }

内部 AGY 子进程等待计时器才会改为 600 秒。仅在自然语言提示中说“允许执行 600 秒”,不能保证上游模型会把这个字段放入工具调用 JSON。

AGY 或 Gemini 网页端都无法调用模型时

曾出现 AGY CLI 与 Gemini 网页端都无法使用 AI 模型的现象。此类情况在本地表现为 CLI 请求无法正常得到模型结果,网页端也无法完成模型调用。

这是基于当时表现作出的环境侧判断:更像网络、地区、代理、账号会话或服务可用性问题,而非本 MCP 的代码问题。它不是 AGY 官方对具体原因的确认,也不能排除平台临时故障。排查时先验证网络/代理与账号状态,再用 agy models、一个极短的 agy -p 请求和 Gemini 网页端交叉确认。

日志可能包含敏感信息

D:\agy-mcp 的日志会记录 AGY 过程文本,可能含有提示词、代码片段和文件路径。请按敏感本地数据管理并定期清理。

许可证

原 npm 包在 package.json 中明确声明许可证为 GPL-3.0-only。本仓库作为基于该发布包的修改版本,整体继续以 GNU General Public License v3.0 only 发布。

  • 完整许可证文本见 LICENSE

  • 原始包:@itoseo/agy-mcp@1.0.0

  • 本仓库的修改内容与日期见 CHANGELOG.md

  • 本仓库只收录 npm 发布的构建产物及其修改版本;原作者的 TypeScript 原始工程未随 npm 包公开。

Available Tools

3 tools
agy_conversationA

延续一个已有的 Antigravity 对话。使用 agy_prompt 返回的 conversation_id 来继续之前的上下文。适合多轮交互场景,如迭代代码修改、追问细节等。

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes追加的指令
conversation_idYes要延续的对话 ID(由 agy_prompt 返回)
timeout_secondsNo超时时间(秒),默认 300

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It does disclose the key stateful behavior: this tool continues an existing conversation and preserves previous context. However, it does not mention side effects, whether the conversation is modified, error cases, auth requirements, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loads the core purpose, and every sentence adds value. It names the resource, the key parameter source, and representative use cases without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple conversational tool, the description covers purpose and usage context and the schema covers all parameters. However, with no output schema, it does not state what the tool returns, which would help an agent understand the result of continuing a conversation. Edge cases are also unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameter meanings are already fully documented. The description reinforces that conversation_id comes from agy_prompt, but this is also stated in the schema. It adds no extra semantics for prompt or timeout_seconds.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: '延续一个已有的 Antigravity 对话' (continue an existing Antigravity conversation). It clarifies that this tool is for continuing prior context using the conversation_id from agy_prompt, which distinguishes it from the sibling agy_prompt.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states suitable scenarios: multi-turn interactions such as iterative code modification and follow-up questions. It references agy_prompt as the source of conversation_id, implying agy_prompt is for starting conversations, but it does not explicitly say 'use agy_prompt for new conversations' or list exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

agy_modelsA

查询 Antigravity 可用的 AI 模型列表。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of behavioral disclosure. It conveys a read-only query action ('查询'), which is useful, but it does not mention response format, pagination, ordering, rate limits, or authorization needs. This is minimally transparent but not richly detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that immediately states the tool's action and target resource. There is no filler, and the essential information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (no parameters, no output schema) and clear purpose, the description is largely sufficient for an agent to invoke the tool correctly. The only minor gap is the absence of any detail about the returned list contents or behavioral guarantees, but this is not critical for a simple model-list query.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty (0 parameters), and the baseline for zero-parameter tools is 4. The description adds no parameter-specific detail because none is needed; there is nothing beyond the schema for the agent to disambiguate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('查询') and resource ('Antigravity 可用的 AI 模型列表'), clearly stating that the tool lists available AI models. This distinguishes it from the sibling tools agy_prompt and agy_conversation, which appear to handle prompt and conversation tasks rather than model listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: call this tool when you need to see available AI models on Antigravity. However, it does not explicitly state when not to use it, nor does it mention any alternative tool or edge cases, so the guidance remains implicit rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

agy_promptA

向 Antigravity AI 发送提示词并获取响应。Antigravity 是一个强大的 AI 编码助手,可以读写文件、运行命令、搜索代码库。适用于代码生成、代码审查、重构、调试等编码任务。返回结果中包含 conversation_id,可配合 agy_conversation 工具进行多轮对话。

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo工作目录(绝对路径)
modeNo执行模式:accept-edits(默认,自动应用修改)或 plan(仅规划不执行)
modelNo模型名称,默认 'Gemini 3.7 Flash (High)'。使用 agy_models 查看可用模型
effortNo推理强度,默认 high
promptYes发送给 Antigravity 的任务描述
add_dirsNo额外的工作目录列表(绝对路径)
timeout_secondsNo超时时间(秒),默认 300

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly warns that Antigravity can read and write files, run commands, and search codebases, which are significant behavioral traits. It also discloses the return of a conversation_id, but does not mention potential side effects, permissions, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no fluff: purpose, tool capabilities, and return/coordination hint. Each sentence adds distinct value and the most important information is front-loaded in the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters and no output schema, the description provides the essential context: what the tool does, what the assistant is capable of, and that responses include conversation_id for follow-up. It does not detail the full response structure or edge cases, but the 100% parameter schema coverage compensates for most remaining gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the input schema already documents all 7 parameters, including defaults and enum values. The description adds no additional parameter-level meaning beyond the schema, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: '发送提示词并获取响应' from Antigravity AI, and clearly names its function as a coding-task assistant. It also distinguishes itself from the agy_conversation sibling by explaining that this tool returns a conversation_id for multi-turn use with that tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context by stating it is suitable for code generation, review, refactoring, and debugging tasks. It also signals when to involve agy_conversation for multi-turn dialogue, though it does not explicitly say when not to use this tool or describe cases where agy_models would be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0-windows.1
    • First observedagy_conversation
    • First observedagy_models
    • First observedagy_prompt

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: starting a new prompt, continuing an existing conversation via conversation_id, and listing available models. There is no meaningful overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow the consistent agy_<noun> pattern in snake_case. The naming is predictable and clearly scoped to the Antigravity domain.

Tool Count5/5

Three tools are well-scoped for a focused MCP server that wraps Antigravity AI interactions. Each tool covers a necessary capability without unnecessary bloat.

Completeness4/5

The core lifecycle is covered: start a conversation, continue it, and check available models. Minor gaps exist such as no explicit conversation history listing or deletion, but these are not essential for the primary workflow.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    Turns any Windows device into a remotely controllable MCP toolset, allowing a mobile AI agent to execute CLI, GUI, browser, and system commands on Windows without an API key.
    2
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to seamlessly integrate with the Windows operating system, performing tasks such as file navigation, application control, UI interaction, and QA testing via the MCP protocol.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible coding agents to run the local Antigravity CLI as a coding agent, manage conversation context and common options, and inspect usage, quota, models, version, help, and read-only slash commands.
    18 npm
    MIT