Daniel Bauer dec0b7702a feat: add pagination support to search_objects MCP tool
Add page_num parameter to the search_objects tool to enable pagination
control for users. This provides full pagination functionality while
maintaining backward compatibility.

Changes:
- Add page_num parameter with default value of 0 (0-based pagination)
- Update tool description to document pagination parameters
- Enhance docstring to explain page_num and clarify limit as page_size
- Add comprehensive tests for pagination scenarios
- All existing functionality remains unchanged

Users can now paginate through search results:
- search_objects("query") - first page, 20 results
- search_objects("query", limit=50) - first page, 50 results
- search_objects("query", page_num=1) - second page, 20 results
- search_objects("query", limit=10, page_num=5) - sixth page, 10 results

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 12:32:43 +02:00
2025-07-04 13:11:17 +02:00
2025-06-28 23:43:17 +02:00
2025-07-04 12:57:08 +02:00
2025-06-30 12:31:08 +02:00
2025-07-04 12:57:08 +02:00
2025-07-04 12:57:08 +02:00

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.

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

  • search_objects - Search for digital objects using a query string.

Configuration

The MCP server can be configured using environment variables with the CORDRA_ prefix:

  • 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)
  • CORDRA_MAX_SEARCH_RESULTS - Maximum search results (default: 1000)

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"
      }
    }
  }
}
Description
Languages
Python 99.4%
Dockerfile 0.6%