{
  "markdown": "# toon-parse MCP Server\n\nmcp-name: io.github.ankitpal181/toon-parse-mcp\n\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io/)\n[![PyPI version](https://badge.fury.io/py/toon-parse-mcp.svg)](https://badge.fury.io/py/toon-parse-mcp)\n\nA specialized [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that optimizes token usage by converting data to TOON (Token-Oriented Object Notation) and stripping non-essential context from code files.\n\n## Overview\n\nThe `toon-parse-mcp` MCP server helps AI agents (like Cursor, Claude Desktop, etc.) operate more efficiently by:\n1.  **Optimizing Code Context**: Stripping comments and redundant spacing from code files while preserving functional structure and docstrings.\n2.  **Data Format Conversion**: Converting JSON, XML, YAML, and CSV inputs into the compact TOON format to save tokens.\n3.  **Mandatory Efficiency Protocol**: A built-in resource that instructs LLMs to prioritize token-saving tools.\n\n## Features\n\n### Tools\n- `optimize_input_context(raw_input: str)`: Processes raw text data (JSON/XML/CSV/YAML) and returns optimized TOON format.\n- `read_and_optimize_file(file_path: str)`: Reads a local code file and returns a token-optimized version (no inline comments, minimized whitespace).\n\n### Resources\n- `protocol://mandatory-efficiency`: Provides a strict system instruction prompt for LLMs to ensure they use the optimization tools correctly.\n\n## Installation\n\n```bash\npip install toon-parse-mcp\n```\n\n## Configuration\n\n### Cursor\n\n1. Open Cursor Settings -> MCP.\n2. Click \"+ Add New MCP Server\".\n3. Name: `toon-parse-mcp`\n4. Type: `command`\n5. Command: `python3 -m toon_parse_mcp.server` (Ensure your environment is active or use absolute path to python)\n\n### Windsurf\n\n1. Click the hammer icon in the Cascade toolbar and select \"Configure\".\n2. Alternatively, edit `~/.codeium/windsurf/mcp_config.json` directly.\n3. Add the following to the `mcpServers` object:\n\n```json\n{\n  \"mcpServers\": {\n    \"toon-parse-mcp\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"toon_parse_mcp.server\"]\n    }\n  }\n}\n```\n\n### Antigravity\n\n1. Open the MCP store via the \"...\" menu at the top right of the agent panel.\n2. Select \"Manage MCP Servers\" -> \"View raw config\".\n3. Alternatively, edit `~/.gemini/antigravity/mcp_config.json` directly.\n4. Add the following to the `mcpServers` object:\n\n```json\n{\n  \"mcpServers\": {\n    \"toon-parse-mcp\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"toon_parse_mcp.server\"]\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd this to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"toon-parse-mcp\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"toon_parse_mcp.server\"]\n    }\n  }\n}\n```\n\n## Usage\n\nWhen 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\".\n\n## Testing\n\nTo run the test suite:\n\n1. Install test dependencies:\n   ```bash\n   pip install -e \".[test]\"\n   ```\n2. Run tests:\n   ```bash\n   pytest tests/\n   ```\n\n## Requirements\n\n- Python >= 3.10\n- `mcp` >= 1.25.0\n- `toon-parse` >= 2.4.3\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n",
  "bytes": 3300,
  "sha": "216cd5c78c5a7cd25d345b4befbf7c6f6f921b331ab858da0b5d80bab338e7bd",
  "repo_slug": "ankitpal181/toon-parse-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ankitpal181_toon_parse_mcp_cb51e31e/readme"
}