Skip to main content
Glama
qianwj

Dianping MCP Server

by qianwj

Dianping MCP Server

This is an MCP server that searches Dianping content through a local browser login session. Both the desktop and mobile search endpoints of Dianping trigger login/security verification for anonymous requests, so this project does not use unauthorized interfaces, nor does it attempt to bypass CAPTCHAs or anti-scraping mechanisms; the service uses Playwright to drive the local Chrome browser and reuses an independent persistent profile.

Quick Start

Requires Node.js 20+ and Chrome, Edge, or Chromium installed:

npm install
npm run login

The login command will open the browser. Please complete the Dianping login and security verification, then return to the terminal and press Ctrl+C to exit. The login data is saved by default to ~/.dianping-mcp/browser-profile. After that, start the MCP server:

npm run build
npm start

The MCP client connects via stdio and provides three tools:

  • search_places: Search for merchants by city, keyword, and page number, returning name, rating, review count, average spending, address, and shop URL.

  • get_place_details: Get shop details and featured reviews by shop ID or the URL from search results.

  • check_session: Check if the browser is available, and whether login or security verification is needed.

Related MCP server: dots-mcp

MCP Client Configuration

Configure the following command in a client that supports stdio MCP, replacing the path with the absolute path of the repository:

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

Alternatively, you can directly use the built dist/index.js:

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

Configuration Options

Variable

Default

Description

DP_PROFILE_DIR

~/.dianping-mcp/browser-profile

Browser login profile directory

DP_BROWSER_EXECUTABLE_PATH

Auto-detected

Chrome/Edge/Chromium executable path

DP_CITY

Shanghai

Default city when search_places is not passed a city

DP_HEADLESS

true

Whether MCP search runs headless; for login please use npm run login

DP_MIN_INTERVAL_MS

1500

Minimum interval between two page requests

DP_CACHE_TTL_MS

300000

In-memory cache TTL for search and details

DP_NAVIGATION_TIMEOUT_MS

25000

Page navigation and selector timeout

Currently built-in common cities include Shanghai, Beijing, Hangzhou, Guangzhou, Nanjing, Suzhou, Shenzhen, Chengdu, Chongqing, Tianjin, Ningbo, Yangzhou, Wuxi, Fuzhou, Xiamen, Wuhan, Xi'an, Shenyang, Dalian, Changsha, Qingdao, and Jinan; other cities can be passed via Dianping city ID.

Development and Verification

npm test
npm run check
npm run build

When page structure or security policies change, the service will return clear parsing/verification errors. Please reduce call frequency and comply with Dianping's Terms of Service, robots rules, and applicable laws.

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

  • Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.

  • Stealth scraping & search. Bypasses Cloudflare, DataDome & LinkedIn via Cyborg HITL approach.

  • Live Google Maps business search, review, and photo data for AI agents over MCP.

View all MCP Connectors

Latest Blog Posts

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/qianwj/dp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server