Skip to content

Conversation

@SeanLuis
Copy link

Add ASON MCP Server Extension

Description

Model Context Protocol server extension for ASON compression/decompression. Reduces JSON tokens by 20-60% for LLM interactions while maintaining 100% lossless fidelity.

Extension Details

Features

  • compress_json - Compress JSON to ASON format (20-60% token reduction)
  • decompress_ason - Decompress ASON back to JSON (lossless)
  • get_compression_stats - Analyze compression metrics without performing compression
  • configure_compressor - Customize compression settings

Use Cases

  • Reduce token costs when working with large JSON datasets
  • Optimize AI assistant context with compressed data
  • Analyze data efficiency before committing to compression
  • Store compressed data in databases or configs

Technical Details

  • Built with Rust using [email protected]
  • Compiles to WebAssembly for native Zed integration
  • Auto-installs @ason-format/mcp-server from npm using npm_install_package API
  • Executes Node.js directly with installed package path
  • Zero configuration required for end users

Testing

  • Extension compiles successfully with Rust + cargo
  • Context server starts correctly
  • MCP tools available in AI Assistant
  • Auto-installs npm dependency on first use
  • Tested locally via "zed: install dev extension"
  • README and documentation included
  • CHANGELOG maintained

Checklist

  • Added as git submodule in extensions/ason-mcp
  • Has valid extension.toml with correct metadata
  • Has Cargo.toml with proper dependencies
  • Has Rust implementation in src/lib.rs
  • Implements context_server_command method
  • Documentation is complete (README, CHANGELOG, PUBLISHING guide)
  • Follows Zed extension guidelines
  • Repository is stable and public

Links

Configuration Example

Users enable the extension in their settings.json:

{
  "context_servers": {
    "mcp-ason": {
      "source": "extension",
      "enabled": true,
      "settings": {
        "indent": 1,
        "delimiter": ",",
        "use_references": true,
        "use_dictionary": true
      }
    }
  }
}

What is ASON?

ASON (Aliased Serialization Object Notation) is a token-optimized JSON compression format designed specifically for LLMs. It uses multiple compression techniques:

  1. Uniform Arrays: [2]@id,name,age
  2. Object References: &obj0
  3. Value Dictionary: value #0
  4. Path Flattening: user.profile.name:Alice

Achieves 20-60% token reduction while maintaining 100% lossless round-trip fidelity.

@cla-bot
Copy link

cla-bot bot commented Nov 12, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @SeanLuis on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@SeanLuis
Copy link
Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Nov 12, 2025
@cla-bot
Copy link

cla-bot bot commented Nov 12, 2025

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Member

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zed-industries-bot
Copy link

Warnings
⚠️

This PR doesn't include changes to extensions.toml.

If you are creating a new extension, add a new entry to it.

If you are updating an existing extension, update the version number in the corresponding entry.

Generated by 🚫 dangerJS against 52121f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants