| name | onecite-reference-guide |
| description | AI toolkit to parse, complete, and format academic references |
| metadata | {"openclaw":{"emoji":"📌","category":"writing","subcategory":"citation","keywords":["OneCite","reference formatting","citation parser","BibTeX","metadata completion","MCP"],"source":"https://github.com/HzaCode/OneCite"}} |
OneCite Reference Guide
Overview
OneCite is an AI-powered toolkit for parsing, completing, and formatting academic references. Given incomplete or messy citation strings, it extracts structured metadata, fills in missing fields via API lookups (CrossRef, OpenAlex), and outputs clean formatted references in any style (APA, MLA, BibTeX, Chicago). Available as a Python library and MCP server for agent integration.
Installation
pip install onecite
npx @onecite/mcp-server
Reference Parsing
from onecite import parse_reference
ref = parse_reference(
"Vaswani et al. Attention Is All You Need. "
"NeurIPS 2017. arXiv:1706.03762"
)
print(ref.title)
print(ref.authors)
print(ref.year)
print(ref.venue)
print(ref.arxiv_id)
print(ref.doi)
Metadata Completion
from onecite import complete_reference
ref = complete_reference(
title="Attention Is All You Need",
)
print(f"DOI: {ref.doi}")
print(f"Authors: {', '.join(ref.authors)}")
print(f"Pages: {ref.pages}")
print(f"Volume: {ref.volume}")
print(f"Citations: {ref.citation_count}")
Format Conversion
from onecite import format_reference, parse_reference
ref = parse_reference(
"B. Kerbl et al., '3D Gaussian Splatting for Real-Time "
"Radiance Field Rendering,' SIGGRAPH 2023"
)
print(format_reference(ref, style="apa"))
print(format_reference(ref, style="bibtex"))
print(format_reference(ref, style="mla"))
print(format_reference(ref, style="chicago"))
print(format_reference(ref, style="ieee"))
Batch Processing
from onecite import process_references
raw_refs = [
"Vaswani et al. Attention Is All You Need. NeurIPS 2017",
"Devlin et al. BERT. NAACL 2019",
"Brown et al. Language Models are Few-Shot Learners. 2020",
]
results = process_references(
raw_refs,
complete=True,
format="bibtex",
deduplicate=True,
)
with open("references.bib", "w") as f:
for ref in results:
f.write(ref.formatted + "\n\n")
MCP Server Usage
{
"mcpServers": {
"onecite": {
"command": "npx",
"args": ["@onecite/mcp-server"],
"tools": [
"parse_reference",
"complete_reference",
"format_reference",
"search_paper",
"get_bibtex"
]
}
}
}
Reference Validation
from onecite import validate_references
issues = validate_references("references.bib")
for issue in issues:
print(f"[{issue.severity}] {issue.entry}: {issue.message}")
Use Cases
- Reference cleanup: Fix messy bibliographies
- Format conversion: Convert between citation styles
- Metadata completion: Fill in missing DOIs, pages, venues
- Agent integration: MCP server for AI citation workflows
- Validation: Check references for completeness and errors
References