toon-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@toon-mcpEncode {"name":"Alice","age":30} to TOON"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TOON MCP Server
A Model Context Protocol (MCP) server that provides tools for encoding and decoding TOON (Token-Oriented Object Notation).
TOON is a compact, human-readable format designed to represent JSON data using significantly fewer tokens, making it ideal for LLM prompts and context optimization.
👉 Learn more about the format at toonformat.dev
Features
This server exposes two core tools to MCP clients (specifically tested with Gemini CLI):
encode_toon: Converts JSON strings into TOON format to save tokens.decode_toon: Converts TOON formatted text back into standard JSON.
Related MCP server: TOON MCP Server
Usage
Quick Start with Gemini CLI
To use this server with the Gemini CLI, follow these steps:
Install Gemini CLI (if you haven't already):
npm install -g @google/gemini-cli@latestConfigure the MCP Server: You can register the server by creating or editing your Gemini settings file, typically located at
~/.gemini/settings.json(Global) or.gemini/settings.json(Project-local).Add the following configuration:
{ "mcpServers": { "toon": { "command": "npx", "args": ["-y", "git+https://github.com/kweinmeister/toon-mcp.git"] } } }Run Gemini CLI: Start the CLI interface. The tools should now be available to the model.
gemini
Tools
1. encode_toon
Converts JSON data into the compact TOON format.
Parameters:
Parameter | Type | Default | Description |
|
| Required | The JSON data (serialized as a string) to encode. |
|
|
| Number of spaces for indentation. |
|
|
| Delimiter for arrays/rows. Options: |
|
|
| Collapse single-key wrapper chains (e.g., |
|
|
| Maximum depth to apply key folding. |
|
|
| Array of properties to include in the output. |
Example Prompt in Gemini CLI:
"Use the encode_toon tool to convert this JSON into TOON format:
{"users": [{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}]}"
Output:
users[2]{id,name}:
1,Alice
2,Bob2. decode_toon
Parses TOON formatted text back into standard JSON.
Parameters:
Parameter | Type | Default | Description |
|
| Required | The TOON formatted string to decode. |
|
|
| Enforce strict validation (e.g., checking declared array lengths). |
|
|
| Reconstruct dotted keys into nested objects. Options: |
|
|
| Number of spaces for indentation. |
Transports
This server supports both HTTP Server-Sent Events (SSE) and Standard IO (stdio).
HTTP / SSE (Default)
Useful for remote deployments (like Cloud Run) or web-based MCP clients.
# Starts on port 8080 by default
npm start
# Custom port
npm start -- --port 3000Stdio
Used by local clients like Gemini CLI.
npm run start:stdioDevelopment
Installation
git clone https://github.com/kweinmeister/toon-mcp
cd toon-mcp
npm installTesting
Run the unit tests to ensure the server tools are functioning correctly:
npm testDebugging with MCP Inspector
You can use the MCP Inspector to inspect and test the server's tools interactively via a web interface.
npx fastmcp inspect index.tsBuilding & Linting
# Linting
npx biome check .
# Type checking
npx tsc --noEmitMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityDmaintenanceConverts JSON data to TOON (Token-Oriented Object Notation) format and back, reducing token usage by 30-60% for more efficient LLM applications.Last updated3111MIT
- Alicense-qualityDmaintenanceConverts JSON data and system prompts to and from TOON (Token-Oriented Object Notation) format, reducing token usage by 30-60% when interacting with LLMs while preserving data structure.Last updatedMIT
- AlicenseAqualityDmaintenanceEnables users to convert structured data into Token-Oriented Object Notation (TOON) to reduce LLM token usage and costs by up to 70%. It provides tools for encoding, decoding, and analyzing data formats like JSON, CSV, and XML to optimize prompt efficiency.Last updated4163MIT
- Alicense-qualityBmaintenanceMCP proxy that wraps any MCP server and transparently converts JSON responses in tools/call to TOON format — a token-efficient alternative to JSON optimized for LLMs (~40% fewer tokens).Last updated19MIT
Related MCP Connectors
Deterministic JSON repair, validate, example-gen, schema-coerce for agents. Zero LLM, sub-10ms.
Pay-per-call JSON repair + JSON Schema validation for AI agents (USDC on Base, x402).
Repair malformed JSON from LLM/agent output; optional JSON Schema coercion. Free + x402 paid.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kweinmeister/toon-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server