UNPKG

@futurelab-studio/latest-science-mcp

Version:

MCP Server for Scientific Paper Harvesting from arXiv and OpenAlex

28 lines (27 loc) 896 B
import { Category, PaperMetadata } from '../types/papers.js'; import { RateLimiter } from '../core/rate-limiter.js'; export declare abstract class BaseDriver { protected rateLimiter: RateLimiter; protected source: string; constructor(rateLimiter: RateLimiter, source: string); /** * List available categories/concepts for this source */ abstract listCategories(): Promise<Category[]>; /** * Fetch latest papers for a given category */ abstract fetchLatest(category: string, count: number): Promise<PaperMetadata[]>; /** * Fetch content for a specific paper by ID */ abstract fetchContent(id: string): Promise<PaperMetadata>; /** * Check rate limit before making requests */ protected checkRateLimit(): boolean; /** * Get retry after time if rate limited */ protected getRetryAfter(): number; }