Skip to main content

MCP server for Cordra digital object repository

Project description

Cordra MCP Server

Cordra is a configurable digital object repository system that stores digital objects as JSON documents with associated metadata and optional binary payloads. This Model Context Protocol (MCP) server provides AI assistants with read-only access to explore and understand Cordra repositories. This allows AI systems to quickly understand the data model and schema structure of a Cordra repository and to explore digital objects and their relationships.

Example

Features

  • Read-Only Access: All operations are strictly read-only, ensuring safe exploration without risk of data modification or corruption.
  • Schema Discovery: Discover and retrieve schema definitions for each type in the repository.
  • Individual Object Retrieval: Retrieve specific digital objects by their handle identifier with complete metadata.

MCP Architecture

Resources

  • cordra://objects/{prefix}/{suffix} - Retrieve a specific object by its handle identifier
  • cordra://schemas/{schema_name} - Schema definition for a specific type.
  • cordra://design - Design document containing the overall structure and configuration of the Cordra repository.

Tools

  • get_object - Retrieve a digital object by its complete ID/handle.
    • object_id - Complete object ID (e.g., "test/abc123")
  • search_objects - Search for digital objects using a query string with pagination support.
    • query - Lucene/Solr compatible search query
    • type - Optional filter by object type
    • limit - Number of results per page (default: 25)
    • page_num - Page number to retrieve, 0-based (default: 0)
  • count_objects - Count the total number of objects matching a query.
    • query - Lucene/Solr compatible search query
    • type - Optional filter by object type

Query Syntax

CRITICAL: JSON properties MUST be prefixed with /

Correct Examples:

  • /title:*report* - Wildcard search in title field
  • /author/name:Daniel - Nested property access
  • /status:active AND /priority:high - Boolean operators
  • Use type parameter instead of including type: in query

Wrong (will fail):

  • name:John - Missing / prefix
  • author/name:Daniel - Missing leading /
  • type:Person - Use the type parameter instead

Operators: * (wildcard), ? (single char), AND, OR, NOT, "phrases"

Configuration

The MCP server can be configured using environment variables:

  • CORDRA_BASE_URL - Cordra server URL (default: https://localhost:8443)
  • CORDRA_USERNAME - Username for authentication (optional)
  • CORDRA_PASSWORD - Password for authentication (optional)
  • CORDRA_VERIFY_SSL - SSL certificate verification (default: true)
  • CORDRA_TIMEOUT - Request timeout in seconds (default: 30)
  • LOGLEVEL - Logging level (default: INFO, options: DEBUG, INFO, WARNING, ERROR, CRITICAL)

Usage

Run the MCP server:

uv run mcp-cordra

Claude Code

You can add this MCP to Claude Code by registering it in the settings of your project or creating a .mcp.json file in your workdir:

Example using the docker build:

{
  "mcpServers": {
    "cordra": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "CORDRA_BASE_URL",
        "ghcr.io/dnlbauer/cordra-mcp:latest"
      ],
      "env": {
        "CORDRA_BASE_URL": "https://cordra.example.de"
      }
    }
  }
}

Example using the python package with uvx:

{
  "mcpServers": {
    "cordra": {
      "command": "uvx",
      "args": [
        "cordra-mcp"
      ],
      "env": {
        "CORDRA_BASE_URL": "https://cordra.example.de"
      }
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cordra_mcp-1.3.2.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cordra_mcp-1.3.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file cordra_mcp-1.3.2.tar.gz.

File metadata

  • Download URL: cordra_mcp-1.3.2.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cordra_mcp-1.3.2.tar.gz
Algorithm Hash digest
SHA256 9b90a0432e99566de686188268b9787ab8a9ee10f7116eefab12666ac66e1307
MD5 236da442caf412aa857d7154a76e7e2f
BLAKE2b-256 bc7500799368a563f8695b1c87051d40883b6dce78d9f1579155ac7ca8e52feb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordra_mcp-1.3.2.tar.gz:

Publisher: ci.yml on dnlbauer/cordra-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cordra_mcp-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: cordra_mcp-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cordra_mcp-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 514fb50024b15febbc7c7fee604535895003685af4eb4e0b0cd3171e7b4ee097
MD5 039173a651b2ad0e5e98171da74c5613
BLAKE2b-256 a6d5102d87a9f381feedd5996f09a6c04548c39a5bed156557b17933c56d99c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cordra_mcp-1.3.2-py3-none-any.whl:

Publisher: ci.yml on dnlbauer/cordra-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page