toon-parse-mcp
An MCP server that helps AI agents reduce token usage by converting data to TOON format and stripping comments and unnecessary whitespace from code files.
README
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.