Skip to content

calgo-lab/redakto-app-mcp-server

Repository files navigation

redakto-app-mcp-server

An MCP (Model Context Protocol) server for the Redakto App API, providing tools for named entity recognition and pseudonymization of German text.

MCP Server Config Example

For integration with Claude Desktop or other MCP-compatible clients, add this to mcp servers related configuration file (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "Redakto": {
      "command": "npx",
      "args": ["-y", "@sksdotsauravs/redakto-app-mcp-server"],
      "env": {
        "REDAKTO_API_URL": "https://redakto.demo.calgo-lab.de"
      }
    }
  }
}

Usage with Claude Desktop

  1. Configure Claude Desktop to use this MCP server:

    • Open Claude Desktop
    • Click the menu icon (three horizontal lines) in the top left
    • Click FileSettings...
    • Go to Developer → Edit Config
    • Add the following to your claude_desktop_config.json:
    {
      "mcpServers": {
        "Redakto": {
          "command": "npx",
          "args": ["-y", "@sksdotsauravs/redakto-app-mcp-server"],
          "env": {
            "REDAKTO_API_URL": "https://redakto.demo.calgo-lab.de"
          }
        }
      }
    }
  2. Restart Claude Desktop

  3. In a new conversation, enable the MCP server by clicking the "Search and tools" icon and selecting "Redakto" and also view the list of available tools.

  4. Now you can ask Claude to process German text, such as:

    • "Detect private entities in this following text: [German text]"
    • "Extract all locations mentioned in this German article: [German text]"
    • "Extract all person names from this German document: [German text]"
    • "Generate 3 pseudonymized variants of this sensitive text: [German text]"

Overview

This MCP server allows large language models (like Claude) to access the Redakto API for German text processing. When integrated with an LLM, it enables the model to:

  • Detect named entities (persons, dates, locations, etc.) in German text
  • Generate pseudonymized versions of sensitive text
  • Support multiple NER models and entity sets
  • Process text with fine-grained or coarse entity classification

Available Tools

get_entity_set_ids

  • Returns available entity sets for processing
  • No parameters required

get_supported_model_ids

  • Returns supported NER and NER-PG models for a specific entity set
  • [GET] Query Parameters:
    • entity_set_id (required): The entity set identifier

get_entity_set_details

  • Returns detailed information about an entity set
  • [GET] Query Parameters:
    • entity_set_id (required): The entity set identifier

get_supported_model_details

  • Returns detailed information about a specific model
  • [GET] Query Parameters:
    • entity_set_id (required): The entity set identifier
    • model_id (required): The model identifier

detect_entities

  • Detects named entities in German text
  • [POST] Request Body Parameters:
    • entity_set_id (required): The entity set to use
    • model_id (required): The NER model to use
    • fine_grained (required): Enable fine-grained entity classification
    • input_texts (required): Array of German text strings to process

detect_entities_and_pseudonymize

  • Detects named entities and generates pseudonymized versions
  • [POST] Request Body Parameters:
    • entity_set_id (required): The entity set to use
    • model_id (required): The NER model to use
    • fine_grained (required): Enable fine-grained entity classification
    • input_texts (required): Array of German text strings to process
    • repeat_count (optional): Number of pseudonymized variants to generate (default: 1)

Development

Prerequisites

  • Node.js ≥ 20
  • Access to a Redakto API instance
  • REDAKTO_API_URL environment variable set

Setup

  1. Clone this repository:

    git clone https://github.com/calgo-lab/redakto-app-mcp-server.git
    cd redakto-app-mcp-server
  2. Install dependencies:

    npm install
  3. Lint the project:

    npm run lint
  4. Build the project:

    npm run build
  5. Run integration tests:

    npm test

    This will test all available tools against the Redakto API.

Changelog

1.0.0

  • Initial release with full entity detection and pseudonymization support
  • Support for multiple NER models and entity sets
  • Integration with Claude and MCP-compatible clients

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Repository for the codebase of MCP server implementation for Redakto app API

Resources

License

Stars

Watchers

Forks

Packages

No packages published