yelp-mcp-sdk
yelp-mcp-sdk
基于 官方 MCP Python SDK 构建的 Yelp Fusion MCP 服务器。
功能上与 yelp-mcp-min (FastMCP) 完全相同,但直接使用了底层的 Server 类 —— 没有框架抽象。
先决条件
Python 3.11+
uv 0.11+
Docker (可选)
Yelp Fusion API 密钥 — https://www.yelp.com/developers/v3/manage_app
Related MCP server: Yelp Fusion MCP Server
安装
uv sync
cp .env.example .env
# Edit .env and set YELP_API_KEY运行
# 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环境变量
变量 | 必需 | 默认值 | 描述 |
| 是 | — | Yelp Fusion API 持有者令牌 |
| 否 |
| API 基础 URL |
| 否 |
| 请求超时时间(秒) |
| 否 |
| 429/5xx 错误时的最大重试次数 |
| 否 |
| 最小退避等待时间(秒) |
| 否 |
| 最大退避等待时间(秒) |
| 否 |
| structlog 日志级别 |
| 否 |
| 输出 JSON 格式日志 |
工具
工具 | Yelp 端点 | 描述 |
|
| 支持分页的全文 + 地理位置搜索 |
|
| 通过 E.164 电话号码查找商家 |
|
| 将结构化的名称+地址与 Yelp 列表进行匹配 |
|
| 通过 Yelp ID 或别名获取完整的商家资料 |
|
| 支持分页的客户评论 |
资源
yelp://business/{id} — 完整的 Yelp 商家资料,格式为 application/json。
通过 list_resource_templates 声明;通过 read_resource 获取。
项目结构
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运行测试
uv run pytest -v与 yelp-mcp-min (FastMCP) 的比较
方面 | yelp-mcp-min (FastMCP) | yelp-mcp-sdk (官方 SDK) |
工具注册 |
|
|
输入模式 | 从函数签名自动生成 | 显式使用 |
输出类型 | 直接返回 Pydantic 模型 | 带有 JSON 字符串的 |
资源 |
|
|
依赖注入 | 无(通过闭包捕获) |
|
传输 |
|
|
服务器代码行数 | ~350 | ~450 |
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables conversational interactions with Yelp's business data through an MCP server, allowing natural language queries about local businesses, multi-turn conversations, and direct business inquiries powered by Yelp Fusion AI.126Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides access to Yelp's business database for searching local businesses, retrieving detailed ratings and reviews, and performing market research through business counts. It enables users to look up businesses by location, category, or phone number using the Yelp Fusion API.1
- FlicenseAqualityDmaintenanceMinimal MCP server for the Yelp Fusion API v3, enabling business search, phone lookup, match, details, and reviews via FastMCP.5
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools for Google Maps services including directions, geocoding, distance matrix, and places search.14Apache 2.0
Related MCP Connectors
Live Google Maps business search, review, and photo data for AI agents over MCP.
Recreation.gov MCP — wraps the Recreation Information Database (RIDB) API v1
Recipes MCP — wraps TheMealDB API (free tier, no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/miqui/yelp-mcp-sdk'
If you have feedback or need assistance with the MCP directory API, please join our Discord server