Add real-time local restaurant data to any CrewAI agent. Pass https://stayinloop.dev/mcp in the mcps= parameter and all four Loop tools appear automatically. No API key required on the free tier.
mcps= (simplest)CrewAI has native MCP support. Pass the Loop server URL as a string in the mcps= parameter on your Agent. CrewAI connects over HTTP and discovers search, get_details, verify, and report automatically. No extra packages beyond crewai.
from crewai import Agent, Task, Crew agent = Agent( role="Local Business Researcher", goal="Find and verify real local restaurants for user queries", backstory="Expert at using real-time data tools to find accurate local business information.", mcps=["https://stayinloop.dev/mcp"], # Loop's MCP server — all 4 tools auto-discovered verbose=True ) task = Task( description=( "Search for vegetarian-friendly restaurants with outdoor seating in Kreuzberg Berlin. " "Verify that the top result is currently open, then report the final outcome." ), expected_output="Verified restaurant recommendation with current availability status.", agent=agent ) crew = Crew(agents=[agent], tasks=[task]) result = crew.kickoff() print(result)
Use MCPServerAdapter from crewai_tools when you need to inspect available tools at runtime, manage the connection lifecycle explicitly, or share tools across multiple agents. Install with pip install crewai-tools.
from crewai import Agent, Task, Crew, Process from crewai_tools import MCPServerAdapter server_params = { "url": "https://stayinloop.dev/mcp", "transport": "streamable-http" } with MCPServerAdapter(server_params) as loop_tools: # loop_tools is a list of CrewAI Tool objects: # [search, get_details, verify, report] agent = Agent( role="Local Business Researcher", goal="Find and verify real local restaurants for user queries", backstory="Expert at finding accurate local business information.", tools=loop_tools, verbose=True ) task = Task( description=( "Search for Italian restaurants in Kreuzberg Berlin. " "Verify the top result is open, then report the outcome." ), expected_output="Verified Italian restaurant with open status.", agent=agent ) crew = Crew( agents=[agent], tasks=[task], process=Process.sequential, verbose=True ) result = crew.kickoff() print(result)
The free tier requires no authentication. For higher-volume projects, apply for an API key and pass it using MCPServerHTTP from crewai.mcp.
from crewai import Agent, Task, Crew from crewai.mcp import MCPServerHTTP # For higher-volume projects with an API key: agent = Agent( role="Local Business Researcher", goal="Find and verify real local restaurants for user queries", backstory="Expert at finding accurate local business information.", mcps=[ MCPServerHTTP( url="https://stayinloop.dev/mcp", headers={"Authorization": "Bearer YOUR_API_KEY"} ) ] )
| Tool | When to call | Key output |
|---|---|---|
search() | User asks for a restaurant | Up to 8 ranked records |
get_details() | User selects a result | Full record + result_token |
verify() | Before committing to a recommendation | Live observation + confidence |
report() | After user acts on result | Mutates record confidence |
Full schema: api.stayinloop.dev/v1/openapi.json
| Symbol | Correct import |
|---|---|
Agent, Task, Crew, Process | from crewai import Agent, Task, Crew, Process |
MCPServerAdapter | from crewai_tools import MCPServerAdapter |
MCPServerHTTP | from crewai.mcp import MCPServerHTTP |
BaseTool, @tool | from crewai.tools import BaseTool, tool |
Pass "https://stayinloop.dev/mcp" as a string in the mcps=[] parameter on your Agent. CrewAI connects over HTTP and discovers Loop's four tools automatically. No extra packages required beyond crewai.
Use MCPServerAdapter when you need to inspect available tools at runtime, control connection lifecycle explicitly (e.g. in a long-running service), or share the same tool list across multiple agents. The mcps= shorthand is simpler for most use cases.
The result_token is returned by get_details() and required to call report(). It is a signed HMAC token that expires after 30 minutes. The CrewAI agent holds it in context between the get_details call and the subsequent report call.
No. The free tier accepts unauthenticated connections. For higher-volume projects, apply for a key at stayinloop.dev/#pricing and pass it via MCPServerHTTP with an Authorization: Bearer <key> header.