cnki-mcp
An MCP server for reach CNKI.
免责声明:该项目仅为个人学习项目,且仅供学习参考。 该项目不隶属任何公司、机构,与中国知网(下简称为知网或CNKI)无任何所属关系。 该项目不应用于非法手段,包括但不限于:批量访问知网进行搜索,以非正规途径获取知网论文,利用该项目进行违法违规的行为。 如有上述行为,本项目不构成任何因果利害关系,由使用者自行负责。最终解释权归本项目所有。
首次初始化
首次使用时运行:
uv run cnki-mcp init
命令会询问 Profile 名称,直接回车使用 default。也可以直接指定名称:
uv run cnki-mcp init --profile school
请在打开的浏览器中完成学校或机构认证。初始化成功后,该 Profile 会成为默认 Profile,后续启动和检索无需重复指定。
推荐启动方式
推荐使用 HTTP。下面两条命令效果相同,默认监听 127.0.0.1:7788:
uv run cnki-mcp
uv run cnki-mcp serve --transport http --host 127.0.0.1 --port 7788
服务启动时会打开一个持久浏览器,并在服务进程退出时关闭。项目只提供知网检索和 文章信息读取,不提供全文下载。
按 ISSN 获取某一期的全部文章 metadata:
uv run cnki-mcp tool journal --issn 1002-9621 --year 2026 --vol 1
这里的 --vol 表示知网页面上的期号。返回结果会把真正的卷号 volume 和期号
issue 分开提供。尚未发行的年份或期号会返回 IssueNotAvailable。
通过期刊名称搜索 ISSN:
uv run cnki-mcp tool issn --journal "世界经济"
搜索会忽略期刊名中的空格和标点,并返回知网搜索到的全部候选期刊。期刊目录来自
知网期刊导航页。工具每次都会通过 ISSN 重新定位期刊并获取当次有效的页面地址,
不会保存其中会失效的 p 参数。
通过 Python 使用
该项目提供了 Python API 供学习参考:
# pip install cnki-mcp
from cnki_mcp import CnkiClient
with CnkiClient(profile="profile1") as client:
results = client.search(
"TI='生态' and KY='生态文明'",
sort_by="date",
)
文档
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cnki_mcp-0.1.1.tar.gz.
File metadata
- Download URL: cnki_mcp-0.1.1.tar.gz
- Upload date:
- Size: 45.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f6098b238b1eafb051984a90a61ff49612a677fa8035dfc60b0a9281460fa99
|
|
| MD5 |
3679b40d00be1b55763468b3480e5286
|
|
| BLAKE2b-256 |
79036426ef8aecc1997fb0aabe18156ffe5cb727745a987db3c34487f30fa06d
|
Provenance
The following attestation bundles were made for cnki_mcp-0.1.1.tar.gz:
Publisher:
publish.yml on SepineTam/cnki-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cnki_mcp-0.1.1.tar.gz -
Subject digest:
1f6098b238b1eafb051984a90a61ff49612a677fa8035dfc60b0a9281460fa99 - Sigstore transparency entry: 2635992329
- Sigstore integration time:
-
Permalink:
SepineTam/cnki-mcp@81c3105d9a57718c18619c28c4bc227301075713 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SepineTam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81c3105d9a57718c18619c28c4bc227301075713 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cnki_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cnki_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 66.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a43399eddb060d521359db90cade56263b55a28b77e05e71ccd27b5007dd20d1
|
|
| MD5 |
daec71712d25d2ade589f29f066bb865
|
|
| BLAKE2b-256 |
37f983bb1826cbf51d88a023d40773ecf12931c1273c00403995b912977da59e
|
Provenance
The following attestation bundles were made for cnki_mcp-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on SepineTam/cnki-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cnki_mcp-0.1.1-py3-none-any.whl -
Subject digest:
a43399eddb060d521359db90cade56263b55a28b77e05e71ccd27b5007dd20d1 - Sigstore transparency entry: 2635992373
- Sigstore integration time:
-
Permalink:
SepineTam/cnki-mcp@81c3105d9a57718c18619c28c4bc227301075713 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SepineTam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81c3105d9a57718c18619c28c4bc227301075713 -
Trigger Event:
release
-
Statement type: