Ghostchars

Registre officiel Autres

Find and remove invisible Unicode: zero-width, tag smuggling, bidi, homoglyphs. Offline.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package ghostchars
Claude Code
claude mcp add ghostchars -- npx -y ghostchars@1.0.2 mcp
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "ghostchars": {
            "command": "npx",
            "args": [
                "-y",
                "ghostchars@1.0.2",
                "mcp"
            ]
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. Ghostchars
  2. What is here
  3. Quick start
  4. How the two engines stay identical
  5. Working on it
  6. Issues
  7. Licence

Ghostchars

Ghostchars finds and removes the characters that hide in text: zero-width spaces, bidi overrides, tag characters, soft hyphens, stray variation selectors, noncharacters, and the typography that reads as machine written. It runs offline. Nothing you clean leaves your machine.

This repository is the engine behind ghostchars.com and the free tools built on it. The same cleaner exists twice, in Python and in TypeScript, and one fixture file proves the two agree on every codepoint.

What is here

pathwhat it is
strip_invisible.pyThe reference engine. Stdlib only, one file. See PYTHON.md.
clean_file.py, style_report.pyDocuments (.docx, .odt, .html) and the style report, on the same engine.
web/src/engine/The TypeScript port. The website, the CLI and the MCP server run this.
cli/ghostchars on npm: a Node CLI, a stdio MCP server, and the agent skill, hook and pre-commit files.
tools/The generators for the Unicode tables and the golden fixtures, and the parity gates.
tests/The Python tests.

Quick start

npx -y ghostchars check --bar text        # the gate: exit 1 if the tree is dirty
pbpaste | npx -y ghostchars clean         # clean the clipboard
./strip_invisible.py --show draft.md      # the reference engine, no install

cli/README.md documents every command, the three bars, ghostchars.json and the agent integrations.

How the two engines stay identical

The Python engine is the specification. tools/gen_golden.py runs it over every fixture and records the findings and the cleaned output for each flag combination in web/src/engine/__fixtures__/golden.json. The TypeScript engine replays that file in its test suite, so a port that disagrees with the reference by one codepoint fails its build. The Unicode property tables the port needs are generated from the same unicodedata snapshot by tools/gen_unicode_tables.py. Two commands fail when anything drifts:

python3 tools/gen_golden.py --check
python3 tools/gen_unicode_tables.py --check

Working on it

Python 3.10 or newer for the reference engine and the tools. Node 22 or newer with pnpm for cli/ and the engine tests under web/. The tree holds its own prose to the text bar with its own CLI: ghostchars.json at the root names the surface and its pins, and npx -y ghostchars check from the root runs it.

The Mac app and the Chrome extension are built on this engine and available at ghostchars.com.

Issues

Bugs and questions about the engine or the CLI go to github.com/ghostchars/ghostchars/issues.

Licence

MIT, with the Unicode licence covering the generated character tables. See LICENSE. The npm package carries its own copy with the notices for what it bundles.

Questions fréquentes

Qu'est-ce que Ghostchars ?

Find and remove invisible Unicode: zero-width, tag smuggling, bidi, homoglyphs. Offline.

Comment installer Ghostchars ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add ghostchars -- npx -y ghostchars@1.0.2 mcp. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour Ghostchars ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

Ghostchars est-il open source ?

Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.

Qui maintient Ghostchars ?

Il est publié par ghostchars. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.