Skip to content

feat: implement MCP server and refine error handling with thiserror#20

Merged
sonesuke merged 6 commits intomainfrom
feat/mcp-server
Feb 21, 2026
Merged

feat: implement MCP server and refine error handling with thiserror#20
sonesuke merged 6 commits intomainfrom
feat/mcp-server

Conversation

@sonesuke
Copy link
Copy Markdown
Owner

@sonesuke sonesuke commented Feb 21, 2026

Summary

This PR makes arXiv-cli "AI-ready" by implementing a Model Context Protocol (MCP) server and refactoring the core layer's error handling.

Changes

  • Core Layer Refactoring: Migrated to structured error handling using thiserror and the ArxivError enum.
  • MCP Server Implementation: Implemented an MCP server using mcp-sdk-rs, exposing search_papers and fetch_paper tools.
  • CLI Integration: Added the arxiv-cli mcp subcommand.
  • E2E Tests: Added e2e/mcp.rs to verify the MCP protocol (JSON-RPC 2.0 over stdio) behaves correctly.
  • Documentation: Updated the README with MCP configuration examples and "AI-ready" branding.

Verification Results

  • All unit and E2E tests pass.
  • pre-commit (Clippy, Formatting) checks pass.
  • Ready for integration with MCP clients like Claude Desktop.

@sonesuke sonesuke merged commit 3a2d852 into main Feb 21, 2026
4 checks passed
@sonesuke sonesuke deleted the feat/mcp-server branch February 21, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants