# ArXiv MCP Server An implementation of the Model Context Protocol (MCP) server for interacting with the arXiv API. This server allows AI assistants to search for scientific papers, retrieve paper details, and discover the latest papers in specific categories. ## Features - **Search papers** on arXiv with complex queries - **Retrieve papers by ID** - **Discover the latest papers** in specific categories - Returns papers as structured MCP resources ## Installation 1. Clone this repository: ```bash git clone https://github.com/yourusername/arxiv-mcp-server.git cd arxiv-mcp-server ``` 2. Install dependencies: ```bash npm install ``` 3. Build the project: ```bash npm run build ``` 4. Start the server: ```bash npm start ``` ## Project Structure - `src/index.ts` - Main server implementation - `package.json` - Project dependencies and scripts - `tsconfig.json` - TypeScript configuration ## Usage with Claude Desktop 1. First, make sure you have the Claude Desktop app installed. 2. Start the ArXiv MCP server: ```bash npm start ``` 3. Edit the Claude Desktop configuration file at `~/Library/Application Support/Claude/claude_desktop_config.json` (create it if it doesn't exist): ```json { "mcpServers": { "arxiv": { "command": "node", "args": ["path/to/arxiv-mcp-server/dist/index.js"] } } } ``` 4. Restart the Claude Desktop app. 5. You can now ask Claude to use the ArXiv MCP server with queries like: - "Search for papers about quantum computing on arXiv" - "Find the latest papers in machine learning" - "Get details for arXiv paper 2104.12345" ## Available Tools ### searchArXiv Search for papers on arXiv with a custom query. Parameters: - `query` (required): Search query. Can use prefixes like 'ti:' for title, 'au:' for author - `max_results`: Maximum number of results to return (default: 10) - `sort_by`: Sort order for results (options: "relevance", "lastUpdatedDate", "submittedDate") - `sort_order`: Sort direction (options: "ascending", "descending") - `categories`: Limit results to specific arXiv categories (e.g., 'cs.AI', 'physics') ### getPaperById Retrieve a specific paper by its arXiv ID. Parameters: - `id` (required): The arXiv ID of the paper (e.g., '2101.12345') ### getLatestPapers Get the latest papers from a specific category. Parameters: - `category` (required): arXiv category (e.g., 'cs.AI', 'physics.gen-ph') - `max_results`: Maximum number of results to return (default: 10) ## License MIT ## Acknowledgments - Thank you to arXiv for use of its open access interoperability. - Built with Anthropic's Model Context Protocol.