agy-search
Leverages Google Search via the agy CLI to retrieve real-time information and answer queries.
Click on "Install 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-searchSearch for recent breakthroughs in fusion energy"
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.
agy-search
把本机 agy(antigravity-cli,后端 Gemini,能真实联网搜索)包装成一个 stdio MCP server,向 Claude Code 暴露 web_search 工具。
为什么需要这个
Claude Code 接本地模型时,内置的 WebSearch 是 Anthropic 服务端工具,搜索由官方 API 后端执行——本地模型/代理不实现该工具,所以 WebSearch 会返回空结果(Did 0 searches),联网搜索能力缺失。
本项目通过 MCP 工具补齐这个缺口:Claude Code 调用 mcp__agy__web_search → server 内部 spawn agy 子进程 → agy 经 Gemini/Google 联网搜索 → 返回结果。
Claude Code ──(stdio JSON-RPC)──► MCP server(长驻)──(tools/call)──► spawn: agy --prompt ... --output-format json ──► Gemini/Google 搜索 ──► 解析 response 回传Related MCP server: antigravity-cli-mcp
前置要求
agy(antigravity-cli) 已安装并在
PATH中,版本 ≥ 1.1.8uv(Python 包管理器)
Python 3.14+
安装
git clone <repo-url> && cd agy-search
uv sync # 安装依赖(fastmcp)注册到 Claude Code
推荐全局注册(任意目录都可用),用项目 venv 的绝对路径:
claude mcp add agy -s user -- /<绝对路径>/agy-search/.venv/bin/agy-search验证:
claude mcp list # 应列出 agy 且 ✔ Connected
claude mcp get agy # Scope 应为 User config注册后,Claude Code 内会出现工具 mcp__agy__web_search。
使用
在 Claude Code 里直接问需要联网的问题即可,模型会自动调用 mcp__agy__web_search:
今天有什么科技新闻?
工具签名:
web_search(query: str) -> strquery:搜索查询词(自然语言即可,agy 会自行联网检索)返回:agy 的答案文本(通常含来源)
可选:禁用不可用的内置 WebSearch
接本地模型时,内置 WebSearch 不可用却仍会被调用(白白浪费调用次数)。可在 ~/.claude/settings.json 加 permissions.deny 堵掉它,让搜索统一走 agy:
{
"permissions": {
"deny": ["WebSearch"]
}
}(WebFetch 仍可用,用于抓取已知 URL,不必禁用。)
本地开发
# 跑 server(fastmcp CLI,file:object 格式导入 server 对象,默认 stdio)
uv run fastmcp run src/agy_search/__init__.py:mcp
# 或经 entry point
uv run agy-search
# 单独验证 agy 契约(不经 MCP)
agy --prompt "测试查询" --output-format json --print-timeout 90sagy 调用契约(关键,有坑)
命令:agy --prompt "<查询>" --output-format json --print-timeout 90s
一律用
--prompt长选项,不用-p(实测-p会返回 flag 解释而非执行任务)。--print-timeout默认 5m 太长,用 90s。返回 JSON 主用字段:
response(答案文本)、status(SUCCESS/ERROR)、error。成败判定不能只看
status:实测status:"ERROR"时response仍可能含完整正确答案。判定逻辑——response非空(trim 后)即成功并返回(忽略 status);response空且error非空才算失败。失败时重试 1 次(应对
Eligibility check failed: EOF、SSE 断连等瞬时错误),仍失败则raise ToolError(MCP 回isError=True),server 不崩溃。
项目结构
src/agy_search/__init__.py # 全部实现:FastMCP server + web_search 工具 + agy 调用 + 重试
pyproject.toml # 依赖 fastmcp,entry point: agy-search = "agy_search:main"逻辑内聚在单文件,无额外模块。待加第二个工具时再把 agy 调用逻辑抽成独立模块复用。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that bridges OpenAI's Agents SDK with Claude Code, enabling web search, file search, and computer use capabilities directly in your development environment.Last updated291MIT
- Alicense-qualityBmaintenanceMCP server wrapping the agy CLI, enabling querying, web search, and file writing through tools like ask-agy, search-web, and write-file.Last updated111MIT
- Alicense-qualityDmaintenanceFree, unlimited web search MCP server using Gemini CLI's Google Search grounding to provide cited, live web results for any AI agent.Last updated1MIT
- Alicense-qualityAmaintenanceA self-contained web-research MCP server that lets local LLM agents search, fetch, and synthesize web content using tools like web_search, web_fetch, and web_research.Last updatedMIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
An MCP server that gives your AI access to the source code and docs of all public github repos
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrbruce516/agy-search'
If you have feedback or need assistance with the MCP directory API, please join our Discord server