Crossref Mcp

io.github.jtl-neo由 GitHub 账号 jtl-neo 发布v0.1.0更新于 Oct 24, 2026

MCP server wrapping the Crossref REST API for scholarly metadata.

概览

AI 生成的概览

一个本地 MCP 服务器,封装公开的 Crossref REST API,让助手查询作品、期刊、资助方和许可等学术元数据。

可以做什么
检索和获取学术作品,包括按 DOI 查询、参考文献和注册机构质量信息,支持查询、过滤、排序、字段选择以及游标深分页。搜索并读取成员、期刊和资助方,并列出各自关联的作品。列出并查询资源类型、许可和 DOI 前缀。默认返回精简字段,也可请求完整的 Crossref 原始 JSON,另有基础 ping 检查。
适用场景
当助手需要来自 Crossref 的实时书目或引用元数据时适用,例如按作者或标题查找论文、核对 DOI、列出某期刊的作品,或了解资助方与许可信息,而无需自行编写 API 代码。
运行要求
以 PyPI 包(uvx crossref-mcp)或 Docker 容器在本地通过 stdio 运行,也支持 HTTP 传输。需要访问 Crossref API 的网络连接。建议设置 CROSSREF_MAILTO 以加入 Crossref 的 polite pool;CROSSREF_PLUS_TOKEN 和 MCP_API_KEY 为可选。Redis 和 TLS 代理为可选项。
安装前请注意
所有工具都是只读查询,但查询内容和结果会发送到公开的 Crossref API,因此不要在搜索词中包含机密信息。CROSSREF_PLUS_TOKEN 和 MCP_API_KEY 属于密钥,应避免写入共享配置。若通过 HTTP 对外暴露,请设置 MCP_API_KEY 并置于 TLS 之后,因为默认的内存限流不适合承载大量公开流量。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Crossref Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

crossref-mcp

[CI] [License: MIT] [Docker]

English | 中文

An MCP server wrapping the Crossref REST API, exposing scholarly-metadata lookups (works, members, journals, funders, types, licenses, prefixes) as tools an LLM client can call.

Not affiliated with or endorsed by Crossref. Data is served live from the public Crossref API. Set CROSSREF_MAILTO to join Crossref's polite pool.

Features

  • All major Crossref resource endpoints as 18 read-only tools.
  • Dual transport: stdio (local) and Streamable HTTP (container).
  • Polite pool (User-Agent + mailto), optional Crossref Plus token.
  • Token-bucket rate limiting (auto-tuned from X-Rate-Limit-* headers) with exponential backoff honoring Retry-After.
  • Cursor deep paging, field select, raw vs simplified output.
  • Optional X-API-Key HTTP auth (/health exempt), /health endpoint.
  • Optional Redis response cache + cross-replica rate limiting.
  • Optional Caddy TLS reverse proxy for public deployment.

Quick start (local, stdio)

bash
uv syncexport CROSSREF_MAILTO="[email protected]"   # recommended (polite pool)uv run crossref-mcp                         # starts a stdio MCP server

Inspect with the MCP Inspector: uv run mcp dev src/crossref_mcp/server.py.

Configuration

Env varRequiredDefaultDescription
CROSSREF_MAILTOrecommended—Email for Crossref's polite pool.
CROSSREF_PLUS_TOKENno—Crossref Plus API token (sent as a header).
CROSSREF_BASE_URLnohttps://api.crossref.orgAPI base URL.
CROSSREF_TIMEOUTno30Per-request timeout (seconds).
MCP_TRANSPORTnostdiostdio or http.
MCP_API_KEYno—If set, HTTP requests need a matching X-API-Key header (/health exempt).
LOG_LEVELnoINFOLog level (logs go to stderr).
REDIS_URLno—Enable Redis cache + shared rate limiting (optional).
CACHE_TTLno86400Cache TTL in seconds.
RATELIMIT_BACKENDnoin-memoryin-memory or redis.

Tools

Works — search_works, get_work (by DOI), get_work_references (capped at 50), get_work_quality (registration agency). Members / Journals / Funders — search_members · get_member · get_member_works; search_journals · get_journal (ISSN) · get_journal_works; search_funders · get_funder · get_funder_works. Types / Licenses / Prefixes — list_types · get_type; list_licenses; get_prefix. Plus ping.

