You will need:
- A Composio API key
- An OpenAI API key (used by Autogen's
OpenAIChatCompletionClient) - A Yelp account you can connect to Composio
- Some basic familiarity with Autogen and Python async
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.SIGN UP
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.LOG IN
You can build a list of local businesses, pick a restaurant for a client dinner and size up the competition near a location from AutoGen. Composio runs each call on its own Yelp account, so you don't need a Yelp API key, and your first $2 is free.
AutoGen runs Yelp through Composio, and the cost comes out of your free $2.
$2 ≈ 95 searches or 95 lookups
| When you ask AutoGen for | AutoGen uses this tool | Cost | What $2 gets you |
|---|---|---|---|
| Local businesses from a search | Search Businesses | $0.021 per search | About 95 searches |
| Hours, phone and rating for a business | Get Business Details | $0.021 per lookup | About 95 lookups |
| Review excerpts for a business | Get Business Reviews | $0.021 per lookup | About 95 lookups |
| A business from its phone number | Search Business by Phone | $0.021 per lookup | About 95 lookups |
| Events in a city | Search Events | $0.021 per search | About 95 searches |
You pay Yelp's price for each call with 0% markup, plus the regular Composio tool call charge. There's no Yelp subscription, and you only pay for what you use.
10 of 12 Yelp tools work without a key. For Get Review Highlights and Search and Chat, connect your own Yelp key. Read how Instant works.
Composio adds Yelp to AutoGen as an Instant toolkit. You connect Composio to AutoGen once, and then AutoGen can use Yelp right away. There are two ways to do this:
You bring your own Yelp API key, set it up, and use it.
Composio runs each call on its own Yelp account, so you don't have to set anything up at Yelp, and your first $2 is free.
You do the setup one time and it takes about a minute. If you build Yelp into your own product, turn on Instant toolkits in your project settings so your agent can call Yelp for each of your users without a Yelp API key, and read Instant tools in the Composio docs for the setup steps and code examples.
Open your Composio wallet and turn on Instant. Your free $2 shows up there.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Open my wallet
Follow the setup below. You only do this once.
Try a Yelp prompt. The cost comes out of your $2.
You will need:
OpenAIChatCompletionClient)pip install composio python-dotenv
pip install autogen-agentchat autogen-ext-openai autogen-ext-toolsInstall Composio, Autogen extensions, and dotenv.
What's happening:
composio connects your agent to Yelp via MCPautogen-agentchat provides the AssistantAgent classautogen-ext-openai provides the OpenAI model clientautogen-ext-tools provides MCP workbench supportCOMPOSIO_API_KEY=your-composio-api-key
OPENAI_API_KEY=your-openai-api-key
USER_ID=your-user-identifier@example.comCreate a .env file in your project folder.
What's happening:
COMPOSIO_API_KEY is required to talk to ComposioOPENAI_API_KEY is used by Autogen's OpenAI clientUSER_ID is how Composio identifies which user's Yelp connections to useimport asyncio
import os
from dotenv import load_dotenv
from composio import Composio
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpServerParams
load_dotenv()
async def main():
# Initialize Composio and create a Yelp session
composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
session = composio.create(
user_id=os.getenv("USER_ID"),
toolkits=["yelp"]
)
url = session.mcp.urlload_dotenv() reads your .env fileComposio(api_key=...) initializes the SDKcreate(...) creates a Tool Router session that exposes Yelp toolssession.mcp.url is the MCP endpoint that Autogen will connect to# Configure MCP server parameters for Streamable HTTP
server_params = StreamableHttpServerParams(
url=url,
timeout=30.0,
sse_read_timeout=300.0,
terminate_on_close=True,
headers={"x-api-key": os.getenv("COMPOSIO_API_KEY")}
)Autogen expects parameters describing how to talk to the MCP server. That is what StreamableHttpServerParams is for.
What's happening:
url points to the Tool Router MCP endpoint from Composiotimeout is the HTTP timeout for requestssse_read_timeout controls how long to wait when streaming responsesterminate_on_close=True cleans up the MCP server process when the workbench is closed# Create model client
model_client = OpenAIChatCompletionClient(
model="gpt-5",
api_key=os.getenv("OPENAI_API_KEY")
)
# Use McpWorkbench as context manager
async with McpWorkbench(server_params) as workbench:
# Create Yelp assistant agent with MCP tools
agent = AssistantAgent(
name="yelp_assistant",
description="An AI assistant that helps with Yelp operations.",
model_client=model_client,
workbench=workbench,
model_client_stream=True,
max_tool_iterations=10
)What's happening:
OpenAIChatCompletionClient wraps the OpenAI model for AutogenMcpWorkbench connects the agent to the MCP toolsAssistantAgent is configured with the Yelp tools from the workbenchprint("Chat started! Type 'exit' or 'quit' to end the conversation.\n")
print("Ask any Yelp related question or task to the agent.\n")
# Conversation loop
while True:
user_input = input("You: ").strip()
if user_input.lower() in ["exit", "quit", "bye"]:
print("\nGoodbye!")
break
if not user_input:
continue
print("\nAgent is thinking...\n")
# Run the agent with streaming
try:
response_text = ""
async for message in agent.run_stream(task=user_input):
if hasattr(message, "content") and message.content:
response_text = message.content
# Print the final response
if response_text:
print(f"Agent: {response_text}\n")
else:
print("Agent: I encountered an issue processing your request.\n")
except Exception as e:
print(f"Agent: Sorry, I encountered an error: {str(e)}\n")You:agent.run_stream(...) yields streaming messages as the agent thinks and calls toolsexit, quit, or bye ends the loopHere's the complete code to get you started with Yelp and AutoGen:
import asyncio
import os
from dotenv import load_dotenv
from composio import Composio
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import McpWorkbench, StreamableHttpServerParams
load_dotenv()
async def main():
# Initialize Composio and create a Yelp session
composio = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
session = composio.create(
user_id=os.getenv("USER_ID"),
toolkits=["yelp"]
)
url = session.mcp.url
# Configure MCP server parameters for Streamable HTTP
server_params = StreamableHttpServerParams(
url=url,
timeout=30.0,
sse_read_timeout=300.0,
terminate_on_close=True,
headers={"x-api-key": os.getenv("COMPOSIO_API_KEY")}
)
# Create model client
model_client = OpenAIChatCompletionClient(
model="gpt-5",
api_key=os.getenv("OPENAI_API_KEY")
)
# Use McpWorkbench as context manager
async with McpWorkbench(server_params) as workbench:
# Create Yelp assistant agent with MCP tools
agent = AssistantAgent(
name="yelp_assistant",
description="An AI assistant that helps with Yelp operations.",
model_client=model_client,
workbench=workbench,
model_client_stream=True,
max_tool_iterations=10
)
print("Chat started! Type 'exit' or 'quit' to end the conversation.\n")
print("Ask any Yelp related question or task to the agent.\n")
# Conversation loop
while True:
user_input = input("You: ").strip()
if user_input.lower() in ['exit', 'quit', 'bye']:
print("\nGoodbye!")
break
if not user_input:
continue
print("\nAgent is thinking...\n")
# Run the agent with streaming
try:
response_text = ""
async for message in agent.run_stream(task=user_input):
if hasattr(message, 'content') and message.content:
response_text = message.content
# Print the final response
if response_text:
print(f"Agent: {response_text}\n")
else:
print("Agent: I encountered an issue processing your request.\n")
except Exception as e:
print(f"Agent: Sorry, I encountered an error: {str(e)}\n")
if __name__ == "__main__":
asyncio.run(main())Start a new chat and try this prompt:
Find plumbers in Chicago, IL on Yelp and give me a table of up to 50 with each one's name, phone number, address, rating and review count.
AutoGen runs it on Instant and shows you the result. It doesn't ask you for a Yelp key, and the cost comes out of your $2. You can see each call in your wallet.
If you want Get Review Highlights and Search and Chat, you need your own key. Ask AutoGen to connect your Yelp account, and it gives you a Composio link:
Connect my Yelp account using Composio.
Open the link, paste your Yelp API key and click Connect Account. You can get a key from Yelp Manage App page. After that, Composio uses your key first and doesn't charge Instant for those calls.
Each prompt runs on Instant, and the cost next to it is about what it takes from your $2.
Pulls up to 50 businesses of one type in a city, with phone numbers, addresses and ratings, in one search.
Find plumbers in Chicago, IL on Yelp and give me a table of up to 50 with each one's name, phone number, address, rating and review count.
Finds well-rated restaurants near you that are open when you need them, with review excerpts for the top pick.
Find Italian restaurants within 2 km of [office address], priced $$ or $$$, that are open at 7 pm on [date]. Show the 5 best rated with rating, review count and address, plus review excerpts for the top one.
Counts similar businesses around an address and shows their ratings and price levels before you pick a site.
I'm thinking of opening a coffee shop at [address]. Find coffee shops within 1 mile, and tell me how many there are, their average rating, their price levels and which 5 have the most reviews.
Puts your Yelp rating, review count, price and hours next to 3 competitors, with their latest review excerpts.
Compare my business with 3 competitors on Yelp. Phone numbers: mine [phone], theirs [phone], [phone], [phone]. Show rating, review count, price level and hours side by side, plus the latest review excerpts for each.
Matches each phone number to its Yelp listing and flags any listing marked as closed.
Look up these business phone numbers on Yelp and give me the business name, address and category for each. Flag any marked as closed and any with no Yelp match: [paste up to 10 phone numbers with country code].
Lists upcoming events in a city for the weekend, with times, venues and whether they're free.
Find events in [city] this Saturday and Sunday, most popular first. List the name, start time, venue, whether it's free, and the Yelp link.
| Tool | What it does | Works without a key | Cost on Instant |
|---|---|---|---|
| Autocomplete Search | Get autocomplete suggestions for businesses, categories, and search terms on Yelp based on partial text input. | Yes | Estimated $0.021 per successful API call |
| Get Business Details | Get detailed information about a Yelp business by ID or alias, including location, photos, rating, review count and, when available, hours and phone number. | Yes | Estimated $0.021 per successful API call |
| Get Business Reviews | Get reviews for a specific business on Yelp using its business ID or alias. | Yes | Estimated $0.021 per successful API call |
| Get Category Details | Get detailed information about a specific Yelp category by its alias. | Yes | Estimated $0.021 per successful API call |
| Get Event Details | Get details of a Yelp event by its event ID, including dates, location, cost, attendance counts and, when available, the associated business ID. | Yes | Estimated $0.021 per successful API call |
| Get Featured Event | Get the featured event for a given location on Yelp. | Yes | Estimated $0.021 per successful API call |
| List Categories | List all Yelp business categories across all locales by default. | Yes | Estimated $0.021 per successful API call |
| Search Businesses | Search Yelp businesses by location, term, categories and other filters, with up to 50 results per call and offset pagination. | Yes | Estimated $0.021 per successful API call |
| Search Business by Phone | Search for a business by phone number on Yelp. | Yes | Estimated $0.021 per successful API call |
| Search Events | Search for events on Yelp by location, categories, and other filters. | Yes | Estimated $0.021 per successful API call |
| Get Review Highlights | Get review highlights for a specific business on Yelp using its business ID or alias. | Needs your own key | Billed to your own Yelp key |
| Search and Chat | Chat with Yelp's AI assistant to search for businesses, get recommendations, and ask questions. | Needs your own key | Billed to your own Yelp key |
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Open my Composio wallet
You may have asked for something that needs your own key, like Get Review Highlights and Search and Chat. Those tools don't run on Instant. For everything else, check that Instant is turned on in your Composio wallet, then ask again.
Open your wallet in the Composio dashboard and check that Instant is turned on. If the $2 still isn't there, email support@composio.dev from the address you signed up with.
Your balance is empty. Add funds to your wallet on a Pro plan, or connect your own Yelp key, then try again.
Use Yelp MCP with Claude Code
Use Yelp MCP with Claude Cowork
Use Yelp MCP with OpenAI Agents SDK
Use Yelp MCP with Claude Agent SDK
Use Yelp MCP with Codex

