Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Transports: stdio vs HTTP
  • State of MCP (stats)
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI → MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE ↗ (opens in a new tab)
  • llms.txt ↗ (opens in a new tab)
  • Catalog JSON ↗ (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub ↗ (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. 🔎 Search & Data Extraction
  3. Shanghai Library Open Data MCP
Shanghai Library Open Data MCP logo
Health: ActiveRecent health check succeeded.Last checked 9/22/2026, 3:17:08 PM

Shanghai Library Open Data MCP

User RatingsBe the first to rate and review this MCP server! Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time — check back soon.
View Repository4 GitHub StarsTotal stargazers on GitHub for the source repository (4 stars).Visit Website

上海图书馆开放数据检索 MCP:纪年/家谱/建筑/红色事件/97 个 webapi + 搜韵诗词,支持 stdio 与 HTTP。

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON ▾

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "shanghai-library-open-data-mcp": {
      "command": "uvx",
      "args": [
        "shanghai-library-open-data-mcp"
      ]
    }
  }
}

💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing Alternatives🔎 More in Search & Data Extraction

Documentation Overview

上海图书馆开放数据 MCP

smithery badge

把上海图书馆开放数据平台的 99 个 webapi 接口 + 搜韵诗词库(199 万首,免 token)封装成 12 个 MCP 工具,可接入 WorkBuddy、Cursor、Claude Desktop 等任意 MCP 客户端。

这是啥? 一个把「上海图书馆开放数据」接进 AI 助手的桥。装好之后,你直接在 AI 工具里说"查武康路的历史建筑""找首写月亮的诗",AI 就会自动去上海图书馆的数据里查,再把结果讲给你听——不用懂接口、不用写代码。

你要准备什么? 两样:① 去上海图书馆开放数据平台免费注册,拿一把"钥匙"(APIKey);② 按下面的「快速开始」把项目接进你常用的 AI 编辑器(Cursor、Claude Desktop、VS Code、WorkBuddy 等都能用)。

为什么安全? 项目代码里不含任何钥匙,钥匙只在你自己的电脑 / 配置里,不会被别人看到。


数据源与致谢

  • 上海图书馆开放数据平台(官方):https://opendata.library.sh.cn/opendata/ 衷心感谢上海图书馆官方开放数据平台提供权威、丰富且持续维护的历史文献与文脉数据接口。本项目的全部核心数据能力(99 个 webapi)均建立在上海图书馆开放数据之上,若无官方的开放与授权,本项目无从实现。
  • 搜韵诗词:https://api.sou-yun.cn/open (199 万首诗词,免 token)
  • 本仓库接口版权归各数据方所有,使用请遵守各平台开放数据的使用条款;调用方须使用自己在平台注册的 APIKey,本仓库不内置、不收集任何密钥。
  • 本项目已发布至 PyPI、MCP 官方 Registry(io.github.FreyaBit/shanghai-library-open-data-mcp)、Smithery、ModelScope 与 GitHub,便于各 MCP 客户端一键接入。

特性

  • 🧩 12 个 MCP 工具:覆盖家谱 / 古籍 / 碑帖 / 武康路 / 书目 / 地名志 / 红色事件 / 纪年表 / 电影 / 舆图 / 手迹 / 人名库 / 戏单等 99 个官方接口 + 搜韵诗词
  • 🔑 密钥由使用者提供:通过环境变量 SLC_API_KEY 或工具参数 key 传入,代码不内置任何密钥
  • 🐍 零第三方依赖:仅用 Python 标准库(urllib + json),无需 pip install
  • 🎵 AIGC 歌词素材:souyun_poem 免 token 检索 199 万首诗词(按作者/标题/诗句/朝代/体裁/韵部),souyun_rhyme / souyun_couplet 提供韵典和对仗词汇
  • 📚 RAG 骨架:rag_kb.py 纯标准库 TF-IDF 知识库,可离线灌入官方 ZIP 数据

工具总览

工具说明需要 Key
slc_endpoints列出全部 99 个接口(id/家族/路径/参数),发现能力❌
slc_api通用分发器:调用任意 webapi 接口✅
slc_era中国历史纪年表:朝代/年号 ↔ 公元年✅
slc_jiapu家谱谱目检索✅
slc_building武康路历史建筑检索✅
slc_red_event红色旅游/历史事件检索✅
slc_raw任意 data1 路径 GET 兜底调用✅
slc_datasets / slc_sparql数据集总览 / SPARQL 说明❌
souyun_poem搜韵诗词检索(199 万首,免 token)❌
souyun_rhyme韵典:查字所属韵部、典故、诗例❌
souyun_couplet对仗词汇❌

接口家族:近代城市文化(20)、古籍循证(15)、国漫革命文献(7)、武康路历史(7)、纪年表关联数据(5)、韬奋纪念馆(4)、书目数据(4)、家谱(4)、地名纪年(4)、竞赛PDF文献(3)、知识图谱人物(2)、文化总库机构(2)、舆图(2)、手迹(2)、红色旅游事件(2)、地名志(2)、纪年(2)、人名规范库(1)、机构名录(1)、戏单(2)、其他(8)。

快速开始

本地 stdio 接入

server.ts
# 1. 克隆仓库
git clone https://github.com/FreyaBit/OpenSH-mcp.git
cd OpenSH-mcp

# 2. 设置你的 APIKey(在上海图书馆开放数据平台获取)
export SLC_API_KEY='你的上图书APIKey'    # macOS/Linux
# $env:SLC_API_KEY='你的上图书APIKey'    # Windows PowerShell

# 3. 运行端到端自测
python3 tests/test_stdio.py

在你的 MCP 客户端里配置 stdio 服务:

config.json
{
  "mcpServers": {
    "上海图书馆开放数据": {
      "command": "python3",
      "args": ["/绝对路径/slc_mcp_server.py"],
      "env": { "SLC_API_KEY": "你的上图书APIKey" }
    }
  }
}

通过 PyPI / uvx 安装(推荐,跨客户端通用)

发布到 PyPI 后,任意支持 MCP 的客户端都能用一条命令拉起,无需克隆仓库:

bash
uvx shanghai-library-open-data-mcp              # 本地 stdio(默认)
uvx shanghai-library-open-data-mcp --transport http --port 8080      # Streamable HTTP 远程(进阶可选)

客户端配置只需:command: uvx, args: ["shanghai-library-open-data-mcp"]。

Streamable HTTP 传输(进阶,可选)

除 stdio 外,本服务原生支持 Streamable HTTP(slc_mcp_http.py,纯标准库实现):

  • POST /mcp 处理 JSON-RPC(initialize 时签发 Mcp-Session-Id,通知类返回 202)
  • GET /mcp 提供 SSE 流
  • 已开启 CORS,便于网页端 / 远程网络调用

适合网页版 AI、手机端,或多人共用同一服务;需自行把服务跑在可访问的地址上。个人在编辑器本地使用,stdio 已足够,无需此模式。

客户端配置示例

三种客户端本质都是同一段 mcpServers JSON,区别只在配置文件路径。下面的示例用 uvx 拉起(免克隆仓库);想用本地脚本,把 command/args 换成 ["python3","/绝对路径/slc_mcp_server.py"] 即可。

WorkBuddy(本机已配置过一份) 配置文件:~/.workbuddy/mcp.json。本机已存在一份指向本地脚本 + Key 的配置,只需在连接器管理界面对「上海图书馆开放数据」点击 信任 即可在本会话启用;也可替换成下面的 uvx 写法。

config.json
{
  "mcpServers": {
    "上海图书馆开放数据": {
      "command": "uvx",
      "args": ["shanghai-library-open-data-mcp"],
      "env": { "SLC_API_KEY": "你的上图书APIKey" }
    }
  }
}

Cursor 配置文件:项目根目录 .cursor/mcp.json 或全局 ~/.cursor/mcp.json(同一段 JSON)。

Claude Desktop / Claude Code

  • Claude Desktop:把上面的 mcpServers 合并进 %APPDATA%\Claude\claude_desktop_config.json(Windows)或 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)。
  • Claude Code 命令行:claude mcp add 上海图书馆开放数据 -- uvx shanghai-library-open-data-mcp

说明:12 个工具里 souyun_poem / souyun_rhyme / souyun_couplet / slc_endpoints 免 Key 开箱即用,其余 8 个需要 SLC_API_KEY。已发布到 PyPI、MCP 官方 Registry(io.github.FreyaBit/shanghai-library-open-data-mcp)、Smithery、ModelScope、GitHub,均可一键拉起。

APIKey 说明

  • 上海图书馆开放数据平台要求每个调用者使用自己的 APIKey(在平台注册后获取)。
  • 本仓库不包含任何 Key,也不记录、不收集你的 Key。
  • Key 读取优先级:工具参数 key > 环境变量 SLC_API_KEY。
  • 调用需要 Key 的工具时,把 Key 放在工具参数里:
config.json
{ "endpoint": "building_list", "params": { "freetext": "武康路" }, "key": "你的上图书APIKey" }
  • 免 Key 工具(souyun_poem / souyun_rhyme / souyun_couplet / slc_endpoints)开箱即用。
  • ⚠️ 请勿把你的 Key 配置到公开服务的环境变量里(等于公开给所有调用者)。

目录结构

Code
OpenSH-mcp/
├── README.md                 # 本文件
├── pyproject.toml            # PyPI 打包配置(uvx 入口)
├── slc_mcp_server.py         # MCP 服务主程序(stdio,纯标准库)
├── slc_mcp_http.py           # Streamable HTTP 传输层(纯标准库,进阶可选)
├── slc_endpoints.py          # 99 个 webapi 接口注册表(自动生成)
├── gen_endpoints.py          # 接口注册表生成器(从官方 API 文档解析)
├── souyun_poem.py            # 搜韵诗词/韵典/对仗采集(免 token)
├── rag_kb.py                 # RAG 知识库骨架(纯标准库 TF-IDF)
├── mcp.json.template         # MCP 客户端配置模板(不含 Key)
└── tests/                    # 测试(从环境变量读 Key,缺失会提示)
    ├── test_stdio.py         #   stdio 端到端(协议 + 真实调用)
    ├── test_live.py          #   handler 级实测(GET/POST/搜韵)
    └── test_mcp.py           #   协议冒烟测试

Read the full README →View source on GitHub →

Related MCP Servers

View all in Search & Data Extraction View all alternatives
  • Mdn Search logoMdn Search

    MDN Search MCP

    🔎 Search & Data Extraction1 views
    Compare vs Mdn Search →
  • Tavily MCP logoTavily MCP

    MCP server for advanced web search using Tavily

    🔎 Search & Data Extraction1 views
    Compare vs Tavily MCP →
  • Tinysearch logoTinysearch

    Self-hosted web research for MCP agents.

    🔎 Search & Data Extraction1 views
    Compare vs Tinysearch →
  • PyreCrawl logoPyreCrawl

    One tool for AI agents to scrape, crawl, extract, map, and search the web. Self-hosted, no API keys.

    🔎 Search & Data Extraction1 views
    Compare vs PyreCrawl →

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars
4
Stargazers on the source repository.
Last commit
1mo ago
Most recent push to the default branch.
Directory activity
2 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet — be the first to share how this listing worked for you.

Frequently Asked Questions about Shanghai Library Open Data MCP

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "shanghai-library-open-data-mcp": { "command": "uvx", "args": ["shanghai-library-open-data-mcp"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewShanghai Library Open Data MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/shanghai-library-open-data-mcp?style=directory)](https://allmcps.com/mcp/shanghai-library-open-data-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/shanghai-library-open-data-mcp"><img src="https://allmcps.com/api/badge/shanghai-library-open-data-mcp?style=directory" alt="Shanghai Library Open Data MCP on AllMCPs" /></a>

Technical Specs & Signals

Category🔎Search & Data Extraction
More technical detailsExpand ▾
TransportSTDIO
RuntimePython
Last updatedAug 9, 2026
5/5 checks healthy over the last 46d
Views2
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars4
GitHub Star CountTotal stargazers on GitHub representing community popularity (4 stars).
Last commit1mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Aug 9, 2026
39Quality signal: Fair · 39/100How this signal is calculated ▾
Server availabilityNot measured

Not scored for repo-hosted servers — we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools15/30
Adoption & activity4/15
Community engagement0/10

A guidance signal from public completeness & health data — not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · shanghai-library-open-data-mcp (PyPI)

★ FeaturedAllMCPs Server logo

AllMCPs Server

The official MCP server for AllMCPs.com - submit and manage tools directly from your AI. The open directory for MCP servers. Connect Claude, Cursor, Windsurf, and AI agents to databases, tools, files, and APIs. Explore 10,000+ servers. AllMCPs is the premier, open directory for discovering, evaluating, and installing Model Context Protocol (MCP) servers to equip AI agents and LLMs with real-world superpowers.

Explore Server →

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge — proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it — no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in 🔎 Search & Data Extraction →Best MCP servers for Web Search & Scraping →Alternatives to Shanghai Library Open Data MCP →Install in Claude DesktopInstall in CursorInstall in VS CodeSetup guides for all 13 MCP clients