MCP Hub
Back to servers

yelp-mcp-sdk

Provides Yelp Fusion API access through MCP tools and resources for searching businesses, getting reviews, and more.

glama
Updated
May 3, 2026

yelp-mcp-sdk

Yelp Fusion MCP server built on the official MCP Python SDK. Functionally identical to yelp-mcp-min (FastMCP), but uses the low-level Server class directly — no framework abstractions.

Prerequisites

Installation

uv sync
cp .env.example .env
# Edit .env and set YELP_API_KEY

Running

# stdio transport (for use with Claude Desktop or an MCP client)
uv run python -m server.main

# Docker
docker build -t yelp-mcp-sdk .
docker buildx build -t yelp-mcp-sdk .
docker run --env-file .env yelp-mcp-sdk

Environment variables

VariableRequiredDefaultDescription
YELP_API_KEYYesYelp Fusion API bearer token
YELP_BASE_URLNohttps://api.yelp.com/v3API base URL
HTTP_TIMEOUTNo10.0Request timeout in seconds
HTTP_MAX_RETRIESNo3Max retry attempts on 429/5xx
HTTP_RETRY_WAIT_MINNo1.0Min back-off wait in seconds
HTTP_RETRY_WAIT_MAXNo10.0Max back-off wait in seconds
LOG_LEVELNoINFOstructlog level
JSON_LOGSNofalseEmit JSON log lines

Tools

ToolYelp endpointDescription
search_businessesGET /v3/businesses/searchFull-text + geo search with pagination
find_business_by_phoneGET /v3/businesses/search/phoneLook up a business by E.164 phone number
match_businessGET /v3/businesses/matchesMatch structured name+address to Yelp listing
get_businessGET /v3/businesses/{id}Full business profile by Yelp ID or alias
get_business_reviewsGET /v3/businesses/{id}/reviewsCustomer reviews with pagination

Resource

yelp://business/{id} — Full Yelp business profile as application/json. Declared via list_resource_templates; fetched via read_resource.

Project structure

yelp-mcp-sdk/
  server/
    main.py              # Server("yelp-mcp", lifespan=...) + stdio run
    core/
      config.py          # pydantic-settings
      logging.py         # structlog → stderr
      client.py          # async httpx + tenacity retry
      models.py          # Pydantic output models
    handlers/
      params.py          # Pydantic input models (also generate inputSchema)
      tools.py           # list_tools() + call_tool() dispatcher
      resources.py       # list_resource_templates() + read_resource()
  tests/
    conftest.py
    test_client.py
    test_models.py
    test_handlers.py
  Dockerfile
  pyproject.toml
  .env.example

Running tests

uv run pytest -v

Comparison with yelp-mcp-min (FastMCP)

Aspectyelp-mcp-min (FastMCP)yelp-mcp-sdk (official SDK)
Tool registration@mcp.tool() decoratorlist_tools + call_tool dispatcher
Input schemaAuto-generated from func sigmodel.model_json_schema() explicit
Output typeReturn Pydantic model directlylist[TextContent] with JSON string
Resources@mcp.resource("uri://...") decoratorlist_resource_templates + read_resource pair
Dependency injectNone (captured via closure)lifespan context → request_context
Transportmcp.run()asyncio.run() + stdio_server()
Server LOC~350~450

Reviews

No reviews yet

Sign in to write a review