npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tonicai/textual-mcp

v0.2.0

Published

MCP server for Tonic Textual PII detection and de-identification

Downloads

117

Readme

Tonic Textual MCP Server

An MCP (Model Context Protocol) server that connects AI assistants to Tonic Textual for PII detection and de-identification. It allows Claude and other MCP-compatible clients to redact sensitive data from text, files, and entire directories.

Prerequisites

  • Node.js >= 18.0.0
  • A Tonic Textual instance (cloud or self-hosted)
  • A Tonic Textual API key (how to create one)

Installation

From npm

npm install -g @tonicai/textual-mcp

From source

git clone https://github.com/TonicAI/textual-mcp.git
cd textual-mcp
npm install
npm run build

Configuration

The server is configured via environment variables:

| Variable | Required | Default | Description | |---|---|---|---| | TONIC_TEXTUAL_API_KEY | Yes | — | Your Tonic Textual API key | | TONIC_TEXTUAL_BASE_URL | No | https://textual.tonic.ai | Base URL of your Textual instance | | PORT | No | 3000 | HTTP port for the MCP server | | TONIC_TEXTUAL_MAX_CONCURRENT_REQUESTS | No | 50 | Max concurrent requests to the Textual API |

Running the server

TONIC_TEXTUAL_API_KEY is required. For a self-hosted Textual instance, also set TONIC_TEXTUAL_BASE_URL.

Global install

# Tonic Textual cloud
TONIC_TEXTUAL_API_KEY=your-key textual-mcp

# Self-hosted instance
TONIC_TEXTUAL_API_KEY=your-key TONIC_TEXTUAL_BASE_URL=https://your-instance.example.com textual-mcp

From source

# Tonic Textual cloud
TONIC_TEXTUAL_API_KEY=your-key npm start

# Self-hosted instance
TONIC_TEXTUAL_API_KEY=your-key TONIC_TEXTUAL_BASE_URL=https://your-instance.example.com npm start

The server starts on http://localhost:3000/mcp by default. A health check endpoint is available at http://localhost:3000/health.

Adding to Claude

Note: You must start the MCP server before adding it to your Claude client. See Running the server above.

Claude Code

With the server running, register it as an HTTP transport:

claude mcp add --transport http textual-mcp http://localhost:3000/mcp

Claude Desktop

With the server running, add the following to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "textual-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

Available tools

Text redaction

| Tool | Description | |---|---| | redact_text | Redact PII from a plain text string | | redact_bulk | Redact PII from multiple text strings in one call | | redact_json | Redact PII from a JSON string, preserving structure | | redact_xml | Redact PII from an XML string, preserving structure | | redact_html | Redact PII from an HTML string, preserving structure |

All text redaction tools support:

  • generatorConfig — per-entity-type handling (e.g. {"NAME_GIVEN": "Synthesis", "US_SSN": "Redaction"})
  • generatorDefault — default handling: Redaction, Synthesis, Off, GroupingSynthesis, or ReplacementSynthesis
  • generatorMetadata — per-entity-type synthesis configuration (generator version, custom generators, deterministic swaps)
  • customEntities — custom PII entity identifiers for detection
  • labelBlockLists — regex/string patterns to exclude from detection per entity type
  • labelAllowLists — regex/string patterns to force-detect per entity type

File redaction

| Tool | Description | |---|---| | redact_file | Redact PII from a binary file (PDF, docx, xlsx, images). Uploads, polls for completion, and saves the redacted version. |

Directory redaction

| Tool | Description | |---|---| | scan_directory | Preview a directory tree before redaction (file types, sizes, counts) | | deidentify_folder | Redact an entire directory tree, preserving folder structure. Optionally redacts folder and file names. |

Dataset management

| Tool | Description | |---|---| | create_dataset | Create a new Textual dataset | | list_datasets | List all datasets | | get_dataset | Get dataset details including files and processing status | | upload_file_to_dataset | Upload a file to a dataset | | download_dataset_file | Download a redacted file from a dataset |

Job monitoring

| Tool | Description | |---|---| | list_file_jobs | List all unattached file redaction jobs with statuses | | get_file_job | Get status of a specific file redaction job | | get_job_error_logs | Download error logs for a failed job |

Reference

| Tool | Description | |---|---| | list_pii_types | List all PII entity types that Textual can detect |

Examples

Redact text

Ask Claude:

"Redact the PII from this text: John Smith lives at 123 Main St and his SSN is 456-78-9012"

Redact a PDF

"Redact all PII from /path/to/document.pdf and save it to /path/to/output.pdf"

Redact with synthesis

"Redact this text using synthesis for names and redaction for SSNs: John Smith's SSN is 456-78-9012"

Claude will call redact_text with generatorConfig: {"NAME_GIVEN": "Synthesis", "NAME_FAMILY": "Synthesis", "US_SSN": "Redaction"}.

De-identify a folder

"Scan /path/to/documents first, then de-identify the whole folder to /path/to/output, skipping any .log files"

Check job status

"List all file redaction jobs from the last hour"

Development

npm install
npm run dev     # watch mode — recompiles on changes
npm run build   # one-time build
npm start       # run the server

License

MIT