agymcp
Wraps the Antigravity CLI (agy) as an MCP server, enabling Claude Code and other MCP clients to execute AI tasks and manage conversations via the agy command.
README
agymcp
将 Antigravity CLI (agy) 包装为 MCP Server,供 Claude Code 等支持 MCP 协议的客户端调用。
前置条件
- Antigravity CLI 已安装并完成登录(
agy命令在 PATH 中可用) - uv 已安装(用于 uvx 拉取运行)
安装
在 ~/.claude.json 的 mcpServers 中添加:
{
"mcpServers": {
"agy": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/leologoli/agymcp.git",
"agymcp"
],
"env": {},
"type": "stdio"
}
}
}
重启 Claude Code 后生效,首次启动会自动拉取安装依赖。
工具说明
agy
调用 Antigravity CLI 执行 AI 任务,返回模型回复文本和会话 ID。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
PROMPT |
string | ✅ | 发送给 Antigravity 的任务指令 |
cd |
path | ✅ | 执行任务时的工作目录(workspace root) |
SESSION_ID |
string | ❌ | 续话会话 ID,为空时开启新会话 |
sandbox |
bool | ❌ | 是否启用沙箱模式,默认 false |
model |
string | ❌ | 指定模型,留空使用默认模型 |
返回:
| 字段 | 说明 |
|---|---|
success |
是否成功 |
SESSION_ID |
会话 UUID,传入下次调用可续话 |
agent_messages |
模型回复文本 |
error |
失败时的错误描述 |
示例:
// 新建会话
{
"PROMPT": "用一句话介绍你自己",
"cd": "/path/to/project"
}
// 续话
{
"PROMPT": "我上一条问你什么了?",
"cd": "/path/to/project",
"SESSION_ID": "56540478-7163-4d90-a476-f2487c81aa6a"
}
实现原理
- 以
--print模式运行agy,通过--log-file将日志写入临时文件 - 从日志中正则提取
conversation UUID作为SESSION_ID - 续话时通过
--conversation <SESSION_ID>参数恢复上下文 - 基于 FastMCP 实现 stdio 传输
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.