agy-web-search-mcp
A Streamable HTTP MCP server that enables Google search capabilities using agy's OAuth session, deployable locally or on Cloudflare Workers/Vercel Edge.
README
agy-web-search MCP
独立的 Streamable HTTP MCP:把本机 agy 的 Google 登录做成可部署的 /mcp 端点。本地、Cloudflare Workers、Vercel Edge 共用同一套 handler。
本地(自动读 Google session)
本机已经 agy 登录过的话,直接:
bun run dev
会读 ~/.gemini/antigravity-cli/antigravity-oauth-token,监听 http://127.0.0.1:8787/mcp。
Grok:
[mcp_servers.agy-web-search]
url = "http://127.0.0.1:8787/mcp"
导出 session,准备部署
bun run import-agy
从 agy token 文件抽出 refresh_token,写入 .dev.vars(已 gitignore),并打印一个 MCP_AUTH_TOKEN。
Cloudflare Workers
npx wrangler login
npx wrangler secret put AGY_REFRESH_TOKEN # 粘贴 refresh_token
npx wrangler secret put MCP_AUTH_TOKEN # 粘贴 import-agy 打印的 token
npx wrangler secret put AGY_OAUTH_CLIENT_ID
npx wrangler secret put AGY_OAUTH_CLIENT_SECRET
npx wrangler deploy
上线地址:https://agy-web-search-mcp.<subdomain>.workers.dev/mcp
Vercel
npx vercel env add AGY_REFRESH_TOKEN
npx vercel env add MCP_AUTH_TOKEN
npx vercel env add AGY_OAUTH_CLIENT_ID
npx vercel env add AGY_OAUTH_CLIENT_SECRET
npx vercel --prod
Hobby 默认 10s 超时,搜索偶尔会不够;Cloudflare 更合适。
Grok 远程
[mcp_servers.agy-web-search]
url = "https://agy-web-search-mcp.<subdomain>.workers.dev/mcp"
headers = { Authorization = "Bearer ${AGY_MCP_TOKEN}" }
AGY_MCP_TOKEN 就是 MCP_AUTH_TOKEN。也可以不把 Google token 放服务端,每次请求带:
headers = { Authorization = "Bearer ${AGY_MCP_TOKEN}", "X-Agy-Refresh-Token" = "${AGY_REFRESH_TOKEN}" }
环境变量
| 变量 | 作用 |
|---|---|
AGY_REFRESH_TOKEN |
agy Google refresh token |
AGY_OAUTH_CLIENT_ID |
agy 桌面端 OAuth client id(不要提交到 git) |
AGY_OAUTH_CLIENT_SECRET |
agy 桌面端 OAuth client secret(不要提交到 git) |
MCP_AUTH_TOKEN |
保护 /mcp 的 Bearer |
AGY_SEARCH_PROJECT |
默认 default-cli-project |
AGY_SEARCH_MODEL |
默认 gemini-3.6-flash-high |
AGY_OAUTH_TOKEN_PATH |
本地 token 文件覆盖路径 |
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.