@gonzih/research-rabbit 0.1.0
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/LICENSE +21 -0
- package/README.md +330 -0
- package/SKILL.md +109 -0
- package/dist/analysis.d.ts +12 -0
- package/dist/analysis.d.ts.map +1 -0
- package/dist/analysis.js +217 -0
- package/dist/analysis.js.map +1 -0
- package/dist/citations.d.ts +3 -0
- package/dist/citations.d.ts.map +1 -0
- package/dist/citations.js +52 -0
- package/dist/citations.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +187 -0
- package/dist/index.js.map +1 -0
- package/dist/search.d.ts +3 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +61 -0
- package/dist/search.js.map +1 -0
- package/dist/sources/arxiv.d.ts +3 -0
- package/dist/sources/arxiv.d.ts.map +1 -0
- package/dist/sources/arxiv.js +51 -0
- package/dist/sources/arxiv.js.map +1 -0
- package/dist/sources/openalex.d.ts +3 -0
- package/dist/sources/openalex.d.ts.map +1 -0
- package/dist/sources/openalex.js +47 -0
- package/dist/sources/openalex.js.map +1 -0
- package/dist/sources/pubmed.d.ts +3 -0
- package/dist/sources/pubmed.d.ts.map +1 -0
- package/dist/sources/pubmed.js +68 -0
- package/dist/sources/pubmed.js.map +1 -0
- package/dist/sources/semantic_scholar.d.ts +3 -0
- package/dist/sources/semantic_scholar.d.ts.map +1 -0
- package/dist/sources/semantic_scholar.js +38 -0
- package/dist/sources/semantic_scholar.js.map +1 -0
- package/dist/types.d.ts +51 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/llms.txt +18 -0
- package/package.json +37 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export async function searchSemanticScholar(query, limit = 10, yearFrom) {
|
|
2
|
+
const fields = 'paperId,title,authors,year,abstract,citationCount,externalIds,openAccessPdf';
|
|
3
|
+
let url = `https://api.semanticscholar.org/graph/v1/paper/search?query=${encodeURIComponent(query)}&fields=${fields}&limit=${limit}`;
|
|
4
|
+
if (yearFrom)
|
|
5
|
+
url += `&year=${yearFrom}-`;
|
|
6
|
+
try {
|
|
7
|
+
const response = await fetch(url, {
|
|
8
|
+
headers: {
|
|
9
|
+
'User-Agent': 'research-rabbit/0.1.0 (academic research tool)',
|
|
10
|
+
},
|
|
11
|
+
signal: AbortSignal.timeout(15000),
|
|
12
|
+
});
|
|
13
|
+
if (response.status === 429) {
|
|
14
|
+
console.error('Semantic Scholar rate limited');
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
if (!response.ok)
|
|
18
|
+
throw new Error(`Semantic Scholar API error: ${response.status}`);
|
|
19
|
+
const data = await response.json();
|
|
20
|
+
return (data.data || []).map(p => ({
|
|
21
|
+
id: `ss:${p.paperId}`,
|
|
22
|
+
source: 'semantic_scholar',
|
|
23
|
+
title: p.title || '',
|
|
24
|
+
authors: (p.authors || []).map(a => a.name),
|
|
25
|
+
year: p.year || 0,
|
|
26
|
+
abstract: p.abstract || '',
|
|
27
|
+
citationCount: p.citationCount ?? undefined,
|
|
28
|
+
doi: p.externalIds?.DOI,
|
|
29
|
+
url: `https://www.semanticscholar.org/paper/${p.paperId}`,
|
|
30
|
+
openAccessPdfUrl: p.openAccessPdf?.url,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error('Semantic Scholar search failed:', error instanceof Error ? error.message : error);
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=semantic_scholar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic_scholar.js","sourceRoot":"","sources":["../../src/sources/semantic_scholar.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAAa,EAAE,QAAgB,EAAE,EAAE,QAAiB;IAC9F,MAAM,MAA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AAW,EAAE,GAAG;YACvB,GAAG,EAAE,yCAAyC,CAAC,CAAC,OAAO,EAAE;YACzD,gBAAgB,EAAE,CAAC,CAAC,aAAa,EAAE,GAAG;SACvC,CAAC,CAAC,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACjG,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface Paper {
|
|
2
|
+
id: string;
|
|
3
|
+
source: 'arxiv' | 'semantic_scholar' | 'openalex' | 'pubmed' | 'crossref';
|
|
4
|
+
title: string;
|
|
5
|
+
authors: string[];
|
|
6
|
+
year: number;
|
|
7
|
+
abstract: string;
|
|
8
|
+
citationCount?: number;
|
|
9
|
+
doi?: string;
|
|
10
|
+
url: string;
|
|
11
|
+
openAccessPdfUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PaperSummary {
|
|
14
|
+
paperId: string;
|
|
15
|
+
title: string;
|
|
16
|
+
mainClaim: string;
|
|
17
|
+
methodology: string;
|
|
18
|
+
keyEvidence: string[];
|
|
19
|
+
limitations: string[];
|
|
20
|
+
relevanceToTopic: string;
|
|
21
|
+
}
|
|
22
|
+
export interface LiteratureMap {
|
|
23
|
+
consensus: string[];
|
|
24
|
+
debates: string[];
|
|
25
|
+
methodologicalTensions: string[];
|
|
26
|
+
temporalTrends: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface Gap {
|
|
29
|
+
description: string;
|
|
30
|
+
type: 'population' | 'temporal' | 'methodological' | 'geographic' | 'theoretical' | 'other';
|
|
31
|
+
confidence: 'high' | 'medium' | 'low';
|
|
32
|
+
rationale: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ArgumentScaffold {
|
|
35
|
+
thesisStatement: string;
|
|
36
|
+
supportingArguments: Array<{
|
|
37
|
+
claim: string;
|
|
38
|
+
evidence: string[];
|
|
39
|
+
paperIds: string[];
|
|
40
|
+
}>;
|
|
41
|
+
counterarguments: Array<{
|
|
42
|
+
claim: string;
|
|
43
|
+
rebuttal: string;
|
|
44
|
+
paperIds: string[];
|
|
45
|
+
}>;
|
|
46
|
+
suggestedStructure: string[];
|
|
47
|
+
}
|
|
48
|
+
export type CitationStyle = 'apa' | 'mla' | 'chicago';
|
|
49
|
+
export type SearchSource = 'arxiv' | 'semantic_scholar' | 'openalex' | 'pubmed';
|
|
50
|
+
export type SearchDepth = 'quick' | 'thorough';
|
|
51
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,GAAG,kBAAkB,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,GAAG;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,YAAY,GAAG,UAAU,GAAG,gBAAgB,GAAG,YAAY,GAAG,aAAa,GAAG,OAAO,CAAC;IAC5F,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,KAAK,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC,CAAC;IACH,gBAAgB,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC,CAAC;IACH,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,kBAAkB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAChF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/llms.txt
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# research-rabbit
|
|
2
|
+
|
|
3
|
+
MCP server for academic research. Searches ArXiv, Semantic Scholar, OpenAlex, and PubMed in parallel. Returns real papers with real abstracts. Never hallucinate citations.
|
|
4
|
+
|
|
5
|
+
## Tools
|
|
6
|
+
- search_papers: search multiple academic databases simultaneously
|
|
7
|
+
- summarize_paper: structured summary from abstract (claim, method, evidence, limitations)
|
|
8
|
+
- map_literature: identify consensus, debates, methodological tensions across papers
|
|
9
|
+
- find_gaps: identify what's NOT being studied — where original contributions live
|
|
10
|
+
- build_argument: scaffold a research argument with evidence from real papers
|
|
11
|
+
- format_citation: APA, MLA, Chicago formatting from real paper metadata
|
|
12
|
+
- search_and_summarize: all-in-one research assistant (search + summarize + map + gaps)
|
|
13
|
+
|
|
14
|
+
## Principles
|
|
15
|
+
- All papers come from real APIs
|
|
16
|
+
- Gaps marked with confidence levels (high/medium/low)
|
|
17
|
+
- Speculative analysis is labeled as such
|
|
18
|
+
- Source URLs always included for verification
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gonzih/research-rabbit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for student research — searches ArXiv, Semantic Scholar, OpenAlex, PubMed in parallel, maps literature, finds gaps, builds argument scaffolds",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Gonzih",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"research-rabbit": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"dev": "tsx src/index.ts",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"prepare": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@anthropic-ai/sdk": "^0.54.0",
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
21
|
+
"zod": "^3.22.4"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^20.0.0",
|
|
25
|
+
"tsx": "^4.0.0",
|
|
26
|
+
"typescript": "^5.0.0"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/",
|
|
30
|
+
"README.md",
|
|
31
|
+
"llms.txt",
|
|
32
|
+
"SKILL.md"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18"
|
|
36
|
+
}
|
|
37
|
+
}
|