Skip to main content
Glama
geheharidas

Primo MCP Server

by geheharidas

primo-mcp-server

MCP server for Ex Libris Primo library discovery -- search university catalogues and subscribed databases (ProQuest, Elsevier, Crossref, Gale, Springer, IEEE, etc.) via the Model Context Protocol.

Features

  • Search the full university catalogue and Primo Central Index (millions of records)

  • Get record details including abstract, authors, identifiers, and availability

  • Autocomplete search suggestions

  • Generate citations in APA 7th, Harvard, Chicago, IEEE, and Vancouver styles

  • Export to BibTeX, RIS, or CSV for import into reference managers

Related MCP server: academic-search-mcp

Installation

git clone https://github.com/geheharidas/primo-mcp-server.git
cd primo-mcp-server
pip install -e .

Register in Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "primo": {
      "command": "python",
      "args": ["-m", "primo_mcp_server"]
    }
  }
}

Restart Claude Code. The tools will appear as mcp__primo__primo_search, etc.

Tools

Tool

Description

primo_search

Search the library catalogue with filters (type, date, peer-reviewed)

primo_get_record

Get full details for a record by ID

primo_suggest

Autocomplete search suggestions

primo_cite

Generate formatted citations (APA7, Harvard, Chicago, IEEE, Vancouver)

primo_export

Export records as BibTeX, RIS, or CSV

Usage Examples

From a Claude Code conversation:

  • "Search the library for articles about machine learning in entrepreneurship published after 2020"

  • "Get the full details for record cdi_crossref_primary_10_1234"

  • "Generate APA7 citations for these records"

  • "Export the search results as BibTeX"

Configuration

Defaults are set for UWA (University of Western Australia). Override via environment variables:

Variable

Default

Description

PRIMO_BASE_URL

https://onesearch.library.uwa.edu.au/primaws/rest/pub

Primo API base URL

PRIMO_VID

61UWA_INST:NDE_UWA

Primo View ID

PRIMO_INSTITUTION_NAME

UWA

Display name

PRIMO_REQUEST_TIMEOUT

30.0

HTTP timeout in seconds

PRIMO_MAX_RESULTS_PER_REQUEST

50

Maximum results per search

PRIMO_DEFAULT_RESULTS

10

Default results per search

See .env.example for the full list.

Running Tests

pip install -e ".[dev]"
pytest tests/ -v

Licence

MIT

Available Tools

5 tools
primo_citeA

Generate formatted citations for library records.

Args: record_ids: List of Primo record IDs to cite. style: Citation style -- "apa7" (default), "harvard", "chicago", "ieee", "vancouver".

Returns: Formatted citations. Note: always verify generated citations before submission.

ParametersJSON Schema
NameRequiredDescriptionDefault
styleNoapa7
record_idsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/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. It does not mention whether the tool is read-only, requires authentication, has rate limits, or makes external calls. The note about verifying citations implies potential inaccuracies but is insufficient.

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

Conciseness5/5

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

The description is concise and well-structured with clear Args and Returns sections. Every sentence serves a purpose, and the note about verification is valuable. No unnecessary information.

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?

While the description covers the core functionality, it lacks context about the tool's integration with Primo, limits on record IDs, or performance considerations. The presence of an output schema reduces the need to describe return values, but more guidance on usage context would improve completeness.

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

Parameters4/5

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

The description explains both parameters in the Args section: record IDs are 'Primo record IDs' and style lists five options with apa7 as default. This adds significant meaning beyond the schema's type and default values, especially given 0% schema description coverage.

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 tool's purpose: 'Generate formatted citations for library records.' It specifies inputs (record IDs and style) and output (formatted citations), and distinguishes from sibling tools like search, export, and suggest.

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 lacks guidance on when to use this tool versus alternatives like primo_search or primo_export. It does not mention prerequisites, context, or when not to use it. The note to verify citations hints at caution but does not provide usage rules.

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

primo_exportA

Export library records to reference manager formats.

Args: record_ids: List of Primo record IDs to export. format: Export format -- "bibtex" (default), "ris", "csv".

Returns: Formatted export data ready for import into reference managers (Zotero, Mendeley, EndNote).

ParametersJSON Schema
NameRequiredDescriptionDefault
formatNobibtex
record_idsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description should fully disclose behavioral traits. It describes the export operation and return format but does not mention that it is read-only, has no side effects, or any error handling behavior. The transparency is adequate for a simple export tool but could be improved.

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

Conciseness5/5

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

The description is very concise, using a structured docstring format with Args and Returns sections. Every sentence adds value, and there is no fluff. It is well-organized and easy to parse.

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

Completeness4/5

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