Shared parameters. Search/list tools take query (and query_bibliographic / query_author / query_title on works), filter (Crossref key:value,… syntax), sort + order, rows (≤1000) + offset, and select. Deep paging: set cursor="*" then reuse the returned next_cursor. All tools return simplified fields by default; pass raw=true for the full Crossref JSON.

Connecting an MCP client

stdio (Claude Desktop / Cursor) — claude_desktop_config.json:

json
{  "mcpServers": {    "crossref": {      "command": "uvx",      "args": ["crossref-mcp"],      "env": { "CROSSREF_MAILTO": "[email protected]" }    }  }}

Or run the container over stdio: "command": "docker", "args": ["run", "-i", "--rm", "-e", "CROSSREF_MAILTO", "heyinnaneo/crossref-mcp"].

Streamable HTTP — once the container is up, point an HTTP-capable client at http://localhost:8000/mcp. If MCP_API_KEY is set, send it as X-API-Key.

Use as a skill (no server)

Prefer not to run a server? skill.md is a self-contained skill that teaches an agent to call the Crossref REST API directly — it only needs an HTTP/fetch capability (no install, no key, no container). Trade-off: the agent issues raw HTTP and parses Crossref JSON itself, without the MCP server's polite-pool throttling, field simplification, or structured errors.

Claude Code (Agent Skill):

bash
mkdir -p ~/.claude/skills/crossref-apicurl -fsSL https://raw.githubusercontent.com/jtl-neo/crossref-api-MCP/main/skill.md \  -o ~/.claude/skills/crossref-api/SKILL.md

(Project-scoped instead: place it at .claude/skills/crossref-api/SKILL.md in your repo.)

Other agents (Cursor, Claude Projects, custom): paste the contents of skill.md into your system prompt / project knowledge / rules file.

Docker / HTTP deployment

bash
cp .env.example .env          # set CROSSREF_MAILTOdocker compose up -d          # pulls heyinnaneo/crossref-mcp, HTTP on :8000curl http://localhost:8000/health

Serves Streamable HTTP at /mcp and /health (compose health check). Set MCP_API_KEY to require X-API-Key on /mcp. To build locally, uncomment build: . in docker-compose.yml.

Public deployment (TLS / reverse proxy) — optional

Put it behind the bundled Caddy proxy (Caddyfile + docker-compose.proxy.yml): TLS termination (auto Let's Encrypt), HTTP→HTTPS, SSE streaming, backend not published on the host.

bash
cp .env.example .env   # add DOMAIN=, ACME_EMAIL=, MCP_API_KEY=docker compose -f docker-compose.proxy.yml up -dcurl https://your-domain/health

Defense in depth: proxy edge (optional IP allowlist / Basic auth) + MCP_API_KEY app layer; both leave /health open. Needs a domain with DNS pointing at the host and ports 80/443 reachable. Caddy rate limiting needs the caddy-ratelimit plugin (custom build).

Redis cache + cross-replica rate limiting — optional

Set REDIS_URL for a response cache (cache-aside on the raw envelope; mailto/ secrets excluded from keys) and, with RATELIMIT_BACKEND=redis, a shared token bucket so replicas stay within Crossref's polite-pool rate.

bash
docker compose -f docker-compose.redis.yml up -dcurl http://localhost:8000/health   # cache_enabled + ratelimit_backend + redis: up

Redis failures degrade gracefully (no cache, in-memory limiting); /health stays 200 with redis: down.

CI / publishing

.github/workflows/ci.yml: test (ruff + format + pytest with coverage on every push/PR), security (Trivy fs scan), build-push (multi-arch image to heyinnaneo/crossref-mcp on main / v* tags), and on tags publish-pypi (OIDC Trusted Publisher) + publish-registry (MCP registry).

Repository secrets (Settings → Secrets and variables → Actions): DOCKERHUB_USERNAME = heyinnaneo, DOCKERHUB_TOKEN = a Docker Hub Access Token (Read/Write). Tag a release (git tag v0.1.0 && git push origin v0.1.0); the tag must match pyproject.toml.

Install from the MCP registry

Published as io.github.jtl-neo/crossref-mcp (see server.json), with a PyPI package (uvx crossref-mcp) and an OCI image. Publishing is automated on version tags (publish-pypi + publish-registry); requires a public repo and a configured PyPI Trusted Publisher.

Security & trust

  • Read-only. Every tool is a lookup, annotated readOnlyHint.
  • Rate limiting. Single-process in-memory by default — don't run as a public proxy for heavy traffic; for replicas use RATELIMIT_BACKEND=redis.
  • Polite pool. Use your own CROSSREF_MAILTO.
  • Public HTTP. Set MCP_API_KEY and front with TLS.
  • No bundled secrets. .env is excluded from image and git.

License

MIT. Bibliographic data comes from the public Crossref REST API; not affiliated with Crossref.


中文

English | 中文

把 Crossref REST API 封裝成 MCP server,將學術文獻 metadata 查詢(works、members、journals、funders、types、 licenses、prefixes)包成 LLM client 可呼叫的工具。

非 Crossref 官方、未經其背書。資料即時取自公開的 Crossref API。請設定 CROSSREF_MAILTO 以加入 Crossref 的 polite pool。

特色

  • 主要 Crossref 資源端點,共 18 個唯讀工具。
  • 雙傳輸:stdio(本機)與 Streamable HTTP(容器)。
  • Polite pool(User-Agent + mailto)、可選 Crossref Plus token。
  • Token-bucket 速率控制(依 X-Rate-Limit-* header 自動調整),429 指數退避並 尊重 Retry-After。
  • cursor 深分頁、欄位 select、raw 與精簡輸出切換。
  • 可選 X-API-Key HTTP 認證(/health 豁免)、/health 端點。
  • 可選 Redis 回應快取 + 跨副本速率控制。
  • 可選 Caddy TLS 反向代理,供公開部署。

快速開始(本機 stdio)

bash
uv syncexport CROSSREF_MAILTO="[email protected]"   # 建議(polite pool)uv run crossref-mcp                         # 啟動 stdio MCP server

用 MCP Inspector 檢視:uv run mcp dev src/crossref_mcp/server.py。

設定

環境變數必填預設說明
CROSSREF_MAILTO建議—Crossref polite pool 用的 email。
CROSSREF_PLUS_TOKEN否—Crossref Plus API token(以 header 送出)。
CROSSREF_BASE_URL否https://api.crossref.orgAPI base URL。
CROSSREF_TIMEOUT否30每請求逾時(秒)。
MCP_TRANSPORT否stdiostdio 或 http。
MCP_API_KEY否—設了則 HTTP 請求需帶相符的 X-API-Key header(/health 豁免)。
LOG_LEVEL否INFO日誌層級(日誌走 stderr)。
REDIS_URL否—啟用 Redis 快取 + 共享速率控制(選用)。
CACHE_TTL否86400快取 TTL(秒)。
RATELIMIT_BACKEND否in-memoryin-memory 或 redis。

工具

Works — search_works、get_work(依 DOI)、get_work_references(上限 50)、get_work_quality(註冊機構)。 Members / Journals / Funders — search_members/get_member/ get_member_works;search_journals/get_journal(ISSN)/get_journal_works; search_funders/get_funder/get_funder_works。 Types / Licenses / Prefixes — list_types/get_type;list_licenses; get_prefix。另有 ping。

共用參數。 搜尋/列表工具接受 query(works 另有 query_bibliographic/ query_author/query_title)、filter(Crossref key:value,… 語法)、sort

  • order、rows(≤1000)+ offset、select。深分頁:設 cursor="*",再把回傳 的 next_cursor 傳回續抓。所有工具預設回精簡欄位;傳 raw=true 取完整 Crossref JSON。

連接 MCP client

stdio(Claude Desktop / Cursor) — claude_desktop_config.json:

json
{  "mcpServers": {    "crossref": {      "command": "uvx",      "args": ["crossref-mcp"],      "env": { "CROSSREF_MAILTO": "[email protected]" }    }  }}

或以容器跑 stdio:"command": "docker"、"args": ["run", "-i", "--rm", "-e", "CROSSREF_MAILTO", "heyinnaneo/crossref-mcp"]。

Streamable HTTP — 容器啟動後,將支援 HTTP 的 client 指向 http://localhost:8000/mcp。若設了 MCP_API_KEY,以 X-API-Key header 帶上。

當作 skill 使用(免 server)

不想架 server?skill.md 是自包含 skill,教 agent 直接呼叫 Crossref REST API — 只需 agent 有 HTTP/fetch 能力(免安裝、免 key、免容器)。 取捨:agent 自己發 raw HTTP、自己解析 Crossref JSON,沒有 MCP server 的 polite-pool 限速、欄位精簡、結構化錯誤。

Claude Code(Agent Skill):

bash
mkdir -p ~/.claude/skills/crossref-apicurl -fsSL https://raw.githubusercontent.com/jtl-neo/crossref-api-MCP/main/skill.md \  -o ~/.claude/skills/crossref-api/SKILL.md

(專案層級:放 repo 內 .claude/skills/crossref-api/SKILL.md。)

其他 agent(Cursor / Claude Projects / 自製): 把 skill.md 內容貼進 system prompt / project knowledge / rules 檔。

Docker / HTTP 部署

bash
cp .env.example .env          # 設定 CROSSREF_MAILTOdocker compose up -d          # 拉 heyinnaneo/crossref-mcp,HTTP 在 :8000curl http://localhost:8000/health

於 /mcp 提供 Streamable HTTP,/health 供 compose 健康檢查。設 MCP_API_KEY 可要求 /mcp 帶 X-API-Key。要本地 build,取消 docker-compose.yml 內 build: . 註解。

公開部署(TLS / 反向代理)— 選用

放在內附的 Caddy proxy 後(Caddyfile + docker-compose.proxy.yml):TLS 終結 (自動 Let's Encrypt)、HTTP→HTTPS、SSE 串流、後端不對 host 公開。

bash
cp .env.example .env   # 加上 DOMAIN=、ACME_EMAIL=、MCP_API_KEY=docker compose -f docker-compose.proxy.yml up -dcurl https://your-domain/health

縱深防禦:proxy 邊界(可選 IP allowlist / Basic auth)+ MCP_API_KEY 應用層; 兩者皆留 /health 開放。需網域 DNS 指向主機、80/443 可達。Caddy 限流需 caddy-ratelimit plugin(自 build)。

Redis 快取 + 跨副本速率控制 — 選用

設 REDIS_URL 啟用回應快取(cache-aside 存原始 envelope;key 排除 mailto/ 密鑰),並以 RATELIMIT_BACKEND=redis 啟用共享 token bucket,讓多副本維持在 Crossref polite-pool 速率內。

bash
docker compose -f docker-compose.redis.yml up -dcurl http://localhost:8000/health   # cache_enabled + ratelimit_backend + redis: up

Redis 故障會優雅降級(不快取、改 in-memory 限速);/health 仍回 200 並標 redis: down。

CI / 發佈

.github/workflows/ci.yml:test(每次 push/PR 跑 ruff + format + pytest 含 覆蓋率)、security(Trivy fs 掃描)、build-push(main/v* tag 時 push multi-arch image 到 heyinnaneo/crossref-mcp),打 tag 時另跑 publish-pypi (OIDC Trusted Publisher)+ publish-registry(MCP registry)。

Repository secrets(Settings → Secrets and variables → Actions): DOCKERHUB_USERNAME = heyinnaneo、DOCKERHUB_TOKEN = Docker Hub Access Token (Read/Write)。打 tag 發版(git tag v0.1.0 && git push origin v0.1.0);tag 須 與 pyproject.toml 版本一致。

從 MCP registry 安裝

以 io.github.jtl-neo/crossref-mcp 發佈(見 server.json),含 PyPI 套件(uvx crossref-mcp)與 OCI image。發佈於版本 tag 時自動進行 (publish-pypi + publish-registry);需公開 repo 與已設定的 PyPI Trusted Publisher。

安全與信任

  • 唯讀。 每個工具都是查詢,標註 readOnlyHint。
  • 速率控制。 預設單 process in-memory — 勿當公開代理承載大流量;多副本請用 RATELIMIT_BACKEND=redis。
  • Polite pool。 用你自己的 CROSSREF_MAILTO。
  • 公開 HTTP。 設 MCP_API_KEY 並前置 TLS。
  • 不內含密鑰。 .env 不進 image、不進 git。

授權

MIT。文獻資料來自公開的 Crossref REST API;與 Crossref 無隸屬關係。

来源:README.md,提交 1cfea57

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分