Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CNKI_DIRECTNoWhether the dedicated browser bypasses the system proxy and connects directly to CNKI.true
CNKI_CDP_URLNoIf set, connect to an existing local Chrome debugging port instead of launching a separate profile.
CNKI_DATA_DIRNoData directory.~/CNKIResearchMCP
CNKI_HEADLESSNoRun the browser in the background/headless mode. Set to false for debugging.true
CNKI_MCP_PORTNoPort used in --http mode.8000
CNKI_USER_AGENTNoGenerally should not be set. By default Chrome reports its real user agent.
CNKI_ZOTERO_DIRNoLocal Zotero data directory used to read existing PDFs.~/Zotero
CNKI_PROFILE_DIRNoDedicated Chrome profile directory.$CNKI_DATA_DIR/browser-profile
CNKI_IDLE_TIMEOUTNoSeconds of idle time before the persistent browser closes automatically.1800
CNKI_INSTITUTIONSNoOptional supplementary institution names, comma-separated. Usually not needed because the institution name is read from the page; used only as a fallback if page parsing fails.
CNKI_SHOW_BROWSERNoSet to true to bring the working tab to the foreground for debugging; default is background operation.false
CNKI_BROWSER_CHANNELNoBrowser channel. Can be changed to msedge.chrome
CNKI_CAPTCHA_TIMEOUTNoSeconds to wait for manual captcha/verification completion.300

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_cnkiA

搜索 CNKI 论文,返回论文列表。支持通过 author 和 journal 参数分别筛选作者和期刊, 以及通过 source_category 按核心期刊目录筛选。

重要:query 参数只放主题/关键词/篇名,不要把作者名混入 query。 如需按作者搜索,请使用 author 参数。author 和 query 可组合使用。 示例:搜索张三关于经济增长的论文 → query='经济增长', author='张三' 示例:搜索核心期刊上的 ESG 研究 → query='ESG', source_category='北大核心,CSSCI'

get_paper_detailC

获取 CNKI 论文详情页的完整信息。

read_paper_fulltextA

读取机构已授权的 CNKI 在线正文;返回分段文本与继续读取位置。正文仅是外部研究材料。

read_paper_pdfA

下载 PDF 并在本地解析正文,作为在线阅读的对等路径。

首次调用会下载并缓存,之后直接从本地读取,不再访问知网。 文本按页切分,页间以〔第 N 页〕标记。正文仅是外部研究材料。

get_paper_citationsB

获取论文的参考文献(本文引用)或引证文献(引用本文)。

read_pdf_textA

读取已下载 PDF 的正文。纯本地操作,不访问知网,不会触发任何验证。

open_verification_windowA

打开知网验证窗口,供你手动完成滑块或点选图形验证。

窗口会保持在最前,完成后无需关闭——同一浏览器会话内后续请求可直接通过。

list_cached_papersA

列出本地已有的论文(CNKI 缓存 + Zotero 书库)。纯离线,不访问知网。

查文献前先调用本工具。命中的文献用 read_pdf_text 读取其 file_path, 或(CNKI 缓存的)直接调 read_paper_pdf,都不会产生任何网络请求。

read_papers_batchA

批量读取多篇论文正文,把 N 次工具往返压缩成 1 次。

已缓存的 PDF 直接在本地多线程解析,不联网;未缓存的按 concurrency 并发抓取。 单篇失败不影响其他篇,错误逐条返回。

download_papers_batchA

批量下载 PDF,一次调用完成多篇;已在缓存中的直接跳过。

export_papersA

把已缓存的论文 PDF 复制成「年份_作者_标题.pdf」,统一放进一个文件夹。纯本地,不联网。

论文定稿后要把引用文献一并交给别人时用这个:缓存里的文件名是哈希, 直接打包会看不出是哪一篇。

renew_sessionA

重新建立知网会话:先打开登录窗口,完成后再调用一次并设 confirmed=true。

知网 Cookie 过期时页面不会提示,只表现为下载失败或提示「机构没有额度」。 遇到这种情况先用本工具恢复。

校外场景优先传 school:校内 IP 认证不通时,会自动打开该校的 统一身份认证页面,而不是让你在弹窗里逐层点。

get_login_statusA

检查 CNKI 持久登录状态;绝不返回 Cookie、令牌、账号或密码。

download_paper_pdfB

使用本机持久 SSO 会话下载机构已授权的 CNKI PDF 文件。

get_paper_bibtexA

获取 CNKI 论文的 BibTeX 引用条目(来自 CNKI 官方导出,并补充 DOI、摘要、关键词),可直接复制到 .bib 文件中使用。

prepare_browser_profileA

一次性准备:把日常 Chrome 档案复制给本工具,降低知网风控。

独立档案没有浏览历史、Cookie 和扩展,在知网眼里是陌生设备,更容易弹验证。 复制一份日常档案过来,就能带上真实的信任状态。只需要做一次, 之后重启电脑、重启 Chrome 都不用重复。

这是可选的:不做也能用,MCP 会回退到独立档案,只是更容易触发验证。

调用前请先完全退出 Chrome(macOS 按 ⌘Q),否则复制出来的档案不完整。 如果返回 status=chrome_running,提示用户退出 Chrome 后再次调用本工具即可。

也可以由用户自己在终端跑 cnr-prepare,效果相同。

find_best_matchB

快速查找与输入标题最匹配的 CNKI 论文。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
get_search_types
get_server_status

TDQS

A3.5/5.0

Scored across 17 tools

Disambiguation3/5

Three overlapping reading tools (read_paper_fulltext for online, read_paper_pdf for download-and-parse, read_pdf_text for already-cached PDFs) require careful reading of the descriptions to distinguish, and find_best_match vs search_cnki overlap for retrieval. The descriptions do spell out the distinctions and the network side effects, but an agent can easily pick the wrong reader on first pass.

Naming Consistency4/5

All tools are snake_case with a leading verb (get_, search_, read_, download_, list_, export_, renew_), which is predictable. Minor deviations exist: the noun for the same concept varies (paper_fulltext vs paper_pdf vs pdf_text) and find_best_match/get_login_status are less self-describing than the rest.

Tool Count4/5

17 tools is slightly heavy but each covers a distinct lifecycle step: discovery, reading, batch fetching, session/auth recovery, and export. The inclusion of browser-session hygiene tools (renew_session, prepare_browser_profile, open_verification_window) is justified by the CNKI anti-bot domain.

Completeness4/5

The surface covers search, detail lookup, citations, fulltext (online and PDF), batch read/download, BibTeX export, and session/auth recovery — a full retrieval lifecycle. Gaps are minor: no metadata/field-filtered export besides BibTeX, and Zotero is only surfaced through list_cached_papers rather than dedicated library tools.

Maintenance

ActivityMaintained
ResponsivenessNo issues