
Jsx Notation
io.github.SebastianMacielPublished by GitHub account SebastianMacielv0.1.6Updated Oct 24, 2026
JSXN encoder/decoder — compact notation for React/Next.js files, optimized for LLMs
Overview
Local MCP server that encodes JSX/TSX, HTML and SVG files into a compact JSXN notation and decodes it back, cutting token use for assistants reading front-end…
- What you can do
- Read a local .jsx/.tsx/.js/.ts/.html/.svg file and get its JSXN encoding
- Encode raw code strings as JSXN, in file or snippet mode, for JSX or HTML
- Decode JSXN back into JSX/TSX or HTML source
- Decode JSXN and write the result to a file, auto-detecting HTML/SVG output
- When to use it
- Useful when an assistant repeatedly reads React/Next.js components, HTML pages or SVG markup and you want to save context window space. It is a niche helper for front-end work rather than a general-purpose tool.
- Requirements
- Runs as a local stdio process started with npx from the jsx-notation npm package, so Node.js and npx must be on the PATH. No accounts, API keys or environment variables are declared. Desktop IDE or CLI clients only.
Installation
In SourceWeft
- Open Jsx Notation in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
jsx-notation
Compress React/Next.js files, HTML, and SVG by ~40% for AI assistants. An MCP server and library that converts JSX/TSX, HTML, and SVG into JSXN — a compact notation optimized for LLM token consumption.
Why
Every time an AI assistant reads your React components, HTML, or SVG files, it wastes tokens on closing tags, repeated className/class attributes, and verbose props. That's context window space that could be used for actual reasoning.
JSXN strips the redundancy while keeping the meaning:
Works for HTML too:
Works for SVG too:
Indentation replaces closing tags. .class and #id work like CSS selectors. Frequent components, props, and CSS classes get short aliases. Values with commas are quoted to avoid delimiter confusion.
Quick start: MCP server
The main use case — let your AI assistant read JSX/HTML/SVG files in compressed form.
[Install in VS Code] [Install in Cursor]
Claude Code:
That's it. Restart Claude Code and the tools will be available. No
npm installneeded —npxdownloads everything automatically.
VS Code (.vscode/mcp.json):
Add this file to your project and restart VS Code. It will detect the server on its own — no extra setup needed.
Cursor (~/.cursor/mcp.json or .cursor/mcp.json):
Just add this to your config file and restart Cursor. It will pick up the server automatically — nothing else to install.
Troubleshooting: If the server shows "No tools or prompts" with a red dot, Cursor can't find
npxin its PATH (common with nvm). Fix it by replacing"npx"with the full path — runwhich npxin your terminal and use that value (e.g."/Users/you/.nvm/versions/node/v22.22.0/bin/npx").
Windsurf (~/.codeium/windsurf/mcp_config.json):
Same format as Cursor. Add it, restart Windsurf, and it's ready.
Cline, Continue, Amazon Q, and JetBrains IDEs (IntelliJ, WebStorm, etc.) also use the same
mcpServersformat. Paste the JSON above into your MCP settings.
Zed (~/.config/zed/settings.json):
Add this inside your Zed settings file and restart. Zed uses
context_serversinstead ofmcpServers.
The server exposes four tools:
Guiding the AI
Add this to your CLAUDE.md or .cursorrules so the assistant prefers JSXN:
Library usage
For programmatic use: npm install jsx-notation — exports encode, encodeFile, encodeHTML, decode, decodeFile.
Notation reference
Elements and attributes
Patterns (JSX only)
File-level compression (encodeFile)
HTML/SVG-specific
When decoding with { format: 'html' }:
classis used instead ofclassName- All attribute values are strings (no
{expression}) - Void elements use
<br>(not<br />) - SVG elements without children use
<path ... />(XML self-closing) - Empty non-void elements use
<div></div>(not<div />) - Values with commas are quoted in props:
{key:"val, val2"}
Alias headers
Contributing
Found a bug or have an idea? Open an issue.
Disclaimer
This software is provided "as is", without warranty of any kind. See the MIT License for full terms.
JSXN is an experimental tool that compresses JSX/TSX, HTML, and SVG source code into a compact notation for use with AI/LLM systems. The encoded output is a lossy representation and may not preserve all semantic details of the original code. The author makes no guarantees about the accuracy of the encoding, the behavior of AI systems consuming JSXN output, or fitness for any particular use case.
The MCP server component reads files from your local file system. Only .jsx, .tsx, .js, .ts, .html, and .svg files are accepted, with a 10 MB size limit. You are responsible for ensuring it is configured appropriately for your environment. Use at your own risk.
License
MIT - Sebastián Maciel
Source: README.md at commit c450344
Tools
0Version history
1- v0.1.6LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts