- Home
- MCP servers
- Gallica
Gallica
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
This MCP server provides a TypeScript/Node.js implementation to access the Gallica digital library from the Bibliothèque nationale de France. It exposes a set of search tools, item metadata, IIIF image access, OCR text, and related item data through the Model Context Protocol, enabling you to integrate Gallica content into your MCP workflows. This guide walks you through practical usage, installation, and configuration steps so you can run and test the server locally or deploy it for broader access.
How to use
You connect your MCP client to the Gallica MCP server to perform document searches, retrieve item details, enumerate pages with IIIF URLs, fetch page images, and obtain OCR text. The server supports HTTP/SSE requests for development and a local STDIO mode for desktop MCP clients. Start the HTTP server for testing on a local port, or run the server in STDIO mode to integrate with clients like Claude Desktop or Cursor MCP.
How to install
Prerequisites: Node.js 18.0 or higher and npm or yarn installed on your machine.
Step-by-step commands to set up and run the server locally:
# 1) Clone or download the server repository
# (navigate to the project directory after cloning)
# 2) Install dependencies
npm install
# 3) Build the project
npm run build
# 4) Run in STDIO mode for MCP clients (recommended for local development)
npm run dev
# 5) Run the HTTP server for development (serves on port 3000 by default or as set in PORT)
npm run dev:http
Configuration and usage notes
The server can operate in two primary modes: HTTP server for MCP clients and STDIO mode for direct MCP client integration. Use the HTTP endpoint for testing and automation, or use STDIO mode to connect via standard input/output with compatible MCP clients.
Additional sections
Environment and deployment details are provided to help you tailor the server to your environment. The server exposes multiple configuration options to control base URLs, logging, timeouts, and defaults for searches.
Security considerations: When deploying publicly, ensure you protect the HTTP endpoint with appropriate authentication and restrict access to trusted clients. For local development, use localhost and avoid exposing the port to untrusted networks.
Available tools
search_by_title
Search documents by title with optional exact match and pagination controls.
search_by_author
Search documents by author with optional exact match and pagination controls.
search_by_subject
Search documents by subject or keywords with optional exact match and pagination controls.
search_by_date
Search by publication date with support for year, year-month, or full date.
search_by_document_type
Filter results by document type such as monographie, periodique, image, etc.
advanced_search
Execute complex queries using CQL syntax for advanced filtering.
natural_language_search
Perform natural language searches across all fields.
sequential_reporting
Generate multi-step, sequential reports with source management.
get_item_details
Fetch full metadata for an item by its ARK identifier.
get_item_pages
List pages of a document with IIIF URLs and text availability.
get_page_image
Provide IIIF image URLs for specific pages and sizes.
get_page_text
Retrieve OCR/text content for a specific page