Loop is a remote MCP server. Google Gemini reaches it two ways — the Gemini CLI (a single line in settings.json) or the google-genai SDKin Python. Either way, Loop’s four tools let Gemini search, verify, and act on real local businesses in Kreuzberg, Berlin.
Edit ~/.gemini/settings.json(create it if it doesn’t exist) for a user-wide install. For a single project, use .gemini/settings.json in the project root instead.
Add the block below. The Gemini CLI uses the httpUrl key for remote streamable-HTTP MCP servers (as opposed to url for SSE or command for local stdio).
{ "mcpServers": { "loop": { "httpUrl": "https://stayinloop.dev/mcp" } } }
Restart the gemini command and run /mcp. Loop appears in the server list and its tools (search, get_details, verify, report) become available to the model.
You need the Gen AI SDK and the MCP Python SDK. Set GEMINI_API_KEY in your environment for the Gemini model.
pip install google-genai mcpOpen a streamable-HTTP connection to Loop, wrap it in a ClientSession, and hand the live session to tools. The Gen AI SDK lists Loop’s tools and calls them automatically. MCP support in the SDK is currently labeled experimental.
import asyncio from google import genai from google.genai import types from mcp import ClientSession from mcp.client.streamable_http import streamablehttp_client client = genai.Client() # reads GEMINI_API_KEY from the environment async def main(): # Loop is a remote streamable-HTTP MCP server. async with streamablehttp_client("https://stayinloop.dev/mcp") as (read, write, _): async with ClientSession(read, write) as session: await session.initialize() response = await client.aio.models.generate_content( model="gemini-2.5-flash", contents=( "Find a quiet restaurant with outdoor seating in Kreuzberg, " "verify how fresh the data is, then report the outcome." ), # Pass the live MCP session straight into tools — the SDK lists # Loop's tools and calls them automatically. (Experimental.) config=types.GenerateContentConfig(tools=[session]), ) print(response.text) asyncio.run(main())
Have an API key?
Loop reads an Authorization: Bearer header for higher rate limits (60 reads/min vs 30 anonymous). In the Gemini CLI, add a headers block:
{ "mcpServers": { "loop": { "httpUrl": "https://stayinloop.dev/mcp", "headers": { "Authorization": "Bearer sk_live_YOUR_KEY" } } } }
In the SDK, pass the same header to streamablehttp_client:
async with streamablehttp_client( "https://stayinloop.dev/mcp", headers={"Authorization": "Bearer sk_live_YOUR_KEY"}, ) as (read, write, _): ...
Get a free key at stayinloop.dev/#pricing — no credit card, instant.
“Find me a quiet restaurant with outdoor seating and vegan options in Kreuzberg tonight — then verify how fresh the data is, and report back whether the result was correct.”
This exercises all four tools: search finds candidates, verify re-checks freshness live, and report records the outcome — updating the record’s confidence for every future agent that calls Loop.