Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Smart structured-data to TOON gateway: converts to TOON only when it saves LLM tokens.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"datoon": {
"command": "uvx",
"args": [
"datoon",
"mcp"
]
}
}
}在终端中运行这条命令
claude mcp add datoon -- uvx datoon mcp粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"datoon": {
"command": "uvx",
"args": [
"datoon",
"mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"datoon": {
"type": "stdio",
"command": "uvx",
"args": [
"datoon",
"mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 andrii-su 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(1.9.1)于4个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
datoon
smart structured-data→TOON gateway — converts only when it actually saves tokens
Before/After • Install • What You Get • How It Works • Benchmarks • Full install guide
Raw structured data is often verbose in LLM prompts. TOON can save tokens — but blind conversion can also make payloads *worse*. datoon adds a decision layer: convert when structure and savings justify it, skip when they don't, and always explain why.
Supports JSON, CSV, JSONL, YAML, XML, Parquet, Avro, ORC, Excel, and Apple Numbers — auto-detected from file extension.
{"users":[
{"id":1,"name":"Ada","role":"admin"}, {"id":2,"name":"Lin","role":"analyst"}, {"id":3,"name":"Grace","role":"viewer"} ]}
users[3]{id,name,role}:
1,Ada,admin 2,Lin,analyst 3,Grace,viewer
{"decision":"convert","reason":"Estimated savings 44.19% (threshold 15.00%)."}
id,name,role
1,Ada,admin 2,Lin,analyst 3,Grace,viewer
datoon data.csv --report-stdout
Same result. Zero JSON serialization in your code.
{"config":{"debug":true},"tags":["a","b"]}
{"decision":"skip","reason":"No uniform object arrays found with at least 3 rows."}
No Node.js call. No silent corruption.
Same data. Right format. Always explained.
┌──────────────────────────────────────────────────┐
│ PAYLOAD SAVINGS (auto avg) ████░░░░░░ 28% │ │ PAYLOAD SAVINGS (agent skill) ████████░░ 62% │ │ DECISION ACCURACY ██████████ 100% │ │ HARMFUL CONVERSIONS BLOCKED ██████████ 100% │ └──────────────────────────────────────────────────┘
[!IMPORTANT]
datoon saves payload tokens — the structured data portion of your prompt. Token savings depend on payload shape: uniform tabular data converts well; deeply nested or non-uniform structures are skipped. Every decision includes a reason so pipelines can log, debug, and trust the outcome.
# core (JSON, CSV, JSONL, XML — no extra deps)
uv add datoon pip install datoon
pip install "datoon[yaml]"
pip install "datoon[excel]"
pip install "datoon[columnar]"
pip install "datoon[numbers]"
pip install "datoon[tokens]"
pip install "datoon[mcp]"
pip install "datoon[all]"
Requires Python 3.12+. TOON conversion requires Node.js with npx in PATH — analysis and format reading work without it.
For Claude Code plugin, Codex, and MCP config → INSTALL.md.
| What | |
|---|---|
datoon CLI | Auto-gate any supported format → TOON from terminal or scripts |
| Python API | convert_json_for_llm() + read_tabular() for any LLM pipeline |
| MCP Server | convert_json, convert_text, analyze_json tools for Claude Desktop, Cursor, Windsurf |
| Claude Code Plugin | /datoon in-session trigger, installs from GitHub in one command |
| Codex Plugin | Marketplace plugin — structured-data mode for Codex |
| Format | Extension | Extra needed |
|---|---|---|
| JSON | .json | — |
| JSONL | .jsonl, .ndjson | — |
| CSV | .csv | — |
| XML | .xml | — |
| YAML | .yaml, .yml | datoon[yaml] |
| Excel | .xlsx, .xls | datoon[excel] |
| Parquet | .parquet | datoon[columnar] |
| Avro | .avro | datoon[columnar] |
| ORC | .orc | datoon[columnar] |
| Apple Numbers | .numbers | datoon[numbers] |
--format flag, file extension, or default to JSON for stdinEvery path returns a ConversionReport with decision, reason, and token estimates. Pipelines never get silent surprises.
JSON (stdin):
echo '{"users":[{"id":1,"name":"Ada"},{"id":2,"name":"Lin"},{"id":3,"name":"Grace"}]}' | datoon --report-stdout
CSV (auto-detected from extension):
datoon data.csv --report-stdout
JSONL:
datoon data.jsonl -o output.toon
YAML (requires `datoon[yaml]`):
datoon data.yaml --report-stdout
Parquet (requires `datoon[columnar]`):
datoon data.parquet --report ./report.json
Explicit format override:
datoon --format csv < data.csv --report-stdout
Force conversion (bypass gating — for experiments):
datoon data.json --force --report-stdout
JSON conversion:
from datoon import convert_json_for_llm, ConversionConfig, DatoonError
config = ConversionConfig(min_savings_ratio=0.15, max_depth=6, min_uniform_rows=3)
try: outcome = convert_json_for_llm(raw_json, config) except DatoonError as exc: raise
send_to_model(outcome.payload_text)
Any format via `read_tabular`:
import json
from pathlib import Path from datoon import read_tabular, convert_json_for_llm, ConversionConfig
rows = read_tabular("csv", text=csv_string)
rows = read_tabular("parquet", path=Path("data.parquet"))
json_text = json.dumps(rows, separators=(",", ":")) outcome = convert_json_for_llm(json_text, ConversionConfig()) send_to_model(outcome.payload_text)
Structure-only analysis (no Node.js required):
from datoon.analyzer import analyze_payload
from datoon.models import ConversionConfig
analysis = analyze_payload(parsed_data, ConversionConfig()) print(analysis.is_candidate, analysis.reason)
datoon ships an MCP server with three tools:
| Tool | Description |
|---|---|
convert_json | Full JSON conversion with policy gating |
convert_text | Converts CSV, YAML, XML, or JSONL text with policy gating |
analyze_json | Structure analysis only — no Node.js needed |
Claude Desktop / Cursor / Windsurf config:
{
"mcpServers": { "datoon": { "command": "uvx", "args": ["--from", "datoon[mcp]", "datoon", "mcp"] } } }
Run locally:
datoon mcp # or the standalone script: datoon-mcp
Listed on the MCP Registry, Smithery, and Glama. See MARKETPLACES.md.
Install directly from GitHub:
claude plugin marketplace add andrii-su/datoon
claude plugin install datoon@datoon
Trigger in-session:
/datoon
convert this JSON to TOON if it saves tokens use datoon mode for structured data
| Flag | Default | Description |
|---|---|---|
--format | auto | Input format: json, csv, jsonl, yaml, xml, excel, parquet, avro, orc, numbers |
--force | false | Bypass gating and minimum savings threshold |
--min-savings | 0.15 | Minimum relative token savings required |
--max-depth | 6 | Maximum nesting depth for auto-conversion |
--min-uniform-rows | 3 | Minimum rows in uniform object arrays |
--timeout | 30 | Seconds before TOON CLI call is aborted |
--report | — | Write JSON conversion report to file |
--report-stdout | — | Print JSON conversion report to stderr |
-o | stdout | Output file path |
--version | — | Print version and exit |
Format is auto-detected from file extension. Use --format to override or when reading from stdin.
PYTHONPATH=src python benchmarks/run.py --dry-run
PYTHONPATH=src python benchmarks/run.py PYTHONPATH=src python benchmarks/run.py --update-readme
Auto mode avoids low-benefit and high-risk payloads (orders-nested, mixed-non-uniform) while matching forced TOON's average token count on suitable ones. Every decision comes with a reasoned report.
| Scenario | JSON Baseline | Forced TOON | datoon Auto |
|---|---|---|---|
| Average tokens | 77 | 50 | 50 |
| Avg token saved | 0.0% | 26.8% | 28.1% |
| Decision quality | n/a | Converts all | Converts 3/5, skips harmful cases |
| Dataset | JSON | TOON (forced) | Raw Saved | Auto | Auto Tokens | Auto Saved |
|---|---|---|---|---|---|---|
| users-small | 54 | 40 | 25.9% | convert | 40 | 25.9% |
| events-medium | 219 | 162 | 26.0% | convert | 162 | 26.0% |
| orders-nested | 106 | 116 | -9.4% | skip | 106 | 0.0% |
| mixed-non-uniform | 35 | 47 | -34.3% | skip | 35 | 0.0% |
| metrics-wide | 142 | 103 | 27.5% | convert | 103 | 27.5% |
| Average | 111 | 94 | 7.1% | 3/5 convert | 89 | 15.9% |
*Forced conversion succeeded for 5/5 payloads.*
Token savings when converting from common structured formats (CSV, JSONL, XML, YAML). Baseline is the JSON representation of the same data — what an LLM would receive without datoon.
| Dataset | Format | JSON Tokens | TOON (forced) | Auto | Auto Tokens | Auto Saved | |
只显示了开头部分;其余内容请在仓库中阅读