Use Yelp MCP with OpenClaw

Use Yelp MCP with Hermes
Use Yelp MCP with Atomic Agent
Use Yelp MCP with Google ADK
Use Yelp MCP with LangChain
Use Yelp MCP with Vercel AI SDK
Use Yelp MCP with Mastra AI
Use Yelp MCP with LlamaIndex
Use Yelp MCP with CrewAI
Use Yelp MCP with Pydantic AI
Firecrawl automates large-scale web crawling and data extraction. It helps organizations efficiently gather, index, and analyze content from online sources.
Tavily offers powerful search and data retrieval from documents, databases, and the web. It helps teams locate and filter information instantly, saving hours on research.
Exa is a data extraction and search platform for gathering and analyzing information from websites, APIs, or databases. It helps teams quickly surface insights and automate data-driven workflows.
SerpApi is a real-time API for structured search engine results. It lets you automate SERP data collection, parsing, and analysis for SEO and research.
Not for the 10 tools that run on Instant. Composio runs those calls on its own Yelp account, and you only add Composio to your agent. The other 2 tools need your own Yelp key.
Yes. Every Composio account gets $2 of Instant credit once you turn on Instant, and you can use it on Yelp or on any other Instant toolkit.
You can get about 95 searches, about 95 lookups or about 95 lookups. The price list on this page shows the cost of each tool.
Instant calls stop. You can add funds to your wallet on a Pro plan, or connect your own Yelp key.
You pay Yelp's price for each call with 0% markup, plus the regular Composio tool call charge.
Yes. Connect your key from the Yelp toolkit in your Composio dashboard. Composio always uses your own connection first, and it doesn't charge Instant for those calls.
You can use 10 of the 12 tools without a key, including Autocomplete Search, Get Business Details, Get Business Reviews, Get Category Details, Get Event Details, Get Featured Event and 4 more. The other 2 tools need your own Yelp key.
Composio is SOC 2 Type II compliant.
New accounts get a one-time $2 starter credit for Instant calls.Run Yelp from your agent with no Yelp key.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Get $2 starter credit