# datoon

> datoon is an open-source MCP server for ai models and llm tooling. Converts JSON, CSV and other data to TOON only when it saves LLM tokens. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/andrii-su/datoon
- **MCP Registry name:** io.github.andrii-su/datoon
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

datoon sits in front of a prompt and decides whether a structured payload is worth rewriting in TOON, a compact notation for tables of records. The idea is that blind conversion can make a payload worse, so it adds a decision step and always states a reason.

The decision rules are simple. It reads the data, looks for uniform arrays of objects (at least three rows by default, within a depth limit) and skips early if there are none. Otherwise it encodes to TOON, estimates the token saving and converts only above a threshold of 15 percent by default. In the README's example, a three-row user list drops from 42 to 35 tokens, while a small nested config is left as JSON with the reason given. Reported savings on uniform data range from 22 to 28 percent.

Input formats are JSON, JSONL, CSV, XML, YAML, Excel, Parquet, Avro, ORC and Apple Numbers, detected from the file extension, with optional extras for the heavier formats. Token counting can use tiktoken, a character estimate, a Hugging Face tokenizer or Anthropic's counting API. It ships as a command-line tool, a Python API, and plugins for Claude Code and Codex. The registry lists it as a stdio MCP server on PyPI; it requires Python 3.12 or newer.

## Features

- **Gated conversion:** Converts to TOON only when estimated savings clear a configurable threshold.
- **Reasoned decisions:** Every result carries a convert-or-skip decision with a plain explanation.
- **Many input formats:** Reads JSON, JSONL, CSV, XML, YAML, Excel, Parquet, Avro, ORC and Numbers.
- **Choice of tokenizer:** Counts tokens with tiktoken, characters, Hugging Face or the Claude counting API.
- **CLI and Python API:** Use it from a terminal, a script or a pipeline.
- **Agent plugins:** Claude Code and Codex plugins are available.

## Good for

- Shrink large query results before sending them to a model
- Log why a payload was or was not compacted in a pipeline
- Convert CSV or Parquet exports for use in prompts
- Benchmark token savings per tokenizer

## Install

### Claude Code (Terminal)

```sh
claude mcp add datoon -- uvx datoon
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "datoon": {
      "command": "uvx",
      "args": [
        "datoon"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "datoon": {
      "command": "uvx",
      "args": [
        "datoon"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "datoon": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "datoon"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "datoon": {
      "command": "uvx",
      "args": [
        "datoon"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "datoon": {
      "command": "uvx",
      "args": [
        "datoon"
      ]
    }
  }
}
```

## FAQ

### When does it skip conversion?

When there are no uniform object arrays with enough rows, or savings fall under the threshold.

### What is the default savings threshold?

15 percent.

### What Python version is needed?

Python 3.12 or newer.

### Does it need Node.js?

No. Conversion is pure Python using the toon-format encoder.

### Is datoon free?

Yes. datoon is open source, so you can use and self-host it for free.

### How do I add datoon to Claude Code?

Run this command in your terminal: claude mcp add datoon -- uvx datoon

### What are the best alternatives to datoon?

The closest alternatives to datoon are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/datoon
