MCP Hub
Back to servers

yelp-mcp-min

Minimal MCP server for the Yelp Fusion API v3, enabling business search, phone lookup, match, details, and reviews via FastMCP.

glama
Updated
May 3, 2026

yelp-mcp-min

Minimal MCP server for the Yelp Fusion API v3, built with FastMCP 3.

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-min .
docker run --env-file .env yelp-mcp-min
docker buildx build -t yelp-mcp-min .

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 (for Datadog etc)

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} — Returns the same payload as get_business as an MCP resource (application/json). MCP clients that support resources can embed or subscribe to this URI directly.

Project structure

yelp-mcp-min/
  server/
    main.py              # FastMCP instance + wiring
    core/
      config.py          # pydantic-settings (YELP_API_KEY, tunables)
      logging.py         # structlog setup (stderr only)
      client.py          # async httpx client, retry, error mapping
      models.py          # Pydantic output models
    tools/
      search.py          # search_businesses
      business.py        # find_by_phone, match, get_business
      reviews.py         # get_business_reviews
    resources/
      business.py        # yelp://business/{id}
  tests/
    conftest.py
    test_client.py
    test_tools.py
    test_models.py
  Dockerfile
  pyproject.toml
  .env.example

Running tests

uv run pytest -v

Reviews

No reviews yet

Sign in to write a review