AI 에이전트 지침 파일의 턴당 토큰 비용을 측정하고, 저장소 컨텍스트 오버헤드를 줄이기 위한 자동 수정 기능을 제공합니다.
다른 이름 TorutDev/turntax
- 스타
- 0
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- 0.11.0
- 마지막 커밋
- 2026년 11월 9일
- 라이선스
- MIT
turntax MCP란?
turntax은(는) MCP server입니다. AI 에이전트 지침 파일의 턴당 토큰 비용을 측정하고, 저장소 컨텍스트 오버헤드를 줄이기 위한 자동 수정 기능을 제공합니다.
프로젝트 README에서 생성된 요약
turntax MCP server 정보
AI 코딩 에이전트를 사용하는 개발자는 turntax를 사용하여 턴당 지침 파일 비용을 측정함으로써 저장소 컨텍스트 오버헤드와 토큰 비용을 줄일 수 있습니다. 이 도구는 Cursor, Claude Code, GitHub Copilot, Windsurf와 같은 다양한 에이전트가 CLAUDE.md 또는 AGENTS.md 파일을 로드하는 방식을 분석하여 매 상호작용 시 정확히 몇 개의 토큰이 전송되는지 결정합니다. 또한 예상 비용을 보여주는 상세 보고서를 제공하고 구성의 비효율적인 부분을 식별합니다.
사용자는 npx를 통해 로컬에서 도구를 실행하거나 웹 인터페이스를 통해 공개 GitHub 저장소를 분석할 수 있습니다. Claude 또는 Gemini의 정확한 토큰 수를 계산하려면 --claude-api 또는 --gemini-api 플래그를 통해 API 키가 필요합니다. 측정 외에도 중복된 라인, 충돌하는 규칙, 또는 경로 범위 파일이나 SKILL로 이동해야 하는 과도하게 큰 섹션을 해결하기 위한 자동 수정 기능을 제공합니다. 이를 통해 모든 에이전트 턴에서 지연 시간과 비용을 최소화하는 가벼운 지침 세트를 유지할 수 있습니다.
활용 사례
- 1턴당 토큰 비용 분석새로운 턴이 시작될 때마다 Cursor 또는 Aider와 같은 에이전트에 정확히 몇 개의 토큰이 전송되는지 계산합니다.
- 2충돌하는 에이전트 지침 식별AI 에이전트를 혼란스럽게 만드는 서로 다른 패키지 매니저 요구 사항과 같이 저장소 내의 모순된 규칙을 찾아냅니다.
- 3지침 파일 정리 자동화중복된 라인을 제거하거나 대규모의 특정 섹션을 중첩된 폴더로 이동하여 글로벌 컨텍스트를 줄이는 안전한 수정을 적용합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
turntax MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 turntax MCP 설치
$ claude mcp add turntax -- npx -y turntaxCursor에 turntax MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"turntax": {
"command": "npx",
"args": [
"-y",
"turntax"
]
}
}
}VS Code에 turntax MCP 설치
.vscode/mcp.json
{
"servers": {
"turntax": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"turntax"
]
}
}
}VS Code CLI에 turntax MCP 설치
$ code --add-mcp '{"name":"turntax","type":"stdio","command":"npx","args":["-y","turntax"]}'Claude Desktop에 turntax MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"turntax": {
"command": "npx",
"args": [
"-y",
"turntax"
]
}
}
}Codex에 turntax MCP 설치
$ codex mcp add turntax -- npx -y turntaxCodex config.toml에 turntax MCP 설치
~/.codex/config.toml
[mcp_servers.turntax] command = "npx" args = ["-y", "turntax"]
Gemini CLI에 turntax MCP 설치
$ gemini mcp add -s user turntax npx -- -y turntaxGemini settings.json에 turntax MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"turntax": {
"command": "npx",
"args": [
"-y",
"turntax"
]
}
}
}자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능torutdev/turntax is public and reachablegithub.com/torutdev/turntax ↗통과
- 패키지가 이 저장소를 소스로 명시turntax names torutdev/turntax as sourcenpmjs.com/package/turntax ↗통과
- 빌드 출처(Sigstore 증명)No build attestation published for this release검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-09github.com/torutdev/turntax ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from turntax통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음2 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기turntax
Coding agents re-send their instruction files with every turn. turntax measures that fixed per-turn cost for a repository, for every agent that reads it, and shows where to cut it.
npx turntax
Try it in the browser, with nothing uploaded: https://torutdev.github.io/turntax/ — drop a folder or enter a public GitHub repository. Links like https://torutdev.github.io/turntax/?repo=owner/name open straight to that repository's report.
State of agent instruction files: what turntax finds in 100 popular repositories, a new edition every month with pinned commits and the script to reproduce it (scripts/state-of.mjs).
Set up the GitHub Action and a config in one command:
npx turntax init
Supported agents
Each agent's documented loading rules decide what is sent on every turn, what loads only when the agent works in a folder or touches a matching file, and what is ignored.
| Agent | Files it reads from the repository |
|---|---|
| Aider | files listed under read: in .aider.conf.yml (CONVENTIONS.md only when listed or passed with --read) |
| Amp | AGENTS.md (or AGENT.md / CLAUDE.md), nested AGENTS.md, @-mentioned files, .agents/skills, .claude/skills |
| Augment Code | AGENTS.md and CLAUDE.md at every level, .augment-guidelines, .augment/rules/ (by type), skills in .augment, .claude, .agents |
| Claude Code | CLAUDE.md, CLAUDE.local.md, .claude/rules, skills, commands, subagents, AGENTS.md when there is no CLAUDE.md |
| Cline | .clinerules/, .cline/rules/, skills in .cline, .clinerules, .claude |
| Continue | .continue/rules/ |
| Cursor | .cursor/rules/*.mdc, .cursorrules, AGENTS.md, CLAUDE.md, skills in .agents, .cursor, .claude, .codex |
| Devin Local / Devin CLI | AGENTS.md, AGENTS.local.md, AGENT.md, .windsurfrules, CLAUDE.md at every level, .devin/rules/, .windsurf/rules/, .cursor/rules/, skills |
| Factory Droid | AGENTS.md / CLAUDE.md (also in .factory, .agents, .agent), DESIGN.md, .factory/skills, .agents/skills, .factory/droids |
| Gemini CLI | GEMINI.md, skills in .agents and .gemini |
| GitHub Copilot | .github/copilot-instructions.md, .github/instructions/, AGENTS.md, CLAUDE.md, GEMINI.md, .claude/rules, skills in .github, .claude, .agents (as Copilot CLI loads them) |
| Goose | .goosehints, AGENTS.md, @-included files, skills in .agents, .goose, .claude |
| Google Jules | root AGENTS.md |
| JetBrains Junie | .junie/AGENTS.md, or AGENTS.md with .junie/rules/, or .junie/guidelines; skills in .junie, .agents |
| Kilo Code | the first of AGENTS.md, AGENT.md, CLAUDE.md, CONTEXT.md, .kilo/rules, .kilocode/rules, mode rules, .kilocoderules, skills |
| Kiro | .kiro/steering/, AGENTS.md (nested ones too, every turn), .kiro/skills |
| OpenAI Codex | AGENTS.md, AGENTS.override.md, .agents/skills |
| OpenCode | AGENTS.md, or CLAUDE.md when there is none; skills in .opencode, .claude, .agents |
| Roo Code | .roo/rules/, .roo/rules-{mode}/, .roorules, AGENTS.md, skills in .roo, .agents |
| TRAE | .trae/rules/ (alwaysApply, globs, description; three folder levels), .trae/skills |
| Warp | WARP.md, else AGENTS.md; skills in .agents, .warp, .claude and seven other folders |
| Windsurf Cascade | .devin/rules/, .windsurf/rules/, .windsurfrules, AGENTS.md, skills (legacy agent; new conversations use Devin Local) |
| Zed | the first of .rules, .cursorrules, .windsurfrules, .clinerules, .github/copilot-instructions.md, AGENT.md, AGENTS.md, CLAUDE.md, GEMINI.md; .agents/skills |
Where an agent reads the same skill name from two folders, it is counted once, in the order the agent documents (or an assumed order, noted for that agent).
Agents that load exactly the same files share one row in the report (files loaded only as a /command, which cost nothing per turn, do not split a row):
always o200k/turn on-demand model tokens/turn counted by 100 turns cached agents
4 272 53 (no selected model) Claude Code
1 63 0 GPT-6.1 Sol 63 estimate (o200k_base proxy) $0.01 $0.0006 OpenAI Codex, Roo Code, Kiro, JetBrains Junie
1 17 0 (no selected model) Gemini CLI
5 311 59 GPT-6.1 Sol 311 estimate (o200k_base proxy) $0.06 $0.0031 Cursor
4 307 55 GPT-6.1 Sol 307 estimate (o200k_base proxy) $0.06 $0.0031 GitHub Copilot
2 75 0 GPT-6.1 Sol 75 estimate (o200k_base proxy) $0.01 $0.0008 Windsurf Cascade
2 21 32 GPT-6.1 Sol 21 estimate (o200k_base proxy) $0.0042 $0.0002 Cline
1 11 0 GPT-6.1 Sol 11 estimate (o200k_base proxy) $0.0022 $0.0001 Zed
3 84 32 GPT-6.1 Sol 84 estimate (o200k_base proxy) $0.02 $0.0008 Goose, OpenCode, Kilo Code
3 84 51 GPT-6.1 Sol 84 estimate (o200k_base proxy) $0.02 $0.0008 Amp
3 108 32 GPT-6.1 Sol 108 estimate (o200k_base proxy) $0.02 $0.0011 Warp
2 282 19 GPT-6.1 Sol 282 estimate (o200k_base proxy) $0.06 $0.0028 Factory Droid
4 303 51 GPT-6.1 Sol 303 estimate (o200k_base proxy) $0.06 $0.0030 Augment Code
1 63 0 (no selected model) Google Jules
7 330 69 GPT-6.1 Sol 330 estimate (o200k_base proxy) $0.07 $0.0033 Devin Local / Devin CLI
Advice (savings are estimates in o200k tokens per turn)
HIGH duplicate CLAUDE.md, AGENTS.md [saves ~48 tokens/turn]
3 identical lines are loaded twice every turn by cursor, copilot, factory-droid, augment, devin. Keep them in one file.
HIGH contradiction AGENTS.md, CLAUDE.md [saves ~11 tokens/turn]
Conflicting package manager: "Always use npm for installs and scripts in this repository." (AGENTS.md:3) vs "Always use pnpm for installs and scripts in this repository." (CLAUDE.md:5). (Removing the outdated line.)
MEDIUM scopable-section CLAUDE.md:12 [saves ~128 tokens/turn]
Section "API package" is mostly about packages/api/. Move it to packages/api/AGENTS.md (or CLAUDE.md), a path-scoped rule, or an instructions file ...
(Excerpt of the output for test/fixtures/mixed with --models gpt-6.1-sol.)
What it counts, and how
| Model family | How tokens are counted | Label |
|---|---|---|
| OpenAI GPT-5.x, gpt-oss | Offline with o200k_base (the encoding OpenAI's tiktoken maps them to) |
exact |
| OpenAI GPT-6.x | Offline with o200k_base; OpenAI has not published a newer encoding |
estimate |
| Claude | Only Anthropic's count_tokens API, with your key and --claude-api |
API count |
| Gemini | Only Google's countTokens API, with your key and --gemini-api |
API count |
Claude's tokenizer is not public, and Anthropic's docs note that newer Claude models produce noticeably more tokens than older ones for the same text. turntax never shows an OpenAI count as a Claude or Gemini number: without a key those rows say "needs API key". The o200k column is a labelled reference count for every file.
Cost per N turns = tokens per turn × N × input price. The "cached" column assumes every turn reads the context from the prompt cache. Prices come from a dated table with a source link per model (turntax --list-models); pass --prices my-prices.json to use your own.
See docs/how-it-counts.md for the loading rules per agent and their sources.
Advice
All checks are deterministic. Each one shows an estimated saving in o200k tokens per turn.
- duplicate: identical lines in two files. A per-turn saving only when one tool loads both; otherwise flagged as drift risk.
- contradiction: conflicting rules reaching the same agent (package manager, indentation, quotes, semicolons).
- scopable-section: a section mostly about one directory that could load only there (nested file, path-scoped rule,
applyTo). - oversized-section: a large always-loaded section that could become an on-demand skill.
- size-limit: documented limits (CLAUDE.md under 200 lines, Codex's 32 KiB cut-off, Windsurf's 12,000 characters per rule and 6,000 for global rules, Cursor's 500 lines, Factory's 80,000 characters, Augment's 49,512 characters).
- misconfigured: files a tool ignores, such as
.mdfiles in.cursor/rulesor Windsurf rules without atrigger. - stale-reference: referenced files or
npm runscripts that no longer exist. - non-english: non-English sections. The token multiplier is measured only against an English version you supply (
--english CLAUDE.md=CLAUDE.en.md) or, if you opt in, a Claude translation (--translate).
Fixing
npx turntax --fix # print a diff of the safe fixes; nothing is changed
npx turntax --fix --write # apply them
--fix handles four kinds of advice:
- duplicate: removes lines from a file when every agent that reads the file also reads the same lines every turn from another file. Skill, command and subagent files are left whole. A
CLAUDE.mdthat repeats at least 80% of the lines of theAGENTS.mdnext to it, at least 3 of them full sentences, and every file it imports, keeps only its own lines and imports the rest with@AGENTS.md, as Claude Code's docs suggest; agents that read both stop paying for the copy, and the summary says how much any agent now reads on top. - scopable-section: moves a section into the folder it is about: the same file name there (
packages/api/CLAUDE.md), a nestedAGENTS.md, or a Claude Code rule withpaths:. The folder the section is about must already exist, and sections with@importsor relative links stay put. A section moves together with its subsections. - oversized-section: moves a large procedure (a section of at least
--section-tokens, 600 by default, whose heading names a release, deploy, setup or similar procedure, or that is mostly numbered steps; each subsection must pass too) into a new skill,.claude/skills/<name>/SKILL.mdfor Claude Code or.agents/skills/<name>/SKILL.mdfor Codex, and leaves the heading with a one-line pointer. Only the skill's name and description load every turn. Many agents now read one or both folders, but not all of them do (Zed reads only.agents/skills, for example), so by default this fix is often refused;--toolslimits the check to the agents you use. - misconfigured: renames
.mdfiles in.cursor/rulesto.mdc.
Before a fix is kept, the files are classified again with the change applied: every agent must still read every line it read before, including files reached through @imports, and as often as before. The exceptions are moved text: a section moved into a folder may load only when the agent works there, and a procedure moved into a skill only when the skill is used. Otherwise the fix is skipped and the reason is printed. A moved section can reach agents that did not read it before (a nested AGENTS.md is read by more agents than a CLAUDE.md); the summary names them. By default that check covers every supported agent, so a section of AGENTS.md usually stays where it is, because some agents read only the root file. --tools codex,claude-code limits the check to the agents you use.
In preview the diff is on stdout and works with git apply, and the summary is on stderr; with --write the summary is on stdout. --write checks that no file changed since it was read and writes nothing if one did. Symlinked files, their targets and files in symlinked folders are never changed. Contradictions and stale references need a person to decide, so --fix leaves them alone. Files that are also documents for people (DESIGN.md, CONTEXT.md, agents.md, Agents.md, Claude.md) are never changed, and no file is created whose name differs from one of them only by case.
The web page shows the same fixes for any repository you load, with a downloadable fix.patch.
Config file
Put defaults in turntax.config.json in the audited folder (or pass --config <file>). Command-line flags override it.
{
"tools": ["claude-code", "codex", "cursor"],
"models": ["claude-sonnet-5.5", "gpt-6.1-sol"],
"maxTokens": 8000,
"maxIncrease": 500,
"ignore": ["docs/agents/archive/", "**/*.draft.md"]
}
Keys: tools, models, turns, maxTokens, maxIncrease (applies only with --compare or --baseline), sectionTokens, and ignore: globs of instruction files to leave out, relative to the audited folder (* and ? within a folder name, ** across folders, a trailing / for a whole folder). Ignored files are also left out of --compare and are never changed by --fix. Unknown keys and ids are errors.
MCP servers
Every MCP server an agent starts adds its tool definitions (names, descriptions, input schemas) to the context. turntax reads the agents' MCP configs and lists the servers each agent starts:
| Agent | Project config | User config |
|---|---|---|
| Claude Code | .mcp.json |
~/.claude.json (user and per-project servers) |
| Cursor | .cursor/mcp.json |
~/.cursor/mcp.json |
| GitHub Copilot | .mcp.json, .github/mcp.json, .vscode/mcp.json (deprecated) |
~/.copilot/mcp-config.json |
| Gemini CLI | .gemini/settings.json |
~/.gemini/settings.json |
| Kiro | .kiro/settings/mcp.json |
~/.kiro/settings/mcp.json |
| Roo Code | .roo/mcp.json |
|
| OpenAI Codex | .codex/config.toml (trusted projects) |
~/.codex/config.toml |
| OpenCode | opencode.json, opencode.jsonc |
~/.config/opencode/opencode.json |
| Zed | .zed/settings.json |
|
| Windsurf Cascade | ~/.config/devin/mcp_config.json |
|
| Devin Local / Devin CLI | .devin/mcp_config.json, .devin/mcp_config.local.json; imports .mcp.json, .cursor/mcp.json, opencode.json, .zed/settings.json |
~/.config/devin/mcp_config.json; imports Claude Code, Windsurf, OpenCode and Zed user configs |
| Augment Code | .augment/settings.json, .augment/settings.local.json |
~/.augment/settings.json |
| Factory Droid | .factory/mcp.json |
~/.factory/mcp.json |
| Kilo Code | kilo.json(c), .kilo/kilo.json(c), opencode.json(c) |
~/.config/kilo/kilo.json(c) |
| Warp | (project configs never start on their own) | ~/.warp/.mcp.json |
A server name an agent finds in several configs is counted once, by the agent's documented precedence (or config order, marked as assumed); the other copies are listed as overridden. Tool filters in the configs (Codex enabled_tools/disabled_tools, Gemini includeTools/excludeTools, Factory enabledTools/disabledTools, Copilot tools, Kiro, Roo and Windsurf disabledTools) are applied.
Counting the tool definitions needs the servers running, so it is opt-in:
npx turntax --mcp
--mcp starts each stdio server with the command from its config (in the repository folder; environment variables are expanded into commands, URLs and headers the repository config defines, as the agents themselves do) and connects to streamable HTTP servers, asks for tools/list, and counts the definitions as JSON with o200k. A server several agents share is started once. Environment variables in the config (${VAR}, ${VAR:-default}, ${env:VAR}, {env:VAR}, ${workspaceFolder}) are expanded; servers that need a VS Code ${input:...} prompt, legacy SSE and WebSocket servers and servers that fail or time out (--mcp-timeout, default 30 s) are listed with the reason and not counted.
Claude Code defers MCP tool definitions by default (tool search): only the tool names are in context until a tool is used, so its row counts the names and shows the full size separately. A server with alwaysLoad: true, or a tool marked _meta["anthropic/alwaysLoad"], is counted in full. Server instructions load at the start of every session and are counted for Claude Code (cut at 4,096 characters, as Claude Code does), Gemini CLI, Codex and Kilo Code, whose docs say they reach the context.
MCP tokens are an o200k estimate and are not included in the model cost columns.
User-level files
Agents also read instruction files from your home directory in every project. --include-user adds them in a separate user/turn column and a total:
npx turntax --include-user
It reads only the locations the agents document (the full list, per agent, is in docs/how-it-counts.md): for example ~/.claude/, ~/.codex/AGENTS.md, ~/.agents/, ~/.gemini/, ~/.copilot/, ~/.cursor/skills, Windsurf's and Devin's global_rules.md and ~/.config/devin/, Cline's global rules, ~/.roo/, ~/.kiro/, ~/.junie/, ~/.config/goose/, ~/.config/amp/, ~/.config/opencode/, ~/.config/zed/AGENTS.md, ~/.factory/, ~/.augment/, ~/.config/kilo/, ~/.warp/ and ~/.trae/skills, plus the user MCP configs above. Contradictions and duplicates between user-level and repository files are reported. User-level files never count toward the badge or --max-tokens, so the result does not depend on who runs it.
Comparing with a baseline
npx turntax --compare origin/main # instruction files at a git ref, read with git show
npx turntax --json --out before.json # or save a report ...
npx turntax --baseline before.json # ... and compare with it later
npx turntax --compare origin/main --max-increase 200 # exit 1 when any agent grows by more than 200 tokens
The comparison covers repository instruction files (o200k), per agent and per file, and lists MCP servers that were added or removed. It never changes the working tree.
GitHub Action
The repository is also an Action, listed on the GitHub Marketplace; npx turntax init writes this workflow and a turntax.config.json for you. On pull requests it compares with the base branch, posts one comment (updated on every push), writes the report to the job summary and marks findings on the lines they are about in the pull request's changed files (GitHub shows up to 10 warnings and 10 notices per step):
name: turntax
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
turntax:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: TorutDev/turntax@v0.11.0
with:
max-increase: 500 # optional: fail when an agent grows by more than 500 tokens per turn
# max-tokens: 8000 # optional: absolute budget
# args: --tools claude-code,cursor
# annotations: false # optional: no findings on the changed lines
The comment opens with a table of the change per agent and per file. When --fix has safe fixes, it says how many and how many tokens they save, with the diff folded; the full report is folded below. A turntax.config.json in the repository is read as well. Pull requests from forks get a read-only token, so the comment step is skipped there; the job summary still has the report.
pre-commit
The repository is also a pre-commit hook, which fails a commit when an agent goes over a budget. Set the budget with args, or with maxTokens in turntax.config.json; without one the hook always passes. It runs npx turntax@<version>, so it needs Node.js 22 or later on your PATH, and it does not run on pre-commit.ci, which has no system hooks.
repos:
- repo: https://github.com/TorutDev/turntax
rev: v0.11.0
hooks:
- id: turntax
args: [--max-tokens, '8000']
Options
turntax [path]
--tools <ids> agents to report (default: every agent that reads a file); see --help
--models <ids> see --list-models (default: claude-sonnet-5.5, gpt-6.1-sol, gemini-3.8-flash)
--turns <n> cost projection (default 100)
--json | --md | --badge output format (default: terminal table)
--pr-comment Markdown for a pull request comment (change first, fixes and full report folded)
--annotations GitHub Actions annotations, one per finding (--path-prefix <dir> for a subfolder)
--out <file> write the output to a file
--max-tokens <n> exit 1 when any tool loads more than n o200k tokens per turn (CI gate)
--include-user add user-level files and MCP servers from your home directory
--mcp start the configured MCP servers and count their tool definitions
--mcp-timeout <s> seconds to wait for each MCP server (default 30)
--baseline <file.json> compare with an earlier --json report
--compare <git-ref> compare with the instruction files at a git ref
--max-increase <n> exit 1 when any tool grows by more than n tokens per turn vs the baseline
--claude-api exact Claude counts (ANTHROPIC_API_KEY)
--gemini-api Gemini counts (GEMINI_API_KEY)
--english <file=en> measure a language multiplier against your English version
--translate opt-in Claude translation for that measurement (needs --claude-api)
--prices <file.json> your own price table
--section-tokens <n> threshold for oversized sections (default 600)
--fix print a diff of the safe fixes (--tools limits the agents whose context is kept)
--write with --fix, apply the changes
--config <file> read defaults from this file (default: turntax.config.json, if any)
When a selected model's price was checked more than 90 days ago, turntax says so on stderr; check the source or pass --prices.
turntax init [path] add .github/workflows/turntax.yml and turntax.config.json (--tools, --max-increase,
--force, --dry-run); existing files are kept unless --force
turntax mcp run turntax as an MCP server over stdio (see below)
Agents and MCP
turntax mcp (MCP Registry: io.github.TorutDev/turntax) is a read-only MCP server with two tools: audit (the report for a folder) and fix_preview (the --fix diff, never written). It reads turntax.config.json like the CLI and does not start MCP servers or call vendor APIs.
claude mcp add turntax -- npx -y turntax mcp
For Cursor and clients with an mcpServers map, add { "mcpServers": { "turntax": { "command": "npx", "args": ["-y", "turntax", "mcp"] } } } to their MCP config (VS Code's .vscode/mcp.json calls the map servers). On native Windows, run it through cmd /c npx -y turntax mcp if your client cannot start npx directly.
This repository is also a Claude Code plugin marketplace. The plugin adds the server and a /turntax:context-tax command:
/plugin marketplace add TorutDev/turntax
/plugin install turntax@turntax
turntax MCP 질문
turntax MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add turntax -- npx -y turntax를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
turntax MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
turntax는 무엇을 측정하나요?
AGENTS.md 및 CLAUDE.md와 같은 지침 파일을 읽는 모든 에이전트에 대해 저장소의 고정된 턴당 토큰 비용을 측정합니다.
turntax가 발견한 문제를 어떻게 해결할 수 있나요?
--fix 명령어를 사용하여 안전한 수정 사항의 diff를 확인하거나, --fix --write를 사용하여 파일에 직접 적용할 수 있습니다.