This release is a pre-release and may not be stable for production use.
toon-parse MCP Server
mcp-name: io.github.ankitpal181/toon-parse-mcp
A specialized Model Context Protocol (MCP) server that optimizes token usage by converting data to TOON (Token-Oriented Object Notation) and stripping non-essential context from code files.
Overview
The toon-parse-mcp MCP server helps AI agents (like Cursor, Claude Desktop, etc.) operate more efficiently by:
- Optimizing Code Context: Stripping comments and redundant spacing from code files while preserving functional structure and docstrings.
- Data Format Conversion: Converting JSON, XML, YAML, and CSV inputs into the compact TOON format to save tokens.
- Mandatory Efficiency Protocol: A built-in resource that instructs LLMs to prioritize token-saving tools.
Features
Tools
optimize_input_context(raw_input: str): Processes raw text data (JSON/XML/CSV/YAML) and returns optimized TOON format.read_and_optimize_file(file_path: str): Reads a local code file and returns a token-optimized version (no inline comments, minimized whitespace).
Resources
protocol://mandatory-efficiency: Provides a strict system instruction prompt for LLMs to ensure they use the optimization tools correctly.
Installation
pip install toon-parse-mcp
Configuration
Cursor
- Open Cursor Settings -> MCP.
- Click "+ Add New MCP Server".
- Name:
toon-parse-mcp - Type:
command - Command:
python3 -m toon_parse_mcp.server(Ensure your environment is active or use absolute path to python)
Windsurf
- Click the hammer icon in the Cascade toolbar and select "Configure".
- Alternatively, edit
~/.codeium/windsurf/mcp_config.jsondirectly. - Add the following to the
mcpServersobject:
{
"mcpServers": {
"toon-parse-mcp": {
"command": "python3",
"args": ["-m", "toon_parse_mcp.server"]
}
}
}
Antigravity
- Open the MCP store via the "..." menu at the top right of the agent panel.
- Select "Manage MCP Servers" -> "View raw config".
- Alternatively, edit
~/.gemini/antigravity/mcp_config.jsondirectly. - Add the following to the
mcpServersobject:
{
"mcpServers": {
"toon-parse-mcp": {
"command": "python3",
"args": ["-m", "toon_parse_mcp.server"]
}
}
}
Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"toon-parse-mcp": {
"command": "python3",
"args": ["-m", "toon_parse_mcp.server"]
}
}
}
Usage
When the server is active, the AI will have access to the optimize_input_context and read_and_optimize_file tools. You can also refer to the efficiency protocol by asking the AI to "check the mandatory efficiency protocol".
Testing
To run the test suite:
- Install test dependencies:
pip install -e ".[test]"
- Run tests:
pytest tests/
Requirements
- Python >= 3.10
mcp>= 1.25.0toon-parse>= 2.4.3
License
MIT License - see LICENSE for details.
Release files for toon-parse-mcp 1.0.4b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toon_parse_mcp-1.0.4b0.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toon_parse_mcp-1.0.4b0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / toon_parse_mcp-1.0.4b0.tar.gz
| Download URL | toon_parse_mcp-1.0.4b0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16b15daeb065e0062721b933c6fa8cde5541dc2cc87803eb5301f4dbe1a687d1
|
|
BLAKE2b-256 checksum How to use checksums |
015e36a8ccf522345ff4b23fb57aa6a79fed36999dcf2581a56062f5eb8c8552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.17
|
Release files / toon_parse_mcp-1.0.4b0-py3-none-any.whl
| Download URL | toon_parse_mcp-1.0.4b0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a53b2dea1017f3375e86f96cd6ce42968e9977abea6801cbf7353a27f3c215ee
|
|
BLAKE2b-256 checksum How to use checksums |
b96d89d55ee8c76d6dde9e9217d97e8a5635e7611ae044879d0abd34267b7d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.17
|