Jsx Notation logo

Jsx Notation

Compresses JSX, HTML, and SVG for AI context, with MCP tools for reading, encoding, decoding, and writing files.

Install Jsx Notation

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "jsx-notation": {
      "command": "npx",
      "args": [
        "-y",
        "jsx-notation"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 4 tools correctly ().

Overview

The jsx-notation MCP server converts JSX, TSX, HTML, and SVG into JSXN, a compact notation designed to reduce LLM token usage. It runs through stdio with npx and exposes tools for reading supported files, encoding strings, decoding JSXN, and writing decoded output. Reach for it when an AI assistant needs source context from React, Next.js, HTML, or SVG files while preserving more context-window space. The project also provides an npm library for programmatic encoding and decoding.

Use cases

  • Reduce React source tokens before sending context to an AI assistant
  • Read JSX, HTML, or SVG files through an MCP client
  • Decode JSXN into JSX, TSX, or HTML files
  • Encode source snippets programmatically with the npm library

Key features

  • Reads JSX, TSX, JavaScript, TypeScript, HTML, and SVG files
  • Encodes raw source into compact JSXN
  • Decodes JSXN into JSX/TSX or HTML
  • Writes decoded output to files
  • Supports component, prop, and CSS class aliases
  • Handles JSX patterns including conditionals, mapped lists, and fragments

Tools4

What Jsx Notation lets your agent do. Expand a tool for its parameters.

Verified live~1.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

25/29 checks healthy over the last 112d

What it can do

From the 4 tools this server returned when we ran it.

Handles credentials · 3Read-only tools · 4
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age256 days
Maintainers1

Observed 2026-11-06 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · jsx-notation (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads253Package downloads in the last 30 days.
Last commit9mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed4Callable tools this server registers over MCP.

How Jsx Notation works

What jsx-notation does

The jsx-notation MCP server converts JSX, TSX, HTML, and SVG source into JSXN, a shorter representation intended for AI and LLM workflows. It reduces repeated closing tags, common attributes, component names, properties, and CSS classes by using indentation, selectors, aliases, and compact property syntax.

For JSX and TSX, JSXN can represent components, text, expressions, boolean properties, spreads, conditional rendering, mapped lists, fragments, imports, state declarations, refs, and other file-level constructs described by the notation reference. HTML and SVG use related syntax, with handling for HTML class attributes, SVG attributes, void elements, XML-style self-closing elements, and quoted comma-containing values.

How it works

The server communicates over MCP and exposes four operations. read_jsxn accepts a local file with a .jsx, .tsx, .js, .ts, .html, or .svg extension and returns its JSXN encoding. encode_jsxn converts source supplied as a string, using either file or snippet mode and a JSX or HTML format. decode_jsxn turns JSXN back into JSX/TSX or HTML. write_jsxn decodes JSXN and writes the result to a file, choosing HTML output automatically for .html and .svg destinations.

Alias headers can shorten recurring components, props, and CSS classes. JSXN also uses indentation in place of closing tags, CSS-like .class and #id selectors, and compact forms for expressions and control-flow patterns. When decoding as HTML, attributes become strings and class is used instead of JSX's className.

Setup and configuration

Claude Code can register it with claude mcp add jsx-notation -- npx jsx-notation. VS Code, Cursor, Windsurf, Cline, Continue, Amazon Q, and JetBrains IDEs use an mcpServers-style command configuration, while Zed uses context_servers. VS Code's example places the configuration in .vscode/mcp.json; Cursor and Windsurf use their respective MCP configuration files.

Restart the client after adding the server. If Cursor cannot find npx, use the full path returned by which npx. No environment variables are documented as required. For direct application use, install the npm package and use its exported encode, encodeFile, encodeHTML, decode, and decodeFile functions.

Tools and capabilities

The jsx-notation MCP server supports these tool workflows:

  • Read supported local source files in compact JSXN form.
  • Encode raw JSX, HTML, or related source strings.
  • Decode JSXN into JSX/TSX or HTML.
  • Write decoded output to a destination file.
  • Represent React patterns such as conditional children, mapped lists, and fragments.
  • Compress recurring component, property, and Tailwind-style class names through aliases.

A project instruction in CLAUDE.md or .cursorrules can tell an assistant to use read_jsxn when gathering context from supported files.

Limitations and notes

The jsx-notation MCP server only accepts the six documented file extensions and imposes a 10 MB file-size limit. JSXN is described as experimental and lossy, so encoded output may omit semantic details from the original code. The project does not guarantee encoding accuracy, behavior of AI systems consuming the notation, or suitability for a particular use case.

The MCP component reads files from the local file system, so its configuration determines which files the client can expose to it. HTML decoding differs from JSX decoding: values are strings, void elements use HTML syntax, SVG elements without children use XML self-closing syntax, and empty non-void elements are emitted with separate opening and closing tags. The software is provided under the MIT License without warranty.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Jsx Notation

jsx-notation is an MCP server that connects AI assistants to local JSX, TSX, HTML, and SVG files through compact JSXN representations. Its main tools read files, encode source strings, decode JSXN into JSX/TSX or HTML, and write decoded results to files. It runs with npx and supports standard MCP client configuration.

Run it with npx jsx-notation and add that command to your MCP client's server configuration. Claude Code provides a dedicated claude mcp add command, while VS Code, Cursor, Windsurf, Cline, Continue, JetBrains, and Zed use configuration files. Restart the client after adding the server.

Yes, jsx-notation works with Cursor through its mcp.json configuration. Add a server entry using the npx command and restart Cursor. If Cursor reports no tools, make sure npx is on its PATH or replace npx with the full path returned by which npx.

It reads .jsx, .tsx, .js, .ts, .html, and .svg files up to 10 MB. The read_jsxn tool returns their JSXN encoding, while other tools can encode supplied strings or decode JSXN into JSX/TSX or HTML.

No, JSXN is documented as a lossy, experimental representation. It is intended to reduce token consumption for AI context, but it may not preserve every semantic detail of the original source. The project provides no guarantee about encoding accuracy or how AI systems interpret the result.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewJsx Notation AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/jsx-notation?style=directory)](https://allmcps.com/mcp/jsx-notation)
HTML Embed
<a href="https://allmcps.com/mcp/jsx-notation"><img src="https://allmcps.com/api/badge/jsx-notation?style=directory" alt="Jsx Notation on AllMCPs" /></a>