Dianping MCP Server

Dianping MCP Server

Enables searching and retrieving details of merchants on Dianping (Chinese review platform) using a locally logged-in browser session.

Category
Visit Server

README

Dianping MCP Server

这是一个通过本地浏览器登录会话搜索大众点评内容的 MCP server。大众点评的桌面端和移动端搜索会对匿名请求触发登录/安全验证,因此本项目不使用未经授权的接口,也不尝试绕过验证码或反爬机制;服务使用 Playwright 驱动本机 Chrome,并复用独立的持久化 profile。

快速开始

要求 Node.js 20+,并安装 Chrome、Edge 或 Chromium:

npm install
npm run login

登录命令会打开浏览器。请完成大众点评登录和安全验证,然后回到终端按 Ctrl+C 退出。登录资料默认保存到 ~/.dianping-mcp/browser-profile。之后启动 MCP server:

npm run build
npm start

MCP 客户端使用 stdio 连接,提供三个工具:

  • search_places:按城市、关键词、页码搜索商户,返回名称、评分、评价数、人均、地址和店铺 URL。
  • get_place_details:按店铺 ID 或搜索结果里的 URL 获取店铺信息及精选评论。
  • check_session:检查浏览器是否可用、是否需要登录或安全验证。

MCP 客户端配置

把下面的命令配置到支持 stdio MCP 的客户端,路径替换成仓库的绝对路径:

{
  "mcpServers": {
    "dianping": {
      "command": "npm",
      "args": ["--prefix", "/绝对路径/dp-mcp", "start"],
      "env": {
        "DP_CITY": "上海"
      }
    }
  }
}

也可以直接使用构建后的 dist/index.js

{
  "command": "node",
  "args": ["/绝对路径/dp-mcp/dist/index.js"],
  "env": { "DP_CITY": "上海" }
}

配置项

变量 默认值 作用
DP_PROFILE_DIR ~/.dianping-mcp/browser-profile 浏览器登录资料目录
DP_BROWSER_EXECUTABLE_PATH 自动探测 Chrome/Edge/Chromium 可执行文件
DP_CITY 上海 search_places 未传城市时的默认城市
DP_HEADLESS true MCP 搜索是否无头运行;登录请使用 npm run login
DP_MIN_INTERVAL_MS 1500 两次页面请求的最小间隔
DP_CACHE_TTL_MS 300000 搜索和详情的内存缓存时间
DP_NAVIGATION_TIMEOUT_MS 25000 页面导航和选择器超时

当前内置常用城市包括上海、北京、杭州、广州、南京、苏州、深圳、成都、重庆、天津、宁波、扬州、无锡、福州、厦门、武汉、西安、沈阳、大连、长沙、青岛和济南;其他城市可传大众点评城市 ID。

开发与验证

npm test
npm run check
npm run build

页面结构或安全策略变化时,服务会返回明确的解析/验证错误。请降低调用频率,并遵守大众点评的服务条款、robots 规则和适用法律。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured