Model Context Protocol (MCP) extension for Zed that provides ASON compression/decompression tools in the AI assistant. Reduce token usage by 20-60% for LLM interactions while maintaining 100% lossless round-trip fidelity.
- π€ AI Assistant Integration: Use ASON tools directly in Zed's AI Assistant
- π¦ Zero Configuration: Works out of the box, auto-installs dependencies
- π Auto-Update: Automatically installs and uses latest MCP server from npm
- β‘ Fast: Native Rust extension compiled to WebAssembly
compress_json- Compress JSON to ASON format (20-60% token reduction)decompress_ason- Decompress ASON back to JSON (lossless)get_compression_stats- Analyze compression metricsconfigure_compressor- Customize compression settings
- Zed Editor (latest version)
- Node.js v18+ (runtime requirement)
- Rust (only for local development)
Coming soon - pending submission to Zed extensions repository
- Open Zed
- Press
Cmd+Shift+X(Extensions) - Search for "ASON MCP Server"
- Click Install
# Clone the repository
git clone https://github.com/ason-format/zed-extension
cd zed-extension
# Install Rust dependencies and build
cargo build --release
# Install as dev extension in Zed
# In Zed: Cmd+Shift+P β "zed: install dev extension" β Select this folderOnce installed, the ASON MCP server is available in Zed's AI assistant:
Ask the assistant: "Compress this JSON using ASON"
{
"users": [
{"id": 1, "name": "Alice", "age": 25},
{"id": 2, "name": "Bob", "age": 30}
]
}
The assistant will use the compress_json tool and return:
users:[2]{id,name,age}
1|Alice|25
2|Bob|30
Ask the assistant: "Decompress this ASON to JSON"
users:[2]{id,name,age}
1|Alice|25
2|Bob|30
Returns the original JSON structure.
Ask the assistant: "Show me compression stats for this JSON"
{"data": [...]}
Returns detailed metrics:
- Original vs compressed tokens
- Byte size comparison
- Reduction percentage
After installing the extension, enable it in your Zed settings.json:
{
"context_servers": {
"ason-mcp/ason": {
"source": "extension",
"enabled": true,
"settings": {}
}
}
}The extension will automatically:
- Install
@ason-format/mcp-server@latestfrom npm - Start the MCP server using Node.js
- Make ASON tools available in the AI Assistant
No additional configuration needed!
This extension provides a thin Rust wrapper around the @ason-format/mcp-server npm package:
- Extension loads β Rust code initializes in Zed
- MCP server installs β Uses
npm_install_packageAPI to get latest version - Server starts β Executes Node.js with installed package path
- Tools available β AI assistant can use ASON compression tools
- Auto-updates β Checks and installs latest version on each launch
Zed AI Assistant
β loads
Rust Extension (WebAssembly)
β installs
@ason-format/mcp-server (npm)
β executes
Node.js + MCP Server
β provides
MCP Tools (compress/decompress/stats/configure)
β uses
@ason-format/ason (core library)
- Rust (via rustup)
- Node.js v18+
# Build the extension
cargo build --release
# Test locally in Zed
# Cmd+Shift+P β "zed: install dev extension"zed-extension/
βββ Cargo.toml # Rust dependencies (zed_extension_api, serde, schemars)
βββ extension.toml # Zed extension manifest
βββ src/
β βββ lib.rs # Extension implementation (context_server_command)
βββ scripts/
β βββ release.sh # Release automation
βββ CHANGELOG.md # Version history
βββ README.md # This file
"Compress this API response before sending to GPT"
{large JSON object}
Save 20-60% on token costs.
"Show me how much this JSON could be compressed"
{your data}
Get metrics before committing to ASON.
"Convert this to ASON format for storage"
{data to store}
Reduce database storage size.
ASON (Aliased Serialization Object Notation) is a token-optimized JSON compression format designed for LLMs.
Key Features:
- 20-60% token reduction
- 100% lossless fidelity
- Human-readable
- Multiple compression techniques
Compression Techniques:
- Sections:
@section- Organize related objects - Tabular Arrays:
key:[N]{fields}- CSV-like format for uniform arrays - Semantic References:
$var- Deduplicate repeated values - Pipe Delimiter:
|- More token-efficient than commas - Dot Notation:
user.profile.name:Alice- Flatten nested objects
Learn More:
To release a new version:
./scripts/release.sh
# 1. Select version bump (patch/minor/major)
# 2. Update CHANGELOG.md when prompted
# 3. Confirm push
# Then submit to Zed Extensions:
# https://github.com/zed-industries/extensionsMIT Β© ASON Project Contributors
Contributions welcome! Please open an issue or pull request.
- Extension: https://github.com/ason-format/zed-extension
- MCP Server: https://github.com/ason-format/mcp-server
- ASON Core: https://github.com/ason-format/ason
- Zed Extensions: https://github.com/zed-industries/extensions
- Issues: https://github.com/ason-format/zed-extension/issues