Skip to main content

A MCP server for fetching HuggingFace daily papers

Project description

HuggingFace Daily Papers MCP Server

A MCP (Model Context Protocol) server for fetching HuggingFace daily papers.

Features

  • Fetch today's, yesterday's or specific date HuggingFace papers
  • Provides paper title, authors, abstract, tags and other details
  • Includes paper links and PDF download links
  • Supports MCP tools and resource interfaces
  • Complete error handling and logging
  • Comprehensive test cases

Installation & Usage

Option 1: Direct execution with uvx (Recommended)

Install and run directly using uvx:

uvx huggingface-daily-paper-mcp

This will automatically install the package and its dependencies, then start the MCP server.

Option 2: Local development

For local development, clone the repository and install dependencies:

git clone https://github.com/huangxinping/huggingface-daily-paper-mcp.git
cd huggingface-daily-paper-mcp
uv sync

Local usage commands

Run as MCP Server (for development):

python main.py

Test Scraper Function:

python scraper.py

Run Tests:

uv run -m pytest test_mcp_server.py -v

Build Package:

uv run -m build

MCP Interface

Tools

  1. get_papers_by_date

    • Description: Get HuggingFace papers for a specific date
    • Parameters: date (YYYY-MM-DD format)
  2. get_today_papers

    • Description: Get today's HuggingFace papers
    • Parameters: None
  3. get_yesterday_papers

    • Description: Get yesterday's HuggingFace papers
    • Parameters: None

Resources

  1. papers://today

    • Today's papers JSON data
  2. papers://yesterday

    • Yesterday's papers JSON data

Project Structure

huggingface-daily-paper-mcp/
├── main.py                    # MCP server main program
├── scraper.py                 # HuggingFace papers scraper module
├── test_mcp_server.py         # MCP server test cases
├── README.md                  # Project documentation
├── .gitignore                 # Git ignore file
├── pyproject.toml             # Project configuration file
└── uv.lock                    # Dependency lock file

Tech Stack

  • Python 3.10+: Programming language
  • MCP: Model Context Protocol framework
  • Requests: HTTP request library
  • BeautifulSoup4: HTML parsing library
  • pytest: Testing framework
  • uv: Python package manager

Development Standards

  • Use uv native commands for package management
  • Follow Python PEP 8 coding standards
  • Include type hints and docstrings
  • Complete error handling and logging
  • Write unit tests to ensure code quality

Example Output

{
  "title": "Example Paper Title",
  "authors": ["Author One", "Author Two"],
  "abstract": "This is an example abstract...",
  "tags": ["machine-learning", "nlp"],
  "url": "https://huggingface.co/papers/example",
  "pdf_url": "https://arxiv.org/pdf/example.pdf",
  "scraped_at": "2024-01-01T12:00:00"
}

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

huggingface_daily_paper_mcp-0.1.0.tar.gz (70.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

huggingface_daily_paper_mcp-0.1.0-py3-none-any.whl (76.7 kB view details)

Uploaded Python 3

File details

Details for the file huggingface_daily_paper_mcp-0.1.0.tar.gz.

File metadata

File hashes

Hashes for huggingface_daily_paper_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4241cfd40045e60826248f104b90c0757071dee46244e8e65c27107b82f04794
MD5 b270da3821bbcea0383ff1c64f703225
BLAKE2b-256 cd86e48b5513c6689566a3810fb9ae05d17a18628772a28ea87ecc74877d2a63

See more details on using hashes here.

File details

Details for the file huggingface_daily_paper_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for huggingface_daily_paper_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8cf95b22e39002bf8747fc13654637ef08d110bd147caec0770c7d03ba4de5b
MD5 3cb85fec3af13f5dba2095d101c90089
BLAKE2b-256 72524f40587f09a0247bee63928a8ef850744bd1e712420ab403a9b4ace9e121

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page