Skip to main content

MCP Server for fixing and enriching BibTeX bibliography metadata

Project description

bib-enrich-mcp

An MCP (Model Context Protocol) server that fixes and enriches BibTeX bibliography files with metadata from academic sources like arXiv, DBLP, and CrossRef.

Features

  • Automatic metadata scraping from multiple sources:
    • arXiv API
    • DBLP API
    • CrossRef API
  • BibTeX parsing and writing with full field support
  • Batch processing of entire .bib files
  • MCP integration for use with AI assistants

Installation

# Install with uv tool
uv tool install bib-enrich-mcp

# Or clone and install locally
git clone https://github.com/your-username/bib-enrich-mcp.git
cd bib-enrich-mcp
uv sync

Usage

As an MCP Server

Add to your MCP client configuration:

{
  "mcpServers": {
    "bib-fix": {
      "command": "bib-enrich-mcp"
    }
  }
}

Running the Server

bib-enrich-mcp

API Documentation

MCP Tools

mcp_enrich_bib_entry

Enrich a single bibliography entry by scraping metadata from academic sources.

Parameters:

  • cite_key (required): The citation key for the entry
  • title (optional): Paper title to search for
  • arxiv_id (optional): arXiv ID (e.g., "2401.12345")
  • doi (optional): DOI of the paper

Returns: BibTeX string with enriched metadata

Example:

result = await mcp_enrich_bib_entry(
    cite_key="vaswani2017attention",
    title="Attention Is All You Need"
)

mcp_enrich_bib_file

Enrich all entries in a BibTeX file.

Parameters:

  • file_path (required): Path to the .bib file

Returns: Summary of enriched entries

Example:

result = await mcp_enrich_bib_file("/path/to/references.bib")
# Returns: "Enriched 5/10 entries in /path/to/references.bib"

Python API

You can also use the library directly in Python:

from bib_enrich_mcp.bib_parser import parse_bib_file, write_bib_file
from bib_enrich_mcp.scrapers import scrape_metadata

# Parse a bib file
entries = parse_bib_file("references.bib")

# Scrape metadata for a paper
results = await scrape_metadata(
    title="Attention Is All You Need",
    arxiv_id="1706.03762"
)

Supported Metadata Sources

Source Search by Title Search by ID Notes
arXiv ✅ (arXiv ID) Best for preprints
DBLP Best for CS conferences
CrossRef ✅ (DOI) Best for journals

Development

Running Tests

uv run pytest tests/ -v

Project Structure

bib-enrich-mcp/
├── src/bib_enrich_mcp/
│   ├── __init__.py
│   ├── bib_parser.py    # BibTeX parsing/writing
│   ├── scrapers.py      # Metadata scrapers
│   └── server.py        # MCP server
├── tests/
│   ├── test_bib_parser.py
│   ├── test_scrapers.py
│   └── test_server.py
├── pyproject.toml
└── README.md

License

MIT

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

bib_enrich_mcp-0.1.0.tar.gz (79.7 kB view details)

Uploaded Source

Built Distribution

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

bib_enrich_mcp-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bib_enrich_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 79.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.8

File hashes

Hashes for bib_enrich_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccd2fd26206cdea2e7eb23f4dc66b3f3d2e467c9ec388f459d8ae87de88099e4
MD5 9af5b8a38da9ff51adbfa6a6ffd1c573
BLAKE2b-256 c09fcc1fb6e47e711ada81ed9b0a94b566a1d53ff35474d2e940527d780d2b95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bib_enrich_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d3cd987d13cf8f125772c79390fc1b7abb6782848eef03b6e7b6d924fb78a73
MD5 387a12909041a7c311349b132702e6e3
BLAKE2b-256 78c9bdf0769aa061664d5bcaa84645ea3f44984bb8d0e4b45d0f95657bc3e21c

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