Skip to main content
Glama
adityak74

MCP Scholarly Server

by adityak74

search-arxiv

Search arXiv for academic articles using keywords to find relevant research papers and scholarly publications.

Instructions

Search arxiv for articles related to the given keyword.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes

Implementation Reference

  • Main handler function that orchestrates the arXiv search and result formatting.
    def search(self, keyword, max_results=10) -> List[str]: results = self.arxiv_search(keyword, max_results) return self._parse_results(results)
  • Core search logic using arxiv.Client to query arXiv API.
    def arxiv_search(self, keyword, max_results=10): search = arxiv.Search(query=keyword, max_results=max_results, sort_by=arxiv.SortCriterion.SubmittedDate) results = self.client.results(search) all_results = list(results) return all_results
  • Tool dispatch in MCP server that instantiates ArxivSearch and calls its search method.
    if name == "search-arxiv": arxiv_search = ArxivSearch() formatted_results = arxiv_search.search(keyword)
  • Tool registration in list_tools handler, including name, description, and JSON schema for input validation.
    types.Tool( name="search-arxiv", description="Search arxiv for articles related to the given keyword.", inputSchema={ "type": "object", "properties": { "keyword": {"type": "string"}, }, "required": ["keyword"], }, ),
  • Helper function to format arXiv search results into readable text strings.
    @staticmethod def _parse_results(results): formatted_results = [] for result in results: title = result.title summary = result.summary links = "||".join([link.href for link in result.links]) pdf_url = result.pdf_url article_data = "\n".join([ f"Title: {title}", f"Summary: {summary}", f"Links: {links}", f"PDF URL: {pdf_url}", ]) formatted_results.append(article_data) return formatted_results

Other Tools

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/adityak74/mcp-scholarly'

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