agy-search
Provides web search through Antigravity's built-in search, returning concise answers and real publisher source URLs derived from Google grounding.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agy-searchWhat's the latest stable Python version and when was it released?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
一种基于「反重力」(Antigravity)向没有 Web Search 能力的 Claude Code 提供搜索的服务。
A tiny MCP server that gives Claude Code web search through the Antigravity CLI you already have installed and logged in.
Claude Code 的内置 WebSearch 在部分环境里不可用:未启用、被代理限制,或账号与地区不支持。agy-search 把本机 agy 的 search_web 包成一个只读 MCP 工具:传入一个 query,返回简明答案和真实来源链接。
它是什么
一个工具:
search(query)。schema 只有一个参数,几乎不占上下文。只读:每次调用在一次性临时目录中执行,不使用
--dangerously-skip-permissions;不写代码、不跑 shell、不启用子代理。来源真实:服务端把 Google grounding 返回的长跳转链接并行解析成发布者 URL,答案最多保留 5 条来源。
模型可配:默认
gemini-3.8-flash-high,可用AGY_SEARCH_MODEL改成任意agy models中的模型。失败可恢复:agy 卡死或返回空答案时自动换新进程重试一次。
Related MCP server: web-search-mcp
真实输出
以下是 2026-10-24 在 gemini-3.8-flash-high 上通过 MCP 链路得到的真实结果(节选):
> What is the latest stable Python version and its release date?
The latest stable Python version is **Python 3.15.1**, released on **October 21, 2026**.
Sources:
- https://docs.python.org/3/whatsnew/3.15.html
- https://www.python.org/downloads/latest/
- https://www.python.org/downloads/答案约 300 字符,来源均为 python.org 的真实页面;没有保留任何 grounding 跳转链接。
工作方式
Claude Code 调用 mcp__agy-search__search → agy-search 在临时目录中启动 agy -p → agy 使用内置 search_web → 服务端解析事件流、清理来源链接,把答案返回给 Claude Code。
快速开始
前置条件
已安装并登录 Antigravity CLI:
agy --version agy -p "say hi"agy -p会读取 stdin;如果命令挂住,用agy -p "say hi" < /dev/null(Windows 可省略)。Python 3.10+,以及可用的
claudeCLI。
macOS / Linux
git clone https://github.com/MagicYuHeng/agy_search.git
cd agy_search
python3 -m venv .venv
.venv/bin/pip install -e .
claude mcp add --scope user agy-search -e AGY_SEARCH_MODEL=gemini-3.8-flash-high -- "$PWD/.venv/bin/python" -m agy_search.serverWindows(PowerShell)
git clone https://github.com/MagicYuHeng/agy_search.git
cd agy_search
python -m venv .venv
.\.venv\Scripts\pip.exe install -e .
claude mcp add --scope user agy-search -e AGY_SEARCH_MODEL=gemini-3.8-flash-high -- "$PWD\.venv\Scripts\python.exe" -m agy_search.server注册后新开一个 Claude Code 会话,工具会以 mcp__agy-search__search 出现。可以先验证:
.venv/bin/python tests/mcp_smoke.py "今天 UTC 日期"Windows 把 .venv/bin/python 换成 .venv\Scripts\python.exe。
交给 agent 一键安装
把下面整段复制给 Claude Code / Codex / 其他能执行命令的 agent:
请帮我在本机安装并注册开源项目 agy-search(仓库:https://github.com/MagicYuHeng/agy_search)。
目标:让 Claude Code 获得联网搜索工具 mcp__agy-search__search。
请按顺序执行:
1. 检查前置条件:`agy --version` 可用,且 `agy -p "say hi"` 能返回内容;Python >= 3.10;`claude` CLI 可用。任一不满足就停止并说明原因。
2. 克隆仓库到 ~/tools/agy_search(Windows 为 %USERPROFILE%\tools\agy_search);目录已存在则执行 git pull。
3. 在仓库内创建 .venv,并执行 `pip install -e .`。
4. 注册用户级 MCP(按操作系统选择):
- Windows:claude mcp add --scope user agy-search -e AGY_SEARCH_MODEL=gemini-3.8-flash-high -- "<仓库路径>\.venv\Scripts\python.exe" -m agy_search.server
- macOS/Linux:claude mcp add --scope user agy-search -e AGY_SEARCH_MODEL=gemini-3.8-flash-high -- "<仓库路径>/.venv/bin/python" -m agy_search.server
5. 运行 `claude mcp list`,确认 agy-search 的状态为 Connected。
6. 运行 MCP 冒烟测试:`"<仓库路径>/.venv/bin/python" tests/mcp_smoke.py "今天 UTC 日期"`(Windows 用 .venv\Scripts\python.exe),确认返回非空答案。
7. 报告实际执行的命令、MCP 状态和测试结果。
安全约束:不要使用 --dangerously-skip-permissions;不要修改与安装无关的配置;只写入仓库目录和 Claude Code 的 MCP 配置。配置
变量 | 默认值 | 说明 |
|
| 默认模型 id( |
| 空 | 可选的 |
|
| 单次调用硬超时(秒) |
|
| 硬超时后的重试次数 |
|
| 返回文本上限,超出截断 |
|
| 是否把 grounding 跳转链接解析成真实 URL |
|
| 单条链接解析超时(秒) |
|
| agy 可执行文件路径 |
修改默认模型时,重新执行一次 claude mcp add(覆盖同名配置),或直接编辑 ~/.claude.json 中 agy-search 的 env。
限制
搜索质量与可用性取决于 Antigravity 的 Google 搜索和你的账号额度;使用前必须在本机登录
agy。这是搜索工具,不是通用代理:不能生成图片、写代码或执行命令。
对需要登录、强反爬的内容(例如部分 X/Twitter 页面)可能拿不到完整信息。
目前从源码安装,尚未发布到 PyPI。
本项目与 Google / Antigravity 无隶属关系。
致谢
agy-search 的调用契约和封装思路来自下面两个优秀的 MIT 项目,感谢作者的工作:
tphakala/agy-mcp — 采用
--output-format stream-json驱动 agy、解析init/step_update/result事件流、显式关闭 stdin、用--print-timeout留出安全预算,以及对失败状态的分类处理。andyleimc-source/agy-mcp — 极简的 Python MCP 封装、在一次性目录中运行
agy -p、超时重试,以及「校验实际结果而不是只信模型口述」的思路。
本仓库的搜索提示词、来源链接解析、只读约束与测试为本项目自有实现。完整的版权与 MIT 许可文本见 NOTICE。
License
MIT © 2026 MagicYuHeng
Available Tools
1 toolsearchARead-only
Search the web and return a concise answer with source URLs.
Args: query: Natural-language search query.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint and idempotentHint=false, so the safety and external-reach profile is covered. The description adds that results are synthesized into a concise answer with cited sources, which is useful, but says nothing about freshness, result limits, rate limiting, or how open-ended the query can be.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core sentence is front-loaded and tight. The trailing 'Args:' docstring block restates the single schema field, which is mildly redundant but costs little.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, return values need not be explained, and annotations cover the safety profile. For a one-parameter tool this is nearly sufficient; only search-behavior specifics (freshness, result count, query style) are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the parameter, and it does partially by calling it a 'Natural-language search query' — telling the agent not to expect operator syntax. However it gives no guidance on phrasing length, quoting, or how to disambiguate broad queries, so it only half compensates for the gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Search the web') and even characterizes the response ('a concise answer with source URLs'), which an agent can act on immediately. It lacks sibling differentiation, but the sibling list is empty, so nothing more was needed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied by the verb — the agent must infer that this is for general web lookups rather than, say, internal document search. No when-to-use context, no exclusions, and no note on when a different retrieval approach would be preferable.
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 tool update
v0.1.0- First observed
search
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of misselection between tools. Its purpose (web search with a natural-language query) is unambiguous.
The single name 'search' is clear and lowercase, but it lacks the verb_noun form used in the calibration examples and is generic enough to be ambiguous outside the server's context.
One tool is thin even for a narrowly scoped search server; there is no companion operation such as fetching or opening a specific source URL. The surface is minimal but not mismatched to a single-purpose server.
Search with source URLs covers the core lookup need, but agents cannot retrieve or expand a specific source page, leaving a notable gap in the research workflow. Minor workarounds exist by re-querying.
Maintenance
Related MCP Connectors
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Agent-native internet gateway: typed search, fetch, scrape, crawl, and extract via the Clawifi API.
Related MCP Servers
- AlicenseBqualityDmaintenanceFacilitates web search capabilities using Perplexity's API, allowing users to retrieve search results through Claude's interface.18MIT
- FlicenseAqualityDmaintenanceProvides a web search tool with citations by running Claude Code CLI in an isolated Docker container, enabling search even in environments without direct Anthropic web search support.1-
- AlicenseNot gradedqualityCmaintenanceEnables Claude and other MCP-compatible clients to run web searches backed by Google Gemini grounding (Google Search), returning the answer text together with a list of the cited sources. It strips out Google's search-box HTML/CSS payload so clients receive only concise text plus source links.14 npmMIT
- AlicenseAqualityCmaintenanceLets MCP clients such as Claude Code, Claude Desktop, Cursor, or Codex hand tasks to the Antigravity CLI (agy) so the work runs on the user's Antigravity plan instead of the client's. Exposes tools for delegated coding tasks and reviews, web search with sources, image/PDF analysis, shell command generation or execution, brainstorming, and model/quota checks.7MIT