GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
作者提供的说明(英文原文)
JSXN encoder/decoder — compact notation for React/Next.js files, optimized for LLMs
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"jsx-notation": {
"command": "npx",
"args": [
"-y",
"jsx-notation"
]
}
}
}在终端中运行这条命令
claude mcp add jsx-notation -- npx -y jsx-notation粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"jsx-notation": {
"command": "npx",
"args": [
"-y",
"jsx-notation"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"jsx-notation": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"jsx-notation"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 SebastianMaciel 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.1.6)于8个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同一分类中有:GitHub, Desktop Commander, Cloudflare MCP
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
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.
[Try the live demo →](https://sebastianmaciel.github.io/jsx-notation/)
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:
// Before: 278 chars
{title} Submit
// After: 170 chars
@C Modal=M, Button=B @P onClick=k, disabled=x, isOpen=io, onClose=oc
M {io:showModal, oc:handleClose} .modal-body h2 (title) B {x:!selected, k:handleSubmit} "Submit"
Works for HTML too:
<!-- Before: 340 chars -->
Name Email Role
Alice alice@example.com Admin Bob bob@example.com User
// After: 188 chars
table.data-table thead tr th "Name" th "Email" th "Role" tbody tr td "Alice" td "alice@example.com" td "Admin" tr td "Bob" td "bob@example.com" td "User"
Works for SVG too:
<!-- Before: 306 chars -->
// After: 251 chars
svg {xmlns:http://www.w3.org/2000/svg, viewBox:0 0 24 24, fill:none, stroke:currentColor, stroke-width:2, stroke-linecap:round, stroke-linejoin:round} circle {cx:12, cy:12, r:10} line {x1:12, y1:8, x2:12, y2:12} line {x1:12, y1:16, x2:12.01, y2:16}
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.
The main use case — let your AI assistant read JSX/HTML/SVG files in compressed form.
Claude Code:
claude mcp add jsx-notation -- npx jsx-notation
That's it. Restart Claude Code and the tools will be available. No
npm installneeded —npxdownloads everything automatically.
VS Code (.vscode/mcp.json):
{
"servers": { "jsx-notation": { "command": "npx", "args": ["jsx-notation"] } } }
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):
{
"mcpServers": { "jsx-notation": { "command": "npx", "args": ["jsx-notation"] } } }
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):
{
"mcpServers": { "jsx-notation": { "command": "npx", "args": ["jsx-notation"] } } }
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):
{
"context_servers": { "jsx-notation": { "command": "npx", "args": ["jsx-notation"] } } }
Add this inside your Zed settings file and restart. Zed uses
context_serversinstead ofmcpServers.
The server exposes four tools:
| Tool | Description |
|---|---|
read_jsxn | Reads a .jsx/.tsx/.js/.ts/.html/.svg file and returns its JSXN encoding |
encode_jsxn | Encodes raw code as a string (file or snippet mode, jsx or html format) |
decode_jsxn | Decodes JSXN back to JSX/TSX or HTML (jsx or html format) |
write_jsxn | Decodes JSXN and writes the result to a file (auto-detects .html/.svg for HTML output) |
Add this to your CLAUDE.md or .cursorrules so the assistant prefers JSXN:
When you need to read .jsx, .tsx, .js, .ts, .html, or .svg files for context,
use the read_jsxn tool from the jsx-notation MCP server. It returns JSXN compact notation (~40% fewer tokens) that you understand perfectly.
For programmatic use: npm install jsx-notation — exports encode, encodeFile, encodeHTML, decode, decodeFile.
| JSX/HTML | JSXN |
|---|---|
/ | .a.b (implicit div) |
| span#x |
{title} | h2 (title) |
Hello | span "Hello" |
disabled (boolean prop) | {disabled} |
{...props} (spread) | {...props} |
| JSX | JSXN | |
|---|---|---|
{cond && } | ?cond > X | |
{a ? : } | `?a > A \ | B` |
{items.map(i => )} | *items > X | |
<>...</> | _ |
encodeFile)| Code | JSXN |
|---|---|
import { X } from 'mod' | @I mod: X |
import type { T } from 'mod' | @T mod: T |
const [x, setX] = useState(0) | @state x = 0 |
const ref = useRef(null) | @ref ref = null |
const x = expr | x = expr |
| JSX return boundary | --- |
| HTML/SVG | JSXN |
|---|---|
<!DOCTYPE html> | !DOCTYPE html |
| / (void elements) | br / img {src:...} | | class="foo bar" | .foo.bar | | (SVG self-closing) | circle {cx:12} | | font-family="system-ui, sans-serif" | font-family:"system-ui, sans-serif" |
When decoding with { format: 'html' }:
class is used instead of className{expression}) (not `)
(XML self-closing) (not ){key:"val, val2"}| Header | Purpose | Example |
|---|---|---|
@C | Component aliases | @C Button=B, Modal=M |
@P | Prop aliases | @P onClick=k, onChange=g |
@S | CSS class aliases (Tailwind) | @S items-center=ic, font-medium=fm |
Found a bug or have an idea? Open an issue.
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.
MIT - Sebastián Maciel