Skip to main content
Glama

search_biorxiv

Search the bioRxiv preprint server for biology papers using queries, date ranges, and category filters to find relevant research.

Instructions

Search bioRxiv preprint server for biology papers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string
maxResultsNoMaximum number of results to return
daysNoNumber of days to search back (default: 30)
categoryNoCategory filter (e.g., neuroscience, genomics)

Implementation Reference

  • Registers the 'search_biorxiv' MCP tool with name, description, and input schema definition.
    { name: 'search_biorxiv', description: 'Search bioRxiv preprint server for biology papers', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query string' }, maxResults: { type: 'number', minimum: 1, maximum: 100, description: 'Maximum number of results to return' }, days: { type: 'number', description: 'Number of days to search back (default: 30)' }, category: { type: 'string', description: 'Category filter (e.g., neuroscience, genomics)' } }, required: ['query'] } },
  • Zod schema definition for validating input arguments to the search_biorxiv tool.
    export const SearchBioRxivSchema = z .object({ query: z.string().min(1), maxResults: z.number().int().min(1).max(100).optional().default(10), days: z.number().int().min(1).max(3650).optional(), category: z.string().optional() }) .strip();
  • MCP tool call handler that parses arguments using schema and delegates to BioRxivSearcher.search method.
    case 'search_biorxiv': { const { query, maxResults, days, category } = args; const results = await searchers.biorxiv.search(query, { maxResults, days, category }); return jsonTextResponse( `Found ${results.length} bioRxiv papers.\n\n${JSON.stringify( results.map((paper: Paper) => PaperFactory.toDict(paper)), null, 2 )}` ); }
  • Initializes and registers the BioRxivSearcher instance as searchers.biorxiv for use in tool handlers.
    const biorxivSearcher = new BioRxivSearcher('biorxiv'); const medrxivSearcher = new MedRxivSearcher(); const semanticSearcher = new SemanticScholarSearcher(process.env.SEMANTIC_SCHOLAR_API_KEY);
  • Core implementation of the search logic: constructs API request to bioRxiv based on date range and category, fetches results, parses into Paper objects.
    async search(query: string, options: BioRxivSearchOptions = {}): Promise<Paper[]> { try { // 计算日期范围 const days = options.days || 30; const endDate = new Date().toISOString().split('T')[0]; const startDate = new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString().split('T')[0]; // 构建搜索URL const searchUrl = `${this.baseUrl}/${startDate}/${endDate}`; const params: Record<string, any> = { cursor: 0 }; // 添加分类过滤 if (query && query !== '*') { // 将查询转换为分类格式 const category = query.toLowerCase().replace(/\s+/g, '_'); params.category = category; } logDebug(`${this.serverType} API Request: GET ${searchUrl}`); logDebug(`${this.serverType} Request params:`, params); const response = await axios.get(searchUrl, { params, timeout: TIMEOUTS.DEFAULT, headers: { 'User-Agent': USER_AGENT } }); logDebug(`${this.serverType} API Response: ${response.status} ${response.statusText}`); const papers = this.parseSearchResponse(response.data, query, options); logDebug(`${this.serverType} Parsed ${papers.length} papers`); return papers.slice(0, options.maxResults || 10); } catch (error: any) { logDebug(`${this.serverType} Search Error:`, error.message); this.handleHttpError(error, 'search'); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dianel555/paper-search-mcp-nodejs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server