litMcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@litMcp find recent papers on large language models and save them to my library"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
litMcp
在 MCP 客户端里检索 OpenAlex、arXiv、PubMed 和知网等来源,将论文存入本地文献库,再筛选、下载 PDF 或导出 BibTeX。
快速开始
安装 uv,在项目根目录运行
uv sync --locked。需要知网时,改用uv sync --locked --extra cnki,并安装 Chrome 或 Edge。在 ZCode 中使用时,先运行
uv run --no-sync litMcp --print-config zcode,将输出的服务条目以litMcp为键合并到~/.zcode/cli/config.json的mcp.servers。其他客户端见配置指南。新建会话,输入「调用
litMcp的library_stats」。返回统计或Library is empty即连接成功。这一步无需 API 密钥。
要检索 OpenAlex,首次配置时可将 .env.example 复制为 .env,填入 OPENALEX_API_KEY 后重连。用户级配置推荐放在 ~/.config/litMcp/.env,该文件不存在时,服务会回退到旧路径 ~/.config/openalex-mcp/.env。启动遇到问题时,运行 uv run --no-sync litMcp --doctor。
Related MCP server: academic-mcp
工具索引
用途 | 工具 |
按关键词、研究问题或 DOI 找论文 |
|
找预印本和近期论文、中国期刊或知网文献 |
|
查作者、期刊或机构等实体的 ID |
|
为论点找出处、阅读已入库论文、补 Elsevier 摘要 |
|
查库与统计、导出 BibTeX、获取综述写作提示词 |
|
下载 PDF、续办知网检索或下载 |
|
分析引文、查看引用关系、生成交互图 |
|
删除指定记录、释放数据库连接 |
|
关键词和语义检索默认查 2021 年之后的论文。要包含更早文献,设 publication_year=""。知网弹出验证时,在原窗口完成验证后告诉客户端「继续」。
download_pdf 先试免费来源。全部失败且 OpenAlex 提供该文 PDF 时,如已配置密钥,工具会尝试 Content API,按每篇 0.01 美元估算费用。检索及阅读工具仅在显式设置 use_openalex_content_api=true 时使用该付费回退。
文献库默认位于 ~/.AI-CACHE/openalex/library.db。同目录的 pdfs/、collections/ 和 graphs/ 分别存放 PDF、BibTeX 和引文图。工具原理
Available Tools
21 toolsautocompleteAutocompleteA
Resolve names to OpenAlex entity IDs — fast typeahead (~200ms).
TRIGGER whenever the user names a specific author, journal, institution, publisher, or funder (指定作者/期刊/机构/出版商/资助方) and you need its OpenAlex ID for search filters.
Use this before search_keyword / search_semantic to resolve
author, journal, institution, publisher, or funder names to their
OpenAlex IDs. Then pass the ID to the corresponding filter parameter
of the search tool.
Returns up to 10 results. Autocomplete is free (not billed as a search).
Inputs: query (required), entity_type (required). Returns: result
cnki_jobCnki JobA
Continue or cancel a CNKI search or PDF download by job_id.
When the user says “继续” after verification in the original window, call with the same job_id. Use action='cancel' to release the window. Each call waits up to 20 seconds. Verification expires after 4 minutes and completed results can be read again for 4 minutes. Restarting the server clears job IDs. If the ID has expired, restart the original call.
Inputs: job_id (required), action. Returns: result
download_pdfDownload PdfA
Download paper PDFs by OpenAlex work ID or by native id.
TRIGGER when the user asks to 下载论文/PDF/全文, download or save paper PDF files.
Sources are tried in this order and the first one that returns a
real PDF wins: pdf_url links recorded on the work, arXiv, the
Elsevier Article Retrieval API (needs ELSEVIER_API_KEY plus the
campus subscription; works for paywalled Elsevier articles). Only
when all of those fail: Unpaywall, the DOI landing page's
citation_pdf_url tag, Semantic Scholar, and last the paid
OpenAlex Content API (content.openalex.org, $0.01 per PDF;
the reported cost counts paid downloads only). CNKI records are
downloaded one page at a time in the local browser under the
machine's institutional access: at most 5 per call, because CNKI
restricts batch downloads. Some theses offer CAJ only. Batches with
CNKI entries return a job_id on verification or after 20 seconds.
Ordinary PDFs in that batch continue. Ask the user to verify in the
original window and say “继续” within 4 minutes. Resume the batch
with cnki_job(job_id) or cancel with action='cancel'.
STRICT RULE: PDFs must be saved to
~/.AI-CACHE/openalex/pdfs/ by default. Leave
save_to_project=false unless the user explicitly asks to save
PDFs in the project directory. Never infer this from context, an
Agent preference, or a requested arbitrary path. When explicitly
requested, save_to_project=true saves only to the fixed
<project>/pdfs/ directory; arbitrary output paths are impossible.
Already-downloaded files are skipped to avoid unnecessary charges.
Limits: at most 25 works per call (split larger batches); remote URLs are fetched only over validated public http(s) hosts, must prove to be PDFs, and are size-capped. Sites that answer with a CAPTCHA or bot check are reported as failures, never solved.
Inputs: work_ids (required), save_to_project. Returns: result
fetch_elsevier_abstractsFetch Elsevier AbstractsA
Fetch missing paper abstracts from Elsevier by DOI or local work ID.
TRIGGER when retrieved papers lack abstracts and the user wants fuller summaries (补全/回填文献摘要).
Requires ELSEVIER_API_KEY. Uses Elsevier's Abstract Retrieval API
and returns the full abstract text when available. If update_library
is true, fetched abstracts are written back into works.abstract.
Existing local abstracts are preserved unless overwrite is true.
Inputs: query (required), overwrite, input_type, update_library. Returns: result
find_literatureFind LiteratureA
Find literature evidence for a paragraph or explicit claims.
TRIGGER when the user asks for sources supporting a statement. Recall uses local full-text search and OpenAlex keyword and semantic search. Remote results are not automatically ingested. Evidence verdicts supports/partial/none are conservative lexical heuristics, not entailment judgments: verify quoted abstract context. Titles alone cannot support a claim. not_found means no evidence in returned windows, not evidence of absence. For Chinese claims, supply aligned claims_en translations to search and match English abstracts. Output is intact JSON capped at 12,000 characters. At most eight claims, four remote claims, and five seconds per route are processed; timeout_seconds bounds the full recall (maximum 60 seconds). Failed and skipped routes are reported. No implicit PDF download. Stop searching once enough source evidence is available.
Inputs: text, claims, claims_en, per_claim, +4 more. Returns: result
graph_analyzeGraph AnalyzeA
Analyze the citation network among a selected set of papers.
TRIGGER when the user asks about citation relationships, who cites whom, core/classic papers, or research clusters among collected literature (引文网络分析、引用关系、找关键文献/文献簇).
Builds a directed citation graph over the given works — node =
paper, edge A → B means A cites B. Only works in work_ids
become nodes; only citations where BOTH papers are in the list are
kept (induced subgraph).
work_ids 必填:不填/为空会报错。请先用 library_query 选出目标
论文,再把它们的 ID 列表传进来。例如:
SELECT id FROM works WHERE publication_year > 2023 ORDER BY cited_by_count DESC LIMIT 100
返回 PageRank、被引最多(入度)、引用最多(出度)、中介中心度、 社区划分(密集互引的论文簇)等结构化分析。
Inputs: work_ids (required). Returns: result
graph_neighborsGraph NeighborsA
Show the citation neighbors (who cites it / whom it cites) of papers.
TRIGGER when the user asks 某篇文献被谁引用、它引用了谁, or wants the local citation context of specific papers.
For each requested work, lists who cites it (in / predecessors) and whom it cites (out / successors), within the selected set.
work_ids 必填:同 graph_analyze,先用 library_query
选出论文。方向语义:in = 谁引用了它;out = 它引用了谁;
both = 两者都列(默认)。
Inputs: work_ids (required), direction. Returns: result
graph_visualizeGraph VisualizeA
Generate an interactive HTML visualization of the citation network.
TRIGGER when the user asks to 可视化/画出引文网络图, or wants a visual map of how collected papers cite each other.
Renders the selected works as an interactive graph (vis.js) saved to
~/.AI-CACHE/openalex/graphs/ — open the returned path in a browser.
Visual encoding:
color = publication year (light = older, dark = newer)
label = first-author surname + year on prominent/hovered nodes
size = cited-by count (robust log-scaled)
edge brightness = local citation-structure strength
short force-directed settling animation, then physics auto-freezes
click for amber highlight; hover syncs the right detail panel
in-page filters: search box (title/author/ID), year range, and community dropdown dim non-matching nodes and hide their edges
work_ids 必填:同 graph_analyze。建议 30~120 篇。超过 120 篇时,
可视化会按被引量、PageRank、集合内被引用次数和奠基性年份自动截取重要论文;
完整集合分析仍可用 graph_analyze。
Inputs: work_ids (required), output_dir. Returns: result
library_closeLibrary CloseA
Close the local library connection and release the file lock.
Maintenance only — call when another program needs the database file; not part of a normal literature-search workflow.
After closing, any subsequent tool that accesses the library will automatically reconnect. Use this when you need another program to access the library database file without lock conflicts.
Inputs: no named parameters. Returns: result
library_deleteLibrary DeleteA
Delete works from the local library.
DESTRUCTIVE — call ONLY on an explicit user delete request; never call proactively during a literature workflow.
Removes works by ID from the local library.
⚠️ 谨慎使用:删除不可恢复。除非用户明确要求删除,否则 AI 不应
调用本工具——尤其是 work_ids="*" 会清空整个库(含论文与来源)。
没有用户明确的删库指令时,AI 不要自行调用。
Inputs: work_ids (required). Returns: result
library_exportLibrary ExportA
Export screened papers from the library to a BibTeX file.
TRIGGER when the user wants a reference list, citation export, or a .bib file for Zotero / EndNote / JabRef (导出参考文献、生成 BibTeX).
Generates BibTeX entries directly from library columns and saves
them to ~/.AI-CACHE/openalex/collections/{target}.
Use this as the FINAL step — after iteratively screening with
library_query and confirming the papers you want.
Inputs: sort, target, work_ids, cite_key_style. Returns: result
library_queryLibrary QueryA
Query the local literature library with read-only SQL.
TRIGGER after any search to screen, filter, or rank the collected papers (从已检索文献库中筛选/排序, e.g. top-N by citations, year/journal/author filters, substr(fulltext,1,N) evidence extraction).
This is the universal query tool — freely explore schema and run ad-hoc queries:
Explore schema:
SELECT name FROM sqlite_master WHERE type='table';PRAGMA table_info(<table>)Count / filter:
SELECT count(*) FROM works WHERE ...Plain queries: read-only SQLite SELECT / WITH / EXPLAIN queries — joins, aggregations, window functions, etc.
Keyword relevance: FTS5
bm25()ranking over title, abstract, and full text (see below).
Schema:
works — id, doi, title, publication_year,
publication_date, type, cited_by_count, is_oa, oa_status,
has_content, abstract, language, source_id, source_name,
authors_json, concepts_json, keywords_json, referenced_works,
related_works, raw_json.
sources — id, display_name, host_organization, issn_l,
issn, type, alternate_titles, abbreviated_title, homepage,
works_count, cited_by_count, is_oa, is_in_doaj, topic.
Work ids are OpenAlex ids (W...) or, for hits that OpenAlex does
not index, source-prefixed ids from search_multi (arxiv:...,
pmid:..., doi:...).
Full-text search: the works_fts FTS5 index covers title,
abstract, and fulltext. Use MATCH with bm25() ranking
(lower is better):
SELECT w.id, w.title, bm25(works_fts) AS rank FROM works_fts JOIN works w ON w.rowid = works_fts.rowid WHERE works_fts MATCH 'sensor AND fusion' ORDER BY rank LIMIT 20
Chinese full-text search: CJK text is indexed as character
bigrams, so wrap Chinese keywords with cjk_fts instead of
quoting them (中文关键词必须用 cjk_fts 包裹):
... WHERE works_fts MATCH cjk_fts('锂电池 极耳') ORDER BY rank
WAL mode allows concurrent reads + writes — library_query
does not block search_keyword / search_ids and vice versa.
Database-level read-only enforcement rejects mutations even when they
are hidden inside a CTE. WITH RECURSIVE is rejected (an
unterminated recursion would starve the shared read connection), and
any single statement is interrupted after 30 seconds. Use LIMIT and
bounded substr() expressions when selecting large columns such as
fulltext or raw_json.
Output is capped: BLOB columns render as <BLOB N bytes>, very
long text values are cut with an in-band <truncated: ...> marker,
and results over 200 rows or 200,000 chars are trimmed. A
trimmed result is returned as an object with rows, truncated,
and notes instead of a bare array. Project only the columns you
need.
Inputs: sql (required). Returns: result
library_statsLibrary StatsA
Show an overview of the local literature library.
TRIGGER when the user asks what has been collected so far (库里有哪些文献/文献库概况), or before screening to plan queries.
Returns Markdown with total works, year range, abstract and full-text coverage, open-access rate, top 10 sources, and top 10 concepts.
Use this to understand what's in your library before searching.
Inputs: no named parameters. Returns: result
literature_review_promptLiterature Review PromptA
Return the system prompt for a BibTeX-grounded literature review.
TRIGGER when the user asks to write a literature review / related-work section from BibTeX (根据 BibTeX 写综述、文献回顾、研究现状).
This tool deliberately has no BibTeX argument and does not call an LLM. The outer model must read the BibTeX supplied in the conversation or a local .bib export, then follow the returned prompt to write the review. This preserves a single source of truth for citation keys and keeps the final prose generation under the outer model's control.
Inputs: no named parameters. Returns: result
search_chineseSearch ChineseA
Search Chinese journal literature (中文期刊文献检索).
TRIGGER when the user asks for 中文文献/中文期刊/国内研究 and the
query is written in Chinese keywords (找中文论文、国内研究现状).
It searches OpenAlex restricted to sources whose country is China,
so it covers Chinese journals that register a DOI.
CNKI/Wanfang theses and journals without DOIs are NOT covered; use
search_cnki for CNKI (theses, Chinese journals) or search_keyword
for English queries.
Page 1 first looks for an exact match of all keywords in the title
or abstract (most relevant first). When nothing matches exactly, it
falls back to a loose match and says so in the summary; page above
1 pages through the loose results.
Results are automatically added to the local library (UPSERT by work ID).
Use library_query to explore results with SQL.
Inputs: query (required), page, cited_by_count, publication_year. Returns: result
search_cnkiSearch CnkiA
Search CNKI (知网) through a local browser (知网检索).
TRIGGER when the user asks for 知网/CNKI 文献, 硕士/博士论文, or Chinese work that OpenAlex does not index (知网上的中文文献、学位论文).
Requires local Chrome or Edge, institutional access and the cnki extra. Stores the newest 20 records with detail-page abstracts, DOIs and page numbers. Each call waits up to 20 seconds. On verification it returns a job_id immediately. Ask the user to complete verification in the original window and say “继续” within 4 minutes, then call cnki_job with that ID. For a progress response, use the same ID to check again.
Inputs: query (required). Returns: result
search_idsSearch IdsA
Fetch specific papers by OpenAlex ID or DOI.
TRIGGER when the user provides one or more DOIs / OpenAlex IDs, or
points at specific known papers (按 DOI 获取论文、查指定的某几篇文献)
— no filters, no pagination. For topic-based discovery use
search_keyword / search_semantic instead.
Results are automatically added to the local library (UPSERT by work ID).
Use library_query to explore results with SQL.
Inputs: query (required), fetch_fulltext, fulltext_limit, use_openalex_content_api. Returns: result
search_keywordSearch KeywordA
Search academic papers by keyword across 250M+ OpenAlex works.
TRIGGER automatically whenever the user asks to 检索/查找/搜集相关文献
或资料, find/search/review papers, references, related work, or surveys
by topic, keyword, author, journal, institution, or funder. Prefer this
over generic web search when scholarly sources are needed, and call it
before answering the research question. For paragraph-length research
ideas or conceptual matching prefer search_semantic; when the user
already gives DOIs or OpenAlex IDs use search_ids instead.
Results are automatically added to the local library (UPSERT by work ID).
Use library_query to explore results with SQL.
The query parameter supports Boolean operators (AND, OR, NOT —
UPPERCASE), quoted phrases ("..."), and wildcards (machin*).
Search targets title, abstract, and fulltext. Defaults to
publication_year ">2021".
Leave query empty to fetch ALL works matching only the ID
filters — no full-text keyword needed. Combine with
publication_year or cited_by_count to narrow the result set.
Use autocomplete first to resolve author / source / institution /
publisher / funder names to their OpenAlex IDs, then pass those IDs
to the corresponding filter parameters below.
Inputs: page, cites, query, cited_by, +12 more. Returns: result
search_multiSearch MultiA
Search preprints and fresh publications beyond OpenAlex.
TRIGGER when the user needs the newest papers, preprints, or work OpenAlex may not have indexed yet (最新论文、预印本、arXiv、bioRxiv、 PubMed、刚上线的期刊论文).
Sources run concurrently and every hit is stored in the local library:
arxiv: arXiv preprints (use English keywords).crossref: freshly registered journal articles and proceedings.pubmed: PubMed through NCBI E-utilities (biomedicine).preprints: bioRxiv/medRxiv/Research Square via Europe PMC. Its host is often slow, so it may time out; retry it alone withsources="preprints"when it matters.semantic_scholar: Semantic Scholar; setSEMANTIC_SCHOLAR_API_KEYfor reliable limits (anonymous access is often rate-limited).
A hit that shares a DOI with an OpenAlex work is stored as that
OpenAlex work (id W...); the rest keep source-prefixed ids such as
arxiv:2401.12345, pmid:12345678, doi:10.1016%2F....
Read native-record papers with summarize_paper +
fetch_fulltext=true; query everything with library_query.
Inputs: query (required), days, limit, sources. Returns: result
search_semanticSearch SemanticA
Search academic papers by meaning — AI-powered semantic search.
TRIGGER when the user describes a research idea, problem, draft
paragraph, or abstract and wants conceptually related papers
(按研究思路/想法/主题找语义相关文献, find papers similar to this
idea/abstract), even without exact keywords. For exact terms, author
names, or venue strings prefer search_keyword; for known DOIs or
IDs use search_ids.
Results are automatically added to the local library (UPSERT by work ID).
Use library_query to explore results with SQL.
This uses OpenAlex's server-side semantic search and needs no extra key.
Best for paragraph-length queries (research descriptions, abstracts).
Matches by conceptual meaning, not exact keywords. Max 50 results
per page, rate-limited to 1 request per second. Defaults to
publication_year ">2021".
Use autocomplete first to resolve author / source / institution /
publisher / funder names to their OpenAlex IDs, then pass those IDs
to the corresponding filter parameters below.
Inputs: query (required), page, cites, cited_by, +12 more. Returns: result
summarize_paperSummarize PaperA
Read bounded source windows for a grounded paper summary.
TRIGGER when asked to explain a known library paper. The tool returns source text and summary instructions; the outer model writes the summary. Continue with next_offset until complete, tracking every window read. complete only means the end of stored text, whose PDF extraction coverage is unknown. abstract_only=true cannot justify a full-paper summary. Offsets count Unicode characters, not PDF pages. Purely local by default. Explicit fetch_fulltext allows one stored paper's OA PDF extraction (100 pages, 100,000 chars, 60-second deadline); use_openalex_content_api explicitly permits the paid fallback. Output stays intact JSON within 12,000 characters, with accurate cursors.
Inputs: work_id (required), length, offset, fetch_fulltext, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Six search variants coexist (search_keyword, search_semantic, search_ids, search_chinese, search_cnki, search_multi), but each description carries explicit TRIGGER conditions and cross-references telling the agent when to prefer another tool, so routing is learnable. Library tools (library_query vs library_stats vs find_literature vs summarize_paper) are also cleanly separated by task stage; the only residual ambiguity is choosing among the search family under vague requests.
All names are snake_case and grouped by domain prefixes: search_*, library_*, graph_*. Deviations are minor: cnki_job is noun-first, autocomplete has no object, and standalone verbs (summarize_paper, download_pdf, find_literature) break the prefix pattern but remain readable and predictable.
21 tools is on the heavy side, but the server covers a genuinely broad pipeline (multi-source search, SQL library, PDF acquisition, summarization, citation graphs, export), and each tool maps to a distinct step. Only library_close (pure maintenance) and literature_review_prompt feel like marginal additions.
Coverage is unusually thorough: six search backends, SQL screening, BibTeX export, PDF download, abstract backfill, evidence finding, bounded summarization, and a full three-tool citation-graph suite. The main gap is lifecycle management of library records — delete exists but no update/annotate/tag operation, and no non-BibTeX citation styles.
Maintenance
Related MCP Connectors
Academic literature search, retrieval, and private library management on top of OpenAlex.
Federated search of books and papers, BibTeX/RIS citations, open-access retrieval and reading.
Search and read arXiv research papers via a hosted, read-only MCP server.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables multi-source literature search, full-text retrieval, reference analysis, and journal quality assessment across Europe PMC, PubMed, arXiv, CrossRef, OpenAlex, and EasyScholar via the MCP protocol.530 npm1MIT
- AlicenseAqualityDmaintenanceUnified academic search MCP server that searches open literature (arXiv, bioRxiv, medRxiv, PMC), CNKI, and Web of Science, with browser-backed authentication, local paper library, and export to multiple formats.212MIT
- AlicenseNot gradedqualityDmaintenanceA MCP server for academic literature retrieval, aggregating multiple data sources like arXiv, Crossref, OpenAlex, PubMed, and Semantic Scholar to provide search, details, citations, trends, and recommendations.4MIT
- AlicenseAqualityDmaintenanceAcademic paper search and retrieval MCP server integrating multiple scholarly platforms into a unified interface. Supports search, fetch, trend analysis, and literature review workflows.84MIT