Skip to main content

CNKI (中国知网) MCP Server — 通过 Model Context Protocol 检索中文学术论文

Project description

CNKI MCP Server

PyPI version License: MIT

CNKI (中国知网) MCP Server — 通过 Model Context Protocol (MCP) 为 AI Agent 提供中文学术论文检索能力。

功能

工具 说明 需要浏览器
search_cnki 搜索 CNKI 论文,支持多页、多种搜索类型和排序
get_paper_detail 获取论文详情(标题、摘要、作者、关键词、DOI 等 17 字段)
find_best_match 快速匹配论文标题,验证引用信息
format_citation 引文格式化(GB/T 7714, APA, MLA, Chicago, Vancouver)
browse_journals 期刊浏览(学科分类、期刊搜索、最新文章)
export_papers 批量导出(CSV, JSON, BibTeX, RIS)

搜索类型

支持 15 种搜索类型:主题、关键词、篇名、作者、作者单位、全文、DOI、基金、摘要等(中英文别名均可)。

排序方式

相关度 / 发表时间 / 被引 / 下载 / 综合(支持英文别名:relevance, date, cited, download, composite)。

安装

pip install cnki-mcp-server
python -m playwright install chromium

注意: Playwright Chromium 约 300MB,首次安装需要下载,后续无需重复安装。

使用

Claude Code

.claude/settings.json 或 Claude Code 的 MCP 配置中添加:

{
  "mcpServers": {
    "cnki": {
      "command": "python",
      "args": ["-m", "cnki_mcp"]
    }
  }
}

命令行直接使用

python -m cnki_mcp

要求

  • Python >= 3.10
  • Playwright Chromium(首次使用时自动安装)

引文格式

风格 标准 适用场景
gbt7714 GB/T 7714-2015 中文学位论文、中文期刊
apa APA 7th Edition 心理学、教育学、社会科学
mla MLA 9th Edition 语言文学、人文学科
chicago Chicago Notes & Bibliography 历史学、艺术学
vancouver Vancouver/ICMJE 生物医学、临床医学

导出格式

格式 适用软件
JSON 编程处理、数据分析
CSV Excel、Google Sheets
BibTeX LaTeX、Zotero、JabRef
RIS EndNote、Mendeley、Zotero

技术实现

  • 引擎: Playwright(自带签名 Chromium,消除 macOS codesign 问题,跨平台零配置)
  • MCP 框架: FastMCP
  • 并发: 原生 async/await
  • 反检测: 随机 User-Agent、模拟人类输入、navigator.webdriver 覆写
  • 会话复用: 共享 BrowserContext,Cookie 互通,避免 CNKI 验证码

开发

git clone https://github.com/xxxxchaos/cnki-mcp-server.git
cd cnki-mcp-server
pip install -e ".[dev]"
python -m playwright install chromium
pytest tests/ -v

许可

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cnki_mcp_server-0.2.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnki_mcp_server-0.2.0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file cnki_mcp_server-0.2.0.tar.gz.

File metadata

  • Download URL: cnki_mcp_server-0.2.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cnki_mcp_server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c693f3f9437a09eb5cd32e9cc200623fd79b083835cf232f70ebb02d7fd73faf
MD5 12dfd0f2d004fb1bed07250a2299233e
BLAKE2b-256 3e64565f1cb457a8a19366c27515ce50354c8c280a3d84c6c1beeba17082df17

See more details on using hashes here.

Provenance

The following attestation bundles were made for cnki_mcp_server-0.2.0.tar.gz:

Publisher: publish.yml on xxxxchaos/cnki-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cnki_mcp_server-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cnki_mcp_server-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cnki_mcp_server-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56b2fcbebfcb498bfdefced1065b93f7992a482394f56db8705d504b3534c83e
MD5 1c32b6d61a9c1ac1979345052a297cf8
BLAKE2b-256 71d91a713468226ea284ab3d22e2d48421b1349547f697be017a0c305219e1f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cnki_mcp_server-0.2.0-py3-none-any.whl:

Publisher: publish.yml on xxxxchaos/cnki-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page