openalex-research-mcp 0.1.0 → 0.2.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/README.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # OpenAlex MCP Server
2
2
 
3
- A Model Context Protocol (MCP) server that provides access to OpenAlex, a comprehensive open catalog of scholarly papers, authors, institutions, and more. This server is specifically designed to empower AI assistants to conduct literature reviews, analyze research trends, and map the scholarly landscape.
3
+ A Model Context Protocol (MCP) server that provides access to OpenAlex, a comprehensive open catalog of scholarly papers, authors, institutions, and more. Designed to empower AI assistants to conduct literature reviews, analyze research trends, and map the scholarly landscape.
4
+
5
+ **Features:**
6
+ - ⚡️ **In-memory caching** with TTL for fast repeated requests
7
+ - 🔄 **Retry logic** with exponential backoff for resilient API calls
8
+ - ✅ **Input validation** with Zod schemas
9
+ - 🏥 **Health check** tool for monitoring
10
+ - 📊 **18+ specialized tools** for research
4
11
 
5
12
  ## Features
6
13
 
@@ -114,6 +121,12 @@ Add to your Claude Desktop config file:
114
121
  }
115
122
  ```
116
123
 
124
+ ### TypingMind and Other MCP Clients
125
+
126
+ The same configuration format works for TypingMind and other MCP-compatible clients.
127
+
128
+ > **⚠️ TypingMind Users**: If you encounter "tool_use_id" errors, see [TYPINGMIND.md](TYPINGMIND.md) for troubleshooting steps and best practices. **TL;DR**: Start a new chat, request fewer results (5-10), and use specific queries with filters.
129
+
117
130
  ## Usage Examples
118
131
 
119
132
  ### Example 1: Literature Review for AI Safety
@@ -122,7 +135,7 @@ Add to your Claude Desktop config file:
122
135
  Find the most influential papers on AI safety published since 2020
123
136
  ```
124
137
 
125
- The assistant will use `get_top_cited_works` with appropriate filters to find highly-cited papers in AI safety research.
138
+ The assistant will use `get_top_cited_works` with appropriate filters to find highly-cited papers in AI safety research. The tool automatically filters for papers with at least 50 citations by default, ensuring results focus on influential work. For the most impactful papers, you can specify a higher threshold like `min_citations: 200`.
126
139
 
127
140
  ### Example 2: Citation Network Analysis
128
141
 
@@ -164,6 +177,60 @@ Which countries are leading research in climate change mitigation?
164
177
 
165
178
  The assistant will use `analyze_geographic_distribution` to map research activity by country.
166
179
 
180
+ ## Response Format
181
+
182
+ The MCP server uses a **two-tier response system** to balance performance and completeness:
183
+
184
+ ### Summarized Responses (Search Results)
185
+
186
+ For list operations (`search_works`, `get_citations`, `get_author_works`, etc.), responses include only essential information:
187
+
188
+ **Included:**
189
+ - Core identifiers (ID, DOI, title)
190
+ - Publication metadata (year, date, type)
191
+ - Citation metrics (cited_by_count)
192
+ - First 5 authors (with `authors_truncated` flag if more exist)
193
+ - Primary topic classification
194
+ - Open access status and URLs
195
+ - Source/journal name
196
+ - Abstract preview (first 500 chars)
197
+
198
+ **Excluded to reduce size:**
199
+ - Full author lists beyond 5 authors
200
+ - All secondary topics/concepts
201
+ - Complete affiliation details
202
+ - Full reference lists
203
+ - Detailed bibliographic data
204
+
205
+ This optimization reduces response sizes by ~80-90% (from ~10 KB to ~1.7 KB per work), making the server compatible with all MCP clients including TypingMind and Claude Desktop.
206
+
207
+ ### Full Details (`get_work` tool)
208
+
209
+ When you need **complete information** about a specific paper, use the `get_work` tool with a work ID or DOI. This returns:
210
+
211
+ **Complete Author Information:**
212
+ - ALL authors (not just first 5)
213
+ - Position indicators (first, middle, last author)
214
+ - Institutions and affiliations
215
+ - ORCID IDs
216
+ - Corresponding author flags
217
+ - Country information
218
+
219
+ **Complete Content:**
220
+ - Full abstract (reconstructed from OpenAlex index)
221
+ - All topics (not just primary)
222
+ - Complete bibliographic data
223
+ - Funding and grant information
224
+ - Keywords
225
+ - Complete reference and citation lists
226
+
227
+ **Use Cases:**
228
+ - Identifying PIs (often last author in biomedical fields)
229
+ - Finding corresponding authors
230
+ - Getting complete author affiliations
231
+ - Accessing full abstracts
232
+ - Comprehensive paper analysis
233
+
167
234
  ## Tool Reference