Given the tool's simplicity (2 parameters, output schema present), the description covers purpose, parameters, and return value. However, it lacks information on error handling or prerequisites. Overall, it is fairly complete for a straightforward export tool.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must add parameter meaning. It clearly explains both parameters: record_ids as a list of Primo record IDs and format with possible values and default. This adds value beyond the schema titles.

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 clearly states the tool exports library records to reference manager formats. The verb 'Export' and resource 'library records' are specific. Although it does not explicitly differentiate from siblings like 'primo_search' or 'primo_cite', the purpose is distinct enough to be clear.

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

Usage Guidelines3/5

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

The description does not provide explicit guidance on when to use this tool versus alternatives. It only states what it does, leaving usage context implied. No exclusions or when-not-to-use scenarios are mentioned.

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

primo_get_recordA

Get full details for a single library record.

Use the record ID from primo_search results to fetch complete metadata including abstract, all authors, subjects, identifiers, and availability.

Args: record_id: The Primo record ID (from search results, e.g. "alma991234567890" or "cdi_crossref_primary_10_1234").

Returns: Full record details including title, authors, abstract, identifiers, and availability.

ParametersJSON Schema
NameRequiredDescriptionDefault
record_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It states it returns full record details and lists included fields, which implies a read-only operation. However, it does not explicitly confirm safety (e.g., 'no side effects') or potential restrictions.

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

Conciseness5/5

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

The description is concise and well-structured: a brief purpose sentence, usage context, and clearly labeled Args/Returns sections. No redundant information.

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

Completeness5/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, the description complements it by listing key return fields (title, authors, abstract, etc.). The tool is simple (single required parameter), and the description covers all needed context for an agent to use it correctly.

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

Parameters4/5

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

The description adds significant context to the record_id parameter beyond the schema: it explains it comes from search results and provides examples (e.g., 'alma991234567890'). Schema coverage is 0%, so the description compensates well.

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 tool's purpose: 'Get full details for a single library record.' It specifies the verb (Get), resource (library record), and scope (full details). It distinguishes from sibling tools like primo_search, which returns multiple records.

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

Usage Guidelines4/5

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

The description provides clear guidance on when to use: after primo_search, using the record ID. It includes an example format. However, it does not explicitly state when not to use or mention alternatives for similar tasks.

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

primo_suggestA

Get autocomplete suggestions for a search term.

Useful for refining searches, checking subject headings, or exploring related terms before running a full search.

Args: query: Partial search term (e.g. "entrepre" or "machine lear").

Returns: List of suggested search terms.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It describes the tool as getting suggestions (a read operation) and returns a list of terms. There is no mention of side effects, rate limits, or destructive actions, which is acceptable for an autocomplete tool.

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

Conciseness5/5

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

The description is concise with clear sections (Args and Returns). Every sentence adds value without redundancy. It is front-loaded with the core purpose.

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

Completeness5/5

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

Given the tool has only one parameter and an output schema exists, the description is complete. It explains input and output sufficiently, leaving no ambiguity for correct invocation.

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

Parameters4/5

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

Schema coverage is 0%, but the description adds significant value by explaining that 'query' is a partial search term and provides examples (e.g., 'entrepre'). This compensates for the lack of documentation in the schema.

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 tool gets autocomplete suggestions for a search term, and distinguishes it from siblings like primo_search (full search) and primo_get_record (specific record retrieval). It lists specific uses: refining searches, checking subject headings, and exploring related terms.

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

Usage Guidelines4/5

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

The description explicitly states it is useful before running a full search, implying when to use it. While it does not explicitly state when not to use it or mention alternatives, the sibling tool 'primo_search' provides a clear contrast for full search scenarios.

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. 5 tool updatesv0.1.0
    • First observedprimo_cite
    • First observedprimo_export
    • First observedprimo_get_record
    • First observedprimo_search
    • First observedprimo_suggest

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a distinct purpose: search, get details, cite, export, and suggest. No overlapping functionality.

Naming Consistency5/5

All tool names follow a consistent 'primo_verb' pattern, making them predictable and easy to distinguish.

Tool Count5/5

5 tools cover the core library catalog operations without being excessive or insufficient.

Completeness5/5

The set covers search, retrieval, citation, export, and suggestion, which are the key interactions for a library catalog.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Comprehensive MCP server for academic research workflows, enabling paper searching across multiple sources, manuscript processing with citation placeholders, search caching, and citation export.
    11
    MIT
  • F
    license
    Not graded
    quality
    F
    maintenance
    An MCP server that searches library catalogs worldwide using the SRU protocol, enabling bibliographic search without API keys.
    -
  • A
    license
    A
    quality
    A
    maintenance
    An MCP server for academic literature research that integrates Scopus, CrossRef, OpenAlex, and Unpaywall to search documents, get abstracts, author profiles, citing papers, and open-access PDF links.
    9
    MIT