Skip to main content
Glama
zhangsanfeng1094

agy-web-search-mcp

agy-web-search MCP

Independent Streamable HTTP MCP: turns the local agy Google login into a deployable /mcp endpoint. Local, Cloudflare Workers, and Vercel Edge share the same handler.

Local (automatically reads Google session)

If the local machine has already logged in with agy, directly:

bun run dev

It reads ~/.gemini/antigravity-cli/antigravity-oauth-token and listens on http://127.0.0.1:8787/mcp.

Grok:

[mcp_servers.agy-web-search]
url = "http://127.0.0.1:8787/mcp"

Related MCP server: Cloudflare Google OAuth MCP Server

Export session, prepare for deployment

bun run import-agy

Extract refresh_token from the agy token file, write it to .dev.vars (already gitignored), and print a 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

Deployment URL: 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 plan has a default 10s timeout, which may occasionally be insufficient for searches; Cloudflare is more suitable.

Grok Remote

[mcp_servers.agy-web-search]
url = "https://agy-web-search-mcp.<subdomain>.workers.dev/mcp"
headers = { Authorization = "Bearer ${AGY_MCP_TOKEN}" }

AGY_MCP_TOKEN is MCP_AUTH_TOKEN. Alternatively, you can avoid storing the Google token on the server and include it with each request:

headers = { Authorization = "Bearer ${AGY_MCP_TOKEN}", "X-Agy-Refresh-Token" = "${AGY_REFRESH_TOKEN}" }

Environment Variables

Variable

Purpose

AGY_REFRESH_TOKEN

agy Google refresh token

AGY_OAUTH_CLIENT_ID

agy desktop OAuth client id (do not commit to git)

AGY_OAUTH_CLIENT_SECRET

agy desktop OAuth client secret (do not commit to git)

MCP_AUTH_TOKEN

Bearer token to protect /mcp

AGY_SEARCH_PROJECT

Default default-cli-project

AGY_SEARCH_MODEL

Default gemini-3.6-flash-high

AGY_OAUTH_TOKEN_PATH

Override path for local token file

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables Google search queries and webpage content extraction through an MCP server deployed on Cloudflare Workers. Supports single and batch webpage content extraction with integrated OAuth authentication.
    1
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    A remote MCP server deployable on Cloudflare Workers that provides integrated Google OAuth authentication for secure tool access. It serves as a reference implementation for building persistent, authenticated MCP connections using Cloudflare Durable Objects and Streamable HTTP.
    1
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    A minimal MCP server that exposes a private SearXNG instance as a search tool over streamable-HTTP, enabling web search from the llama.cpp WebUI or any compatible MCP client.
    4
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    MCP server for web search powered by Google AI Mode (Gemini). Enables any AI agent to search the web in real-time for free and without rate limits.
    2
    181
    MIT