168
235
 
169
236
  ### Search Parameters
@@ -0,0 +1,31 @@
1
+ export declare const CONFIG: {
2
+ API: {
3
+ BASE_URL: string;
4
+ TIMEOUT: number;
5
+ RATE_LIMIT: {
6
+ REQUESTS_PER_SECOND: number;
7
+ REQUESTS_PER_DAY: number;
8
+ };
9
+ RETRY: {
10
+ MAX_RETRIES: number;
11
+ INITIAL_DELAY_MS: number;
12
+ MAX_DELAY_MS: number;
13
+ BACKOFF_FACTOR: number;
14
+ };
15
+ };
16
+ CACHE: {
17
+ TTL_MS: number;
18
+ MAX_SIZE: number;
19
+ };
20
+ MCP: {
21
+ DEFAULT_PAGE_SIZE: number;
22
+ MAX_PAGE_SIZE: number;
23
+ MAX_AUTHORS_IN_SUMMARY: number;
24
+ MAX_ABSTRACT_LENGTH: number;
25
+ MAX_TOPICS: number;
26
+ MAX_KEYWORDS: number;
27
+ MAX_GRANTS: number;
28
+ MIN_CITATIONS_FOR_INFLUENTIAL: number;
29
+ };
30
+ };
31
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC"}
@@ -0,0 +1,31 @@
1
+ export const CONFIG = {
2
+ API: {
3
+ BASE_URL: 'https://api.openalex.org',
4
+ TIMEOUT: 30000,
5
+ RATE_LIMIT: {
6
+ REQUESTS_PER_SECOND: 10,
7
+ REQUESTS_PER_DAY: 100000,
8
+ },
9
+ RETRY: {
10
+ MAX_RETRIES: 3,
11
+ INITIAL_DELAY_MS: 1000,
12
+ MAX_DELAY_MS: 10000,
13
+ BACKOFF_FACTOR: 2,
14
+ },
15
+ },
16
+ CACHE: {
17
+ TTL_MS: 5 * 60 * 1000, // 5 minutes
18
+ MAX_SIZE: 1000,
19
+ },
20
+ MCP: {
21
+ DEFAULT_PAGE_SIZE: 10,
22
+ MAX_PAGE_SIZE: 200,
23
+ MAX_AUTHORS_IN_SUMMARY: 5,
24
+ MAX_ABSTRACT_LENGTH: 500,
25
+ MAX_TOPICS: 5,
26
+ MAX_KEYWORDS: 10,
27
+ MAX_GRANTS: 5,
28
+ MIN_CITATIONS_FOR_INFLUENTIAL: 50,
29
+ },
30
+ };
31
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE;QACH,QAAQ,EAAE,0BAA0B;QACpC,OAAO,EAAE,KAAK;QACd,UAAU,EAAE;YACV,mBAAmB,EAAE,EAAE;YACvB,gBAAgB,EAAE,MAAM;SACzB;QACD,KAAK,EAAE;YACL,WAAW,EAAE,CAAC;YACd,gBAAgB,EAAE,IAAI;YACtB,YAAY,EAAE,KAAK;YACnB,cAAc,EAAE,CAAC;SAClB;KACF;IACD,KAAK,EAAE;QACL,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,YAAY;QACnC,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,iBAAiB,EAAE,EAAE;QACrB,aAAa,EAAE,GAAG;QAClB,sBAAsB,EAAE,CAAC;QACzB,mBAAmB,EAAE,GAAG;QACxB,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,CAAC;QACb,6BAA6B,EAAE,EAAE;KAClC;CACF,CAAC"}