{"id":50451367,"url":"https://github.com/xusenlin/literature-search-mcp","last_synced_at":"2026-06-01T00:03:13.908Z","repository":{"id":356551955,"uuid":"1223472144","full_name":"xusenlin/literature-search-mcp","owner":"xusenlin","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-08T14:49:13.000Z","size":5677,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T16:40:25.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xusenlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-28T11:03:04.000Z","updated_at":"2026-05-08T14:49:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xusenlin/literature-search-mcp","commit_stats":null,"previous_names":["xusenlin/literature-search-mcp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/xusenlin/literature-search-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fliterature-search-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fliterature-search-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fliterature-search-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fliterature-search-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xusenlin","download_url":"https://codeload.github.com/xusenlin/literature-search-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xusenlin%2Fliterature-search-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33753931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-01T00:03:12.995Z","updated_at":"2026-06-01T00:03:13.901Z","avatar_url":"https://github.com/xusenlin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# literature-mcp\n\nA small **MCP server** (stdio transport) that searches academic literature across\n**PubMed**, **Semantic Scholar**, **arXiv**, and **CQVIP** (维普), and returns\nthe URL plus the fields you actually need to write a paper — title, authors,\nyear, venue, DOI, abstract, and (where applicable) citation count and PDF link.\n\nBuilt with the official Go SDK: `github.com/modelcontextprotocol/go-sdk/mcp`.\n\n## Tools\n\n| Tool | Description |\n|---|---|\n| `search_pubmed` | Search PubMed by keyword. Uses ESearch + EFetch, so abstracts are included. |\n| `search_semantic_scholar` | Search Semantic Scholar (all fields). Returns citation counts. |\n| `search_arxiv` | Search arXiv (preprints in physics, math, CS, …). Returns PDF link. |\n| `search_cqvip` | Search CQVIP 维普 advanced API. Supports year range, OA-only, has-PDF-only, and language filters. |\n| `search_all` | Run every enabled platform in parallel for the same query. **Per-platform failures are non-fatal** — successful platforms still contribute their results, failures are reported under `errors`. CQVIP joins the fan-out only when its key is configured. |\n\n### Input schema\n\nSingle-platform tools (PubMed, S2, arXiv) take:\n\n```json\n{ \"query\": \"string\",  \"limit\": 10 }\n```\n\n`search_cqvip` takes:\n\n```json\n{\n  \"query\":        \"新能源\",\n  \"limit\":        10,\n  \"year_start\":   2021,\n  \"year_end\":     2025,\n  \"only_pdf\":     true,\n  \"only_oa\":      true,\n  \"language\":     \"zh\",\n  \"search_field\": \"U\"\n}\n```\n\n`search_all` takes:\n\n```json\n{ \"query\": \"string\",  \"limit_per_source\": 5 }\n```\n\n### Output shape\n\n```json\n{\n  \"query\":   \"...\",\n  \"total\":   12,\n  \"sources\": [\"pubmed\", \"arxiv\"],          // search_all only\n  \"errors\":  [\"semantic_scholar: ...\"],    // search_all only, may be empty\n  \"papers\": [\n    {\n      \"source\":         \"pubmed | semantic_scholar | arxiv | cqvip\",\n      \"id\":             \"PMID / S2 paperId / arXiv id / CQVIP id\",\n      \"title\":          \"...\",\n      \"authors\":        [\"...\"],\n      \"year\":           \"2024\",\n      \"venue\":          \"Nature\",\n      \"doi\":            \"10.1038/...\",\n      \"url\":            \"https://pubmed.ncbi.nlm.nih.gov/12345/\",\n      \"pdf_url\":        \"https://arxiv.org/pdf/...\",   // arXiv only\n      \"abstract\":       \"...\",\n      \"citation_count\": 42                              // Semantic Scholar only\n    }\n  ]\n}\n```\n\n## Configuration\n\nAll API keys are **optional**. Free platforms (PubMed, Semantic Scholar, arXiv)\nwill work without keys, just with stricter rate limits. CQVIP is paid-only —\nwithout `CQVIP_API_KEY` set, `search_cqvip` returns a clear error and `search_all`\nsilently skips CQVIP.\n\n| Variable | Used for | Notes |\n|---|---|---|\n| `PUBMED_API_KEY` | PubMed E-utilities | Optional. Without one: 3 req/s; with one: 10 req/s. Get one at \u003chttps://www.ncbi.nlm.nih.gov/account/\u003e. |\n| `SEMANTIC_SCHOLAR_API_KEY` | Semantic Scholar Graph API | Optional. Without one: shared public rate limit. Apply at \u003chttps://www.semanticscholar.org/product/api\u003e. |\n| `CQVIP_API_KEY` | CQVIP unified search API | Sent as `Authorization: Bearer \u003ckey\u003e`. Required for the CQVIP backend; the rest of the server still works without it. |\n| `LITERATURE_MCP_TOOL` | Identifies your client to NCBI | Defaults to `literature-mcp`. |\n| `LITERATURE_MCP_CONTACT` | Email NCBI uses to contact you about issues | Optional but recommended by NCBI. |\n\narXiv requires no key.\n\n## Build\n\n```bash\ngo build -o literature-mcp .\n```\n\nRequires Go 1.24+ (matches the SDK requirement).\n\n## Use with Claude Desktop / any MCP client\n\n```json\n{\n  \"mcpServers\": {\n    \"literature\": {\n      \"command\": \"/absolute/path/to/literature-mcp\",\n      \"env\": {\n        \"PUBMED_API_KEY\":           \"...\",\n        \"SEMANTIC_SCHOLAR_API_KEY\": \"...\",\n        \"CQVIP_API_KEY\":            \"...\"\n      }\n    }\n  }\n}\n```\n\nAny of the `env` entries can be omitted.\n\n## Project layout\n\n```\nliterature-mcp/\n├── go.mod\n├── main.go             // server + tool registration\n├── types.go            // Paper / SearchResult types (drive the schemas)\n├── config.go           // env-var loading\n├── http.go             // shared HTTP client (GET + POST JSON helpers)\n├── pubmed.go           // ESearch + EFetch (XML)\n├── semanticscholar.go  // graph/v1/paper/search (JSON)\n├── arxiv.go            // export.arxiv.org/api/query (Atom XML)\n└── cqvip.go            // superapi.cqvip.com/.../adv-search (JSON, Bearer auth)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxusenlin%2Fliterature-search-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxusenlin%2Fliterature-search-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxusenlin%2Fliterature-search-mcp/lists"}