Skip to main content
Glama

jabref-mcp

A Model Context Protocol server that lets OpenCode (and other MCP clients) work with your JabRef 5.x bibliography:

  • Search your library (title / author / year / keywords / DOI and other BibTeX fields)

  • Read full records (BibTeX + abstract) and resolve attached PDF paths, so the assistant can read and summarize papers itself

  • Add new entries through JabRef's command-line import, never by editing your .bib files

Why this shape (JabRef 5.x)

JabRef 5.x does not expose a supported HTTP read API for this project, so:

Operation

Mechanism

Search / read / list

parse your .bib file(s) locally

Add an entry

jabref --importBibtex "<bibtex>" through JabRef's command-line interface. When JabRef's single-instance/remote-operation feature is enabled, the command can be forwarded to the running instance and its currently open library.

The MCP transport is stdio: the server is launched as a local process and does not listen on a network port. JabRef's remote-operation setting is a separate JabRef feature.

Related MCP server: ResearchBrain MCP Server

Requirements

  • Python ≥ 3.10 and uv

  • JabRef 5.x installed, with jabref on PATH (or JABREF_MCP_JABREF_BIN set)

  • To add entries to an already-running JabRef instance, enable Enforce single JabRef instance (and allow remote operations) under Preferences → General. In older JabRef 5.x releases this option may be under Network.

Configuration (environment variables)

Variable

Default

Meaning

JABREF_MCP_BIB_FILES

*.bib in the working directory

Comma-separated .bib paths

JABREF_MCP_PDF_ROOT

—

Optional base dir for resolving relative attached paths

JABREF_MCP_JABREF_BIN

jabref / JabRef on PATH

JabRef executable or command prefix (e.g. flatpak-spawn --host jabref)

JABREF_MCP_IMPORT_TIMEOUT

90

Import timeout (seconds)

Run / install

From a checkout (development):

uv sync
uv run jabref-mcp

From PyPI (published releases):

uvx jabref-mcp

Before a release is published, uvx can build straight from the GitHub repo:

uvx --from git+https://github.com/ast0815/jabref-mcp jabref-mcp

Register with OpenCode

A project-level registration is already provided in opencode.jsonc (it runs uv run jabref-mcp, i.e. the code in this checkout). To use it, start OpenCode from this directory. Alternatively register globally:

opencode mcp add jabref -- uvx jabref-mcp

(Add --global to make it available in every project; then set JABREF_MCP_BIB_FILES to your real libraries.) Check the connection with opencode mcp list — it should report connected. Tools appear under tools.jabref.*.

Tools

  • list_libraries — configured libraries and entry counts

  • list_entries — overview of every entry

  • search — keyword search with field / author / year / tag filters

  • get_entry — full BibTeX + resolved attached files for a citation key

  • get_pdf — absolute paths of the PDFs attached to an entry (feed to the assistant's PDF reader for summarizing)

  • add_entry — import BibTeX via the official JabRef CLI (the only write path)

Notes

  • The server reads the .bib files; it never writes to them. Additions go through JabRef, which handles duplicate detection and library updates. add_entry returns after dispatching the import; JabRef may still require you to accept it and save the library. After saving, verify with search using stable metadata such as title, DOI, or author because JabRef may replace the submitted citation key.

  • Configured .bib files are cached, but checked for changes before every read. After JabRef saves a library, the next MCP read automatically reparses only the changed file; restarting the MCP is not required.

  • This project targets JabRef 5.x. JabRef 6.x has a different CLI/API surface and is not claimed to be supported.

Available Tools

6 tools
add_entryA

Add a new entry to the JabRef library - the ONLY supported way of adding entries.

This requests an import through JabRef's official CLI API (jabref --importBibtex), which means:

  • the entry is sent to the library that is OPEN in JabRef, with JabRef's own duplicate detection;

  • JabRef may ask you to accept the import before you save the library;

  • the .bib file is never modified by this server. Requires JabRef to be running with 'Listen to remote operation on port' enabled (Preferences -> Network), same as for the official browser extension.

Args: bibtex: a complete BibTeX entry, e.g. '@article{key, title={...}, author={...}, year={2024}}'. timeout: optional override of the import timeout in seconds.

Returns the canonical BibTeX that was sent to JabRef. A successful return confirms dispatch to JabRef, not that the entry has already been accepted and saved.

Workflow after successful dispatch:

  • Ask the user to accept and save the import in JabRef if prompted, and to confirm when the library has been saved before attempting verification.

  • Do not claim that the entry is persisted yet.

  • After the user confirms saving, verify with search using stable metadata such as title, DOI, or author, rather than relying only on the submitted citation key.

  • JabRef may replace the submitted citation key; use the key returned by search when calling get_entry or get_pdf.

  • Read tools automatically detect the saved file. Do not ask for an MCP restart.

Inputs: bibtex (required), timeout. Returns: Generic wrapper for non-object return types.

get_entryA

Get the full record for one citation key: complete BibTeX plus the resolved attached files (needed for summarization). Raises an error if the key does not exist.

Inputs: citation_key (required). Returns: Generic wrapper for non-object return types.

get_pdfA

Return the absolute file paths of the PDFs attached to an entry, so the assistant can read and summarize them. Only existing files are returned; a key with no PDF raises an error.

Inputs: citation_key (required). Returns: Generic wrapper for non-object return types.

list_entriesA

List entries in the JabRef library (citation key, authors, year, title, venue, DOI), most useful for getting an overview or picking citation keys.

Inputs: limit. Returns: Generic wrapper for non-object return types.

list_librariesA

List the configured JabRef libraries (the .bib files the server reads) with the number of parsed entries in each.

Inputs: no named parameters. Returns: Generic wrapper for non-object return types.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool has a distinct primary purpose: adding, fetching one entry, fetching PDFs, listing entries, listing libraries, and searching. The only mild overlap is between get_entry and get_pdf since get_entry already includes attached file references, but their descriptions clarify that get_pdf returns only existing PDF paths.

    Naming Consistency4/5

    Most tools follow a clear verb_noun pattern: add_entry, get_entry, get_pdf, list_entries, list_libraries. The bare verb 'search' is a minor inconsistency because it could be 'search_entries', but the naming is otherwise predictable and readable.

    Tool Count5/5

    Six tools is a well-scoped set for a reference manager server covering listing, searching, retrieval, and import. Each tool has a clear role without unnecessary duplication or bloat.

    Completeness3/5

    The server supports reading, searching, retrieving, and adding entries, which covers the core library workflow. However, there are no tools for updating or deleting entries, and library selection is implicit rather than explicit, so the surface is somewhat one-directional.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers