Baidu Baike MCP
免登入的百度百科MCP,由Nishant Dilip Sharma開發。工具:baike_search、get_baike_entry。無需API金鑰。
文件
Baidu Baike MCP (百度百科)
Baidu Baike MCP by Nishant Dilip Sharma (NishantDilipSharma/baidu-baike) — login-free Chinese encyclopedia search & structured entries for any MCP app.
Unofficial community project. Not affiliated with, endorsed by, or operated by Baidu, Inc. Covers Baidu Baike (百科 encyclopedia) only — not Baidu web search.
Generic Model Context Protocol (MCP) server by Nishant Dilip Sharma for searching and reading Baidu Baike.
One server for any MCP-compatible app — Claude Desktop, Claude Code, Cursor, Codex, ChatGPT MCP clients, custom agents, and more.
- No login
- No API key
- Stdio MCP
Capabilities
| Tool | What it does |
|---|---|
baike_search | Search lemmas; titles, lemma IDs, blurbs, URLs |
get_baike_entry | Structured entry (summary, infobox, catalog, body) by lemma, ID, or Baike URL |
Fallbacks when cloud IPs hit Baidu WAF: Baike desktop → Baidu OpenAPI → Chinese Wikipedia (zh.wikipedia.org).
Chinese text is returned UTF-8 verbatim.
Author
Nishant Dilip Sharma · GitHub: NishantDilipSharma
Install from PyPI
pip install baidu-baike-mcp
# or
uvx --from baidu-baike-mcp baidu-baike-mcp
Then point your MCP client at the baidu-baike-mcp console script (or python -m baidu_baike_mcp).
1. Install the server (once)
git clone https://github.com/NishantDilipSharma/baidu-baike.git
cd baidu-baike/server
uv sync
Requirements: uv (recommended) or Python 3.12+.
Keep the absolute path to …/baidu-baike/server handy — every app below needs it.
2. How to add it to your app
All apps run the same stdio command. Only the config file / UI differs.
Shared MCP block (copy this)
Replace /absolute/path/to/baidu-baike/server with your real path:
"baidu-baike": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/baidu-baike/server",
"python",
"-m",
"baidu_baike_mcp"
],
"env": {
"PYTHONIOENCODING": "utf-8",
"PYTHONUTF8": "1"
}
}
Full file example: mcp.stdio.example.json.
Claude Desktop
- Open Claude Desktop → Settings → Developer → Edit Config
- Open
claude_desktop_config.json - Under
mcpServers, paste the shared block above (add commas as needed) - Save and fully quit/reopen Claude Desktop
- Confirm
baidu-baiketools appear in the MCP tools list
Claude Code
- Open Claude Code MCP settings (or edit its MCP config JSON)
- Add the same
baidu-baikeserver block undermcpServers - Restart Claude Code / reload MCP servers
- Run a prompt that needs Baike lookup to verify
baike_search/get_baike_entry
Cursor
- Open Cursor Settings → MCP (or edit your MCP config JSON)
- Add the same
baidu-baikestdio server block - Save and reload MCP servers
- Optional: this repo also ships plugin metadata (
.cursor-plugin/,plugin.json) for plugin loaders — still the same MCP underneath
Codex / ChatGPT (MCP-compatible hosts)
- Open the host’s custom MCP / tools / connectors settings
- Choose add stdio MCP server (wording varies)
- Command:
uv - Args:
run--directory/absolute/path/to/baidu-baike/serverpython-mbaidu_baike_mcp - Env:
PYTHONIOENCODING=utf-8,PYTHONUTF8=1 - Save and refresh tools
Other MCP apps / custom agents
If the app accepts an MCP JSON config, merge:
{
"mcpServers": {
"baidu-baike": { "...shared block..." }
}
}
If it only has UI fields, map:
| Field | Value |
|---|---|
| Command | uv |
| Arguments | run --directory /absolute/path/to/baidu-baike/server python -m baidu_baike_mcp |
| Transport | stdio |
Docker (any host that can run a container over stdio)
cd server
docker build -t baidu-baike-mcp .
docker run -i --rm baidu-baike-mcp
In the app config, set command/args to that docker run -i --rm baidu-baike-mcp invocation instead of uv.
Cloud/proxy notes: server/AGENT_SETUP.md.
3. Suggested agent workflow
- Call
baike_searchto disambiguate multi-sense titles - Call
get_baike_entrywith the chosen lemma (andlemma_idwhen available) - Quote Chinese content verbatim; keep fallback source attribution if present
License
MIT © Nishant Dilip Sharma