OneCite MCP Server: Academic Reference Generator
Generate citations with the MCP server from DOI, arXiv, title or URL in BibTeX/APA/MLA, with 7+ literature types, 10+ databases and smart metadata.
Overview
OneCite MCP Server is a lightweight Model Context Protocol (MCP) service that turns messy reference snippets into canonical academic citations. Feed it a DOI, arXiv ID, URL, title, ISBN, or plain text query and it returns structured metadata and formatted references (BibTeX, APA, MLA, and more). The server wraps OneCite’s resolution pipeline into an HTTP/MCP endpoint so other tools — language models, notebooks, CI pipelines, or editor extensions — can request citations programmatically.
The server focuses on reliability and metadata quality: it queries multiple scholarly databases, merges matches, fills missing fields, and validates identifiers so outputs are consistent and ready for LaTeX, reference managers, or downstream NLP workflows.
Features
- Fuzzy matching across multiple scholarly sources (DOI, arXiv, title, URL, ISBN, PMID)
- Outputs: BibTeX, APA, MLA, and raw structured JSON
- Handles 7+ literature types (journal article, conference paper, book, thesis, dataset, software, preprint)
- Intelligent field completion (journal, volume, pages, authors, publisher, year)
- Multi-source lookup: CrossRef, arXiv, OpenAlex, Semantic Scholar, PubMed, DataCite, Zenodo, Google Books, dblp
- 4-stage resolution pipeline: clean → query → validate → format
- Interactive disambiguation mode (when multiple matches are plausible)
- Configurable templates and fallback BibTeX types via YAML
- Simple MCP-compatible HTTP API for integration with LLMs and agent frameworks
Installation / Configuration
Install from PyPI:
Run a local MCP server (example):
# start a basic server on port 8080
Environment variables (examples):
# optional API keys to improve coverage
Example YAML config (onecite-config.yaml):
server:
host: 0.0.0.0
port: 8080
sources:
priority:
templates:
default_bibtype: article
interactive: true
Start using a specific config:
Available Resources
The MCP server consults multiple public scholarly APIs and resources to maximize match quality:
- CrossRef (DOI metadata)
- arXiv (preprints and identifiers)
- OpenAlex (disambiguation and alternate identifiers)
- Semantic Scholar (citation graphs, abstracts)
- PubMed / Entrez (biomedical metadata)
- DataCite (datasets)
- Zenodo (software/dataset DOIs)
- Google Books (book metadata and ISBN)
- dblp (computer science metadata)
API (MCP) Examples
Minimal JSON request (POST /mcp/generate):
Example request using a title:
Example JSON response (structured):
Options supported in requests:
- format: bibtex | apa | mla | json
- prefer_source: list or single (e.g., [“arxiv”,“crossref”])
- interactive: true/false — if true, server returns candidate list for manual selection
- force_type: override detected bibtex type
Use Cases
- Bulk-convert a messy text file of DOIs, arXiv IDs and titles into a clean .bib for LaTeX.
- Let an LLM ask the MCP server for citation metadata during content generation (structured context for claims).
- CI pipeline: automatically validate and normalize references before publishing documentation or papers.
- Editor integration: “select text → generate citation” using an HTTP call to the local MCP server.
- Data enrichment: populate missing DOI/ISBN fields in institutional repositories.
Concrete example — batch CLI:
# convert a text file of mixed identifiers to a .bib file
Links & Resources
- GitHub: https://github.com/HzaCode/OneCite
- Documentation / Examples: (see repo README and docs directory)
- Recommended: export contact/email env vars for CrossRef/OpenAlex to reduce rate-limiting
Contributions and bug reports are handled via the GitHub repository. The MCP server is intended to