Skip to main content

Redaction-MCP

Introduction

Redaction-MCP is a document redaction that can be used for Sensitive Data Redaction and Sensitive Data Replacement capabilities for a wide range of documents.

It is primarily designed to be used by AI agents via MCP adapters to provide document redaction and scrubbing capabilities to intelligent document processing systems using AI agents or agentic workflows.

Scope of the project

This project is aimed to be made into a full-fledged document "Sensitive Data Protection" MCP suite focused on inspection, de-identification and de-sensitization of documents. It will support various document formats such as PDF, PPT, DOCX, TXT, etc. The scope of this MCP server is to provide SDP functionalities to the AI agents and Agentic workflows.

ALso, A VERY IMPROTANT NOTE is that while this project is quite good at providing said capabilities to AI agents, but when talking about production-scenario, organisations often require much specific and customized capabilities which is out of scope of this project.

If you are going to build a SDP tool-set or suite of enterprise level, I would suggest creating a custom capabilities pipeline, as they often see a lot more success than generic SDP suites.

Requirements

  • Python 3.12 or newer
  • uv (recommended) or a Python environment with the dependencies installed

How to run the server

There are two methods exposed for MCP server - STDIO and HTTP modes.

MCP over STDIO

Use this when an MCP client launches Redaction-MCP as a local subprocess:

uv run redaction-mcp-stdio

For example, an MCP client command can use:

{
  "command": "uv",
  "args": ["run", "--directory", "/absolute/path/to/redaction-mcp", "redaction-mcp-stdio"]
}

The server provides one tool, redact, with the same request and response schema as the FastAPI API.

MCP over HTTP

Start the streamable HTTP MCP server:

uv run redaction-mcp-http

It listens on 127.0.0.1:8000 by default and exposes MCP at /mcp. Configure the bind address or port with MCP_HOST and MCP_PORT:

MCP_HOST=0.0.0.0 MCP_PORT=8000 uv run redaction-mcp-http

Development setup

Install the application and development dependencies:

uv sync --extra dev

Run the test suite:

uv run python -m pytest --cov=src --cov-report=html

Start the Fast API server on port 8080:

uv run redaction-fastapi

- or -

python -m uvicorn src.server.main:app --port 8080

Once running, interactive OpenAPI documentation is available at http://127.0.0.1:8080/docs.

Endpoints:

Method Path Purpose
GET /health Liveness check, returning {"status":"ok"}.
POST /redact Redact a PDF and return the result as base64.
  • Note - Also check DEVELOPMENT.md for more information on the porject development.

Questions?

  • If you have any questions or need any improvements/bug fixes, please raise a new GitHub issue stating the context.
  • I'll try to follow up as soon as I can, but it may still be not very fast for some people. Please gimme time, me slow :)

Happy Coding!!!

Metadata

Release files for redaction-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redaction-mcp 0.1.1
File Size Uploaded
redaction_mcp-0.1.1.tar.gz 27.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for redaction-mcp 0.1.1
File Interpreter ABI Platform
redaction_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 59.6 kB

Release files / redaction_mcp-0.1.1.tar.gz

Download URL redaction_mcp-0.1.1.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d43efd2cf1bb18eb1d78da0196717396b770d67d63199cf846b480c1ce237426
BLAKE2b-256 checksum
How to use checksums
c9b452304c998673d022f479e330a97aba37312c771c610f3440fa6cbafec8cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / redaction_mcp-0.1.1-py3-none-any.whl

Download URL redaction_mcp-0.1.1-py3-none-any.whl
Size 31.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6c0641a13f5fa4939a36bcbd1a6fd2aa737fa3b1b2142b0876f6e0a26a84a30
BLAKE2b-256 checksum
How to use checksums
94a331d3807c356e094d36b49ba047709091a0dc1f2370c6bc6ad7a12178d38c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page