scholar-sidekick-mcp 0.3.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -5
- package/dist/mcp-server.mjs +55 -9
- package/package.json +16 -5
package/README.md
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
# Scholar Sidekick MCP Server
|
|
2
2
|
|
|
3
|
-
[MCP](https://modelcontextprotocol.io) server for [Scholar Sidekick](https://scholar-sidekick.com) — resolve,
|
|
3
|
+
[MCP](https://modelcontextprotocol.io) server for [Scholar Sidekick](https://scholar-sidekick.com) — resolve any scholarly identifier (DOI, PMID, PMCID, ISBN, arXiv, ISSN, NASA ADS bibcode, WHO IRIS URL) into 10,000+ CSL styles or nine export formats, single or batch, from any AI assistant.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
- **Eight identifier types out of the box** — DOIs, PMIDs, PMCIDs, ISBNs, arXiv IDs, ISSNs, NASA ADS bibcodes, and WHO IRIS URLs (rare in citation tooling).
|
|
8
|
+
- **Batch-friendly** — every tool accepts a single identifier or a comma- or newline-separated list; the server normalises the list and resolves them in one round trip.
|
|
9
|
+
- **10,000+ citation styles** — five hand-tuned builtins (Vancouver, AMA, APA, IEEE, CSE) plus any [CSL style ID](https://github.com/citation-style-language/styles), with alias and dependent-style resolution.
|
|
10
|
+
- **Nine export formats** — BibTeX, RIS, CSL JSON, EndNote (XML/Refer), RefWorks, MEDLINE, Zotero RDF, CSV, plain text.
|
|
11
|
+
- **Composable workflow** — chain `resolveIdentifier` → `formatCitation` → `exportCitation` in one prompt for an end-to-end "raw IDs → exportable bibliography" pipeline.
|
|
12
|
+
- **Provenance metadata on every response** — formatted output is followed by a metadata block (`requestId`, `formatter`, `styleUsed`, `warnings`) so the assistant can show users *which* engine produced each citation.
|
|
13
|
+
- **REST API twin** — the same RapidAPI key works against the [Scholar Sidekick REST API](https://rapidapi.com/scholar-sidekick-scholar-sidekick-api/api/scholar-sidekick) for non-MCP integrations.
|
|
4
14
|
|
|
5
15
|
## Tools
|
|
6
16
|
|
|
7
17
|
| Tool | Description |
|
|
8
18
|
| --- | --- |
|
|
9
|
-
| **resolveIdentifier** | Resolve DOIs, PMIDs, PMCIDs, ISBNs, arXiv IDs, ISSNs, ADS bibcodes to structured bibliographic metadata |
|
|
10
|
-
| **formatCitation** | Format identifiers into Vancouver, AMA, APA, IEEE, CSE, or 10,000+ CSL styles. Output as text, HTML, or JSON |
|
|
11
|
-
| **exportCitation** | Export to BibTeX, RIS, CSL JSON, EndNote (XML/Refer), RefWorks, MEDLINE, Zotero RDF, CSV, or plain text |
|
|
19
|
+
| **resolveIdentifier** | Resolve DOIs, PMIDs, PMCIDs, ISBNs, arXiv IDs, ISSNs, ADS bibcodes, and WHO IRIS URLs to structured bibliographic metadata (CSL JSON). Accepts a single identifier or a comma/newline-separated batch. |
|
|
20
|
+
| **formatCitation** | Format one or many identifiers into Vancouver, AMA, APA, IEEE, CSE, or any of 10,000+ CSL styles. Output as text, HTML, or JSON. Returns formatted citations plus a provenance metadata block. |
|
|
21
|
+
| **exportCitation** | Export one or many identifiers to BibTeX, RIS, CSL JSON, EndNote (XML/Refer), RefWorks, MEDLINE, Zotero RDF, CSV, or plain text — ready to write to disk or hand to a reference manager. |
|
|
12
22
|
|
|
13
23
|
## Setup
|
|
14
24
|
|
|
@@ -94,11 +104,22 @@ Any [CSL style ID](https://github.com/citation-style-language/styles) can be pas
|
|
|
94
104
|
|
|
95
105
|
Once connected, ask your AI assistant:
|
|
96
106
|
|
|
107
|
+
**Single identifier**
|
|
108
|
+
|
|
97
109
|
- "Format 10.1056/NEJMoa2033700 in Vancouver style"
|
|
98
110
|
- "Resolve PMID:30049270 and export as BibTeX"
|
|
99
|
-
- "Format these as APA: 10.1056/NEJMoa2033700, PMID:30049270, ISBN:9780192854087"
|
|
100
111
|
- "Give me a Chicago citation for arXiv:2301.08745"
|
|
101
112
|
|
|
113
|
+
**Batch input** (comma- or newline-separated — every tool handles it)
|
|
114
|
+
|
|
115
|
+
- "Format these as APA: 10.1056/NEJMoa2033700, PMID:30049270, ISBN:9780192854087"
|
|
116
|
+
- "Resolve all of these and tell me which are journal articles vs books: 10.1056/NEJMoa2033700, ISBN:9780192854087, PMC7793608"
|
|
117
|
+
|
|
118
|
+
**End-to-end workflow** (the assistant chains `resolveIdentifier` → `formatCitation` → `exportCitation` in one prompt)
|
|
119
|
+
|
|
120
|
+
- "Resolve these three identifiers, format each in AMA, and export the set as BibTeX: 10.1056/NEJMoa2033700, PMID:30049270, ISBN:9780192854087"
|
|
121
|
+
- "Build me a Nature-style bibliography from this list and give me a `.bib` file at the end: PMID:30049270, arXiv:2301.08745, 10.1038/s41586-021-03819-2"
|
|
122
|
+
|
|
102
123
|
## Supported Identifiers
|
|
103
124
|
|
|
104
125
|
- DOIs (e.g. `10.1056/NEJMoa2033700`)
|
|
@@ -110,6 +131,17 @@ Once connected, ask your AI assistant:
|
|
|
110
131
|
- NASA ADS bibcodes
|
|
111
132
|
- WHO IRIS URLs
|
|
112
133
|
|
|
134
|
+
## Provenance & Determinism
|
|
135
|
+
|
|
136
|
+
Every `formatCitation` and `exportCitation` response is followed by a metadata block so the assistant — and the user — can see exactly which engine produced each citation:
|
|
137
|
+
|
|
138
|
+
- `formatter` — `builtin` (one of Vancouver, AMA, APA, IEEE, CSE — hand-tuned in TypeScript) or `csl` (citeproc-js with a CSL stylesheet).
|
|
139
|
+
- `styleUsed` — the canonical style ID after alias and dependent-style resolution (e.g. asking for `harvard` resolves to `harvard-cite-them-right`).
|
|
140
|
+
- `requestId` — for support, reproducibility, and log correlation.
|
|
141
|
+
- `warnings` — populated when a fallback was used or the requested style was a dependent of another.
|
|
142
|
+
|
|
143
|
+
Identifier resolution is deterministic given the same inputs and pinned upstream metadata. Repeated identical requests are cache-hit on the underlying REST API and surface that via the `x-scholar-cache` header.
|
|
144
|
+
|
|
113
145
|
## REST API
|
|
114
146
|
|
|
115
147
|
For programmatic access outside of MCP clients, Scholar Sidekick is also available as a REST API on [RapidAPI](https://rapidapi.com/scholar-sidekick-scholar-sidekick-api/api/scholar-sidekick). Your same RapidAPI key works for both.
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -30087,6 +30087,22 @@ function errorResult(result) {
|
|
|
30087
30087
|
isError: true
|
|
30088
30088
|
};
|
|
30089
30089
|
}
|
|
30090
|
+
var MISSING_KEY_MESSAGE = [
|
|
30091
|
+
"Scholar Sidekick is not configured. Set the RAPIDAPI_KEY environment variable to use this tool.",
|
|
30092
|
+
"",
|
|
30093
|
+
"Get a free key:",
|
|
30094
|
+
" 1. Sign up at https://rapidapi.com/scholar-sidekick-scholar-sidekick-api/api/scholar-sidekick",
|
|
30095
|
+
" 2. Subscribe to the free tier and copy your RapidAPI key",
|
|
30096
|
+
" 3. Restart this MCP server with RAPIDAPI_KEY set",
|
|
30097
|
+
"",
|
|
30098
|
+
"If you installed via Claude Desktop, open the Scholar Sidekick extension settings and paste the key there."
|
|
30099
|
+
].join("\n");
|
|
30100
|
+
function missingKeyResult() {
|
|
30101
|
+
return {
|
|
30102
|
+
content: [{ type: "text", text: MISSING_KEY_MESSAGE }],
|
|
30103
|
+
isError: true
|
|
30104
|
+
};
|
|
30105
|
+
}
|
|
30090
30106
|
function buildMetadata(result) {
|
|
30091
30107
|
const meta3 = {};
|
|
30092
30108
|
if (result.requestId) meta3.requestId = result.requestId;
|
|
@@ -30104,10 +30120,11 @@ function registerExportTool(server, config2) {
|
|
|
30104
30120
|
"exportCitation",
|
|
30105
30121
|
{
|
|
30106
30122
|
title: "Export Citation",
|
|
30107
|
-
description: "Export academic citations to bibliography file formats: BibTeX (.bib), RIS, CSV, CSL-JSON, EndNote XML, EndNote Refer, RefWorks, MEDLINE/NBIB, Zotero RDF, or plain text.",
|
|
30123
|
+
description: "Export academic citations from identifiers (DOIs, PMIDs, PMCIDs, ISBNs, arXiv IDs, ISSNs, ADS bibcodes, WHO IRIS URLs) to bibliography file formats: BibTeX (.bib), RIS, CSV, CSL-JSON, EndNote XML, EndNote Refer, RefWorks, MEDLINE/NBIB, Zotero RDF, or plain text. Accepts a single identifier or a comma/newline-separated batch.",
|
|
30108
30124
|
inputSchema: ExportCitationInput
|
|
30109
30125
|
},
|
|
30110
30126
|
async (input) => {
|
|
30127
|
+
if (!config2.rapidApiKey) return missingKeyResult();
|
|
30111
30128
|
const result = await exportCitation(config2, {
|
|
30112
30129
|
text: normalizeIdentifiers(input.text),
|
|
30113
30130
|
format: input.format,
|
|
@@ -30130,10 +30147,11 @@ function registerFormatTool(server, config2) {
|
|
|
30130
30147
|
"formatCitation",
|
|
30131
30148
|
{
|
|
30132
30149
|
title: "Format Citation",
|
|
30133
|
-
description: "Format academic citations from identifiers (DOIs, PMIDs, ISBNs, arXiv IDs,
|
|
30150
|
+
description: "Format academic citations from identifiers (DOIs, PMIDs, PMCIDs, ISBNs, arXiv IDs, ISSNs, ADS bibcodes, WHO IRIS URLs) into a specific citation style. Accepts a single identifier or a comma/newline-separated batch. Returns formatted text, HTML, or structured JSON, plus a provenance metadata block (formatter, styleUsed, requestId, warnings). Supports Vancouver, AMA, APA, IEEE, CSE, and 10,000+ CSL styles.",
|
|
30134
30151
|
inputSchema: FormatCitationInput
|
|
30135
30152
|
},
|
|
30136
30153
|
async (input) => {
|
|
30154
|
+
if (!config2.rapidApiKey) return missingKeyResult();
|
|
30137
30155
|
const result = await formatCitation(config2, {
|
|
30138
30156
|
text: normalizeIdentifiers(input.text),
|
|
30139
30157
|
style: input.style ?? void 0,
|
|
@@ -30166,10 +30184,11 @@ function registerResolveTool(server, config2) {
|
|
|
30166
30184
|
"resolveIdentifier",
|
|
30167
30185
|
{
|
|
30168
30186
|
title: "Resolve Identifier",
|
|
30169
|
-
description: "Resolve academic identifiers (DOIs, PMIDs, PMCIDs, ISBNs, arXiv IDs, ISSNs, ADS bibcodes) to structured bibliographic metadata (title, authors, journal, year, identifiers, etc.) without formatting. Returns JSON objects.",
|
|
30187
|
+
description: "Resolve academic identifiers (DOIs, PMIDs, PMCIDs, ISBNs, arXiv IDs, ISSNs, ADS bibcodes, WHO IRIS URLs) to structured bibliographic metadata (title, authors, journal, year, identifiers, etc.) without formatting. Accepts a single identifier or a comma/newline-separated batch. Returns JSON objects.",
|
|
30170
30188
|
inputSchema: ResolveIdentifierInput
|
|
30171
30189
|
},
|
|
30172
30190
|
async (input) => {
|
|
30191
|
+
if (!config2.rapidApiKey) return missingKeyResult();
|
|
30173
30192
|
const result = await formatCitation(config2, {
|
|
30174
30193
|
text: normalizeIdentifiers(input.text),
|
|
30175
30194
|
output: "json"
|
|
@@ -30194,13 +30213,34 @@ function registerResolveTool(server, config2) {
|
|
|
30194
30213
|
|
|
30195
30214
|
// src/server.ts
|
|
30196
30215
|
var SERVER_NAME = "scholar-sidekick";
|
|
30197
|
-
var SERVER_VERSION = "0.
|
|
30216
|
+
var SERVER_VERSION = "0.4.1";
|
|
30217
|
+
var SERVER_INSTRUCTIONS = `Scholar Sidekick MCP turns academic identifiers into clean citations.
|
|
30218
|
+
|
|
30219
|
+
When to use this server:
|
|
30220
|
+
- The user mentions a bibliographic identifier \u2014 DOI, PMID, PMCID, ISBN, arXiv ID, ISSN, ADS bibcode, or WHO IRIS URL
|
|
30221
|
+
- The user asks to format references in a citation style (Vancouver, APA, AMA, IEEE, Chicago, Harvard, MLA, Nature, BMJ, Lancet, or any of 10,000+ CSL styles)
|
|
30222
|
+
- The user asks to export a bibliography to BibTeX, RIS, EndNote, RefWorks, MEDLINE, Zotero RDF, CSL JSON, or CSV
|
|
30223
|
+
|
|
30224
|
+
Tool selection:
|
|
30225
|
+
- resolveIdentifier \u2014 when the user wants raw structured metadata (returns CSL JSON: title, authors, journal, year, identifiers)
|
|
30226
|
+
- formatCitation \u2014 when the user wants a human-readable citation in a specific style (returns text, HTML, or JSON)
|
|
30227
|
+
- exportCitation \u2014 when the user wants a downloadable bibliography file (returns the file contents as a string)
|
|
30228
|
+
|
|
30229
|
+
Tips:
|
|
30230
|
+
- All tools accept multiple identifiers separated by newlines or commas \u2014 batch when possible to save calls
|
|
30231
|
+
- Pass identifiers verbatim. The server tolerates DOI URLs (https://doi.org/...), "PMID:" / "PMC" prefixes, "arXiv:" prefixes, and ISBN hyphens
|
|
30232
|
+
- Default style for formatCitation is Vancouver. If the user does not name a style, ask before defaulting`;
|
|
30198
30233
|
function createMcpServer(config2) {
|
|
30199
30234
|
const cfg = config2 ?? createConfig();
|
|
30200
|
-
const server = new McpServer(
|
|
30201
|
-
|
|
30202
|
-
|
|
30203
|
-
|
|
30235
|
+
const server = new McpServer(
|
|
30236
|
+
{
|
|
30237
|
+
name: SERVER_NAME,
|
|
30238
|
+
version: SERVER_VERSION
|
|
30239
|
+
},
|
|
30240
|
+
{
|
|
30241
|
+
instructions: SERVER_INSTRUCTIONS
|
|
30242
|
+
}
|
|
30243
|
+
);
|
|
30204
30244
|
registerFormatTool(server, cfg);
|
|
30205
30245
|
registerExportTool(server, cfg);
|
|
30206
30246
|
registerResolveTool(server, cfg);
|
|
@@ -30230,7 +30270,13 @@ async function checkConnection(baseUrl) {
|
|
|
30230
30270
|
}
|
|
30231
30271
|
async function main() {
|
|
30232
30272
|
const config2 = createConfig();
|
|
30233
|
-
|
|
30273
|
+
if (config2.rapidApiKey) {
|
|
30274
|
+
await checkConnection(config2.baseUrl);
|
|
30275
|
+
} else {
|
|
30276
|
+
process.stderr.write(
|
|
30277
|
+
"Scholar Sidekick MCP started without RAPIDAPI_KEY \u2014 tools will return a configuration message until a key is set. Get one at https://rapidapi.com/scholar-sidekick-scholar-sidekick-api/api/scholar-sidekick\n"
|
|
30278
|
+
);
|
|
30279
|
+
}
|
|
30234
30280
|
const server = createMcpServer(config2);
|
|
30235
30281
|
const transport = new StdioServerTransport();
|
|
30236
30282
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scholar-sidekick-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"mcpName": "io.github.mlava/scholar-sidekick-mcp",
|
|
5
|
-
"description": "MCP server for Scholar Sidekick — resolve,
|
|
5
|
+
"description": "MCP server for Scholar Sidekick — resolve any scholarly identifier (DOI, PMID, PMCID, ISBN, arXiv, ISSN, ADS, WHO IRIS) into 10,000+ CSL styles or nine export formats, single or batch.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Scholar Sidekick",
|
|
8
8
|
"repository": {
|
|
@@ -15,13 +15,24 @@
|
|
|
15
15
|
"model-context-protocol",
|
|
16
16
|
"citations",
|
|
17
17
|
"bibliography",
|
|
18
|
+
"academic",
|
|
19
|
+
"scholar",
|
|
18
20
|
"doi",
|
|
19
21
|
"pmid",
|
|
22
|
+
"pmcid",
|
|
23
|
+
"isbn",
|
|
24
|
+
"arxiv",
|
|
25
|
+
"issn",
|
|
26
|
+
"ads-bibcode",
|
|
27
|
+
"who-iris",
|
|
20
28
|
"bibtex",
|
|
21
29
|
"ris",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
30
|
+
"csl",
|
|
31
|
+
"endnote",
|
|
32
|
+
"zotero",
|
|
33
|
+
"crossref",
|
|
34
|
+
"reference-manager",
|
|
35
|
+
"claude"
|
|
25
36
|
],
|
|
26
37
|
"type": "module",
|
|
27
38
|
"engines": {
|