Skip to main content
Glama
haoxiangsnr

bib-enrich-mcp

by haoxiangsnr

bib-enrich-mcp

PyPI version License: MIT

Writing a paper and your .bib file is a mess? This tool lets AI automatically complete your citations — fill in missing metadata, find publication venues, add DOIs, and even discover if a preprint has been formally published.

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

Related MCP server: MCP Refchecker

Installation

# Or install with uv (Recommended)
uv tool install bib-enrich-mcp

# Install from PyPI
pip install bib-enrich-mcp

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

Quick Start

Step 1: Configure MCP Client

Add the server to your MCP client (e.g., Cherry Studio, Claude Desktop, Cursor):

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

Step 2: Enable the MCP Server

In your MCP client, enable the bib-enrich server. Look for a tools icon (usually a wrench) in the chat interface.

Step 3: Start Using

Now you can ask the AI to help with your bibliography. Example prompts:

Help me find the complete citation for: Attention Is All You Need
Enrich this BibTeX entry with arXiv ID 2401.12345
Process my references.bib file and fill in missing metadata

The AI will automatically call the appropriate tools to fetch metadata from arXiv, DBLP, and CrossRef.

Usage

As an MCP Server

Add to your MCP client configuration:

{
  "mcpServers": {
    "bib-enrich": {
      "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

Available Tools

2 tools
mcp_enrich_bib_entryC

Enrich a bibliography entry by scraping metadata.

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

Returns: BibTeX string with enriched metadata

ParametersJSON Schema
NameRequiredDescriptionDefault
doiNo
titleNo
arxiv_idNo
cite_keyYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description mentions 'scraping metadata' but does not disclose side effects like network requests, failure modes, or whether the entry is modified. No annotations are provided, so the description carries full burden but fails to inform about behavior beyond basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the purpose. The Args section is well-structured. No superfluous text, though the Returns line could be integrated. Minor improvement possible.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema and four parameters, the description covers the basic purpose and parameters but omits context like why to use scraping, error behavior, or relationship to the sibling tool. Adequate but with gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description lists each parameter with a brief explanation and an example for arxiv_id. However, it does not clarify optionality, interdependencies (e.g., if multiple identifiers are provided), or default behavior. Schema coverage is 0%, so description partially compensates but lacks completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Enrich a bibliography entry by scraping metadata,' which clearly identifies the action and resource. It implies distinction from the sibling tool 'mcp_enrich_bib_file' by focusing on a single entry. However, it does not explicitly differentiate from the sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus the sibling or when not to use it. There is no mention of prerequisites, contexts, or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mcp_enrich_bib_fileC

Enrich all entries in a BibTeX file.

Args: file_path: Path to the .bib file

Returns: Summary of enriched entries

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. However, it only states it 'enriches' entries without explaining what enrichment entails, whether the file is modified, or any side effects. The return type is mentioned but not detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with only two sentences plus an args/returns section. It is front-loaded with the purpose. However, the docstring format adds some verbosity that could be streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of a sibling tool and no annotations, the description is incomplete. It does not explain the enrichment process, potential side effects, or how the output summary is structured. The output schema exists but is not described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'file_path' is described in the docstring as 'Path to the .bib file', which is basic and adds little beyond the schema. With 0% schema description coverage, the description should provide more context, such as file format or validation rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'enrich' and the resource 'all entries in a BibTeX file'. It distinguishes itself from the sibling tool 'mcp_enrich_bib_entry' by operating on all entries rather than a single entry.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention the sibling tool or any conditions for use, leaving the agent without decision criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.1
    • First observedmcp_enrich_bib_entry
    • First observedmcp_enrich_bib_file

TDQS

B3.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one enriches a single bibliography entry by accepting specific identifiers, while the other enriches all entries in a BibTeX file. No overlap in functionality.

Naming Consistency5/5

Both tools follow a consistent naming pattern with the prefix 'mcp_enrich_bib_' followed by a specific suffix ('entry' and 'file'). The naming is uniform and predictable.

Tool Count3/5

The server has only 2 tools, which is on the low end. For a focused enrichment task, this may be acceptable, but it feels slightly under-scoped compared to typical MCP servers that often offer 3-15 tools.

Completeness3/5

The server covers the core enrichment functionality but lacks additional tools for operations like searching for entries, validating BibTeX, or undoing enrichments. The surface is minimal and may leave agents with dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers