Skip to main content
Glama
QIU-Guanzong

RedactRelay MCP

by QIU-Guanzong
README.md
# RedactRelay MCP

RedactRelay is a local, self-hosted Streamable HTTP MCP server for a privacy-mode incident handoff. It asks four fixed questions, applies a limited local pattern guard, returns a human-review draft, and lets the operator erase the temporary handoff. It never creates an external ticket.

This repository is prepared for the Amazon Developer Hackathon's Alexa+ **self-hosted MCP server** route. It implements MCP `2025-11-25` over Streamable HTTP. It is not an Alexa+ integration, Agent Skill, Amazon or AWS service, cloud deployment, AI model, microphone workflow, or external ticket system.

## Run locally

Requires Node.js 22–26. No package installation, API key, device, or paid service is required.

```sh
npm run build
npm run verify
npm test
npm start
```

Open `http://127.0.0.1:4174/mcp-demo.html`. The browser client negotiates with the actual local endpoint at `http://127.0.0.1:4174/mcp`.

## What the MCP server does

The local server exposes six tools:

- `start_handoff` starts a temporary four-question handoff.
- `record_final_answer` records one sanitized answer.
- `revise_final_answer` replaces a completed answer without extending the expiry or retaining revision history.
- `review_handoff` returns a human-review draft and a non-sensitive redaction summary.
- `acknowledge_redactions` records the caller's local review of affected fields.
- `clear_handoff` removes the in-memory handoff.

The service binds to loopback only, rejects foreign Host and Origin headers, and clears each handoff on request, process exit, or after 15 minutes. The pattern guard detects only a limited set of common formats; it is not comprehensive sensitive-data detection. A person must review any draft before taking an external action.

## Verify the MCP path

```sh
npm run test:mcp
npm run test:mcp:interop
npm run test:mcp:browser
```

The interoperability test drives the live loopback server through a separate Node client. The browser check uses synthetic data, confirms redaction of the example values, checks the field-specific review flow, clears the handoff, and rejects external browser requests.

`MCP_DEMO_SCRIPT.md` describes a short, synthetic-data-only walkthrough. `ARCHITECTURE.md` records the wider prototype boundary; its optional Cloud Pilot code is disabled by default and has never been validated against a live provider.

## Scope

- No live Alexa+, Amazon, AWS, model, cloud, microphone, browser persistence, or ticket-system integration is claimed.
- No production incident, customer data, or credential should be entered into this prototype.
- The included test values are synthetic and use `.invalid` email domains.

MIT licensed.