
mauriziofonte/toktoken
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
TokToken は、AI コーディングエージェント向けの高速で単一バイナリの C コードベース インデックスです。 ユニバーサルタグとSQLite FTS5を搭載した、正確なシンボル検索、依存性トラッキング、MCPサーバーを提供します.
概要
今、あなたのAIのコーディングの代理店。 トークン、お金、コンテキストウィンドウを無駄にします。 Redisの実際の数字(727ファイル、45K記号、0.9秒でインデックス化) よくスケールします。 Linux カーネル (65K ファイル、7.4M 記号) のインデックスを ~170 秒でチェックします。 1 つのコマンドは、コードベースをインデックス化します。 エージェントは、シンボルを検索し、インポートを追跡し、すべての操作で必要なコードのみを取得します。 Claudeコード、Cursor、Windsurf、Copilot、Gemini、Codex、。 単一のバイナリ、ゼロの依存関係、プロジェクト内で書かれたものはありません。 docs/LLM.md を読み込み、TOkToken (almost) を自律的に設定するAIエージェントに指示します。 皆さんの残りのために、人間は読書を続けます。 - ユニバーサルタグ+ 16カスタムパーサ(docs/LANGUAGESを参照してください.
概要(AI 翻訳)
今のところ、AI コーディングエージェントは1つの関数を見つけるために、すべてのファイルを読み込みます。 トークン、マネー、コンテキストウィンドウを無駄にします。 TokTokenはこれを修正します。
Redisの実際の数字(727ファイル、45K記号、0.9秒でインデックス化)
| 代理店が求めるもの | トークントークンなし | トークントークンで | 貯蓄 |
| ----- | ----- |
| [initServer() に server.c (8141 行) | 84,193 トークン | 2,699 トークン | 97% |
| [sdslen() に [[T3] (340行) | 2,678トークン | 132トークン |**95% |
| [processCommand() に server.c | 84,193 トークン | 4,412 トークン |95% |
| [redisCommandProcタイプデフ server.h(4503行) | 56,754トークン | 50トークン |**99% |
TokToken のスケールは十分です。 Linux カーネル (65K ファイル、7.4M 記号) のインデックスを ~170 秒でチェックします。
| 代理店が求めるもの | トークントークンなし | トークントークンで | 貯蓄 | | ----- | ----- | | [`__schedule()`の`kernel/sched/core.c`(10961行) | 73,084トークン | 1,335トークン | 98% | | [[T10] に [[T11] (1583 行) | 9,915 トークン | 89 トークン |**99% | | [[T12] に `include/linux/slab.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
TokToken (beta release)
Right now, your AI coding agent reads entire files just to find one function. That wastes tokens, money, and context window. TokToken fixes this.
Real numbers from Redis (727 files, 45K symbols, indexed in 0.9s):
| What your agent needs | Without TokToken | With TokToken | Savings |
|---|---|---|---|
initServer() in server.c (8141 lines) |
84,193 tokens | 2,699 tokens | 97% |
sdslen() in sds.h (340 lines) |
2,678 tokens | 132 tokens | 95% |
processCommand() in server.c |
84,193 tokens | 4,412 tokens | 95% |
redisCommandProc typedef in server.h (4503 lines) |
56,754 tokens | 50 tokens | 99% |
TokToken scales well. Check it on the Linux kernel (65K files, 7.4M symbols) indexes in ~170 seconds:
| What your agent needs | Without TokToken | With TokToken | Savings |
|---|---|---|---|
__schedule() in kernel/sched/core.c (10961 lines) |
73,084 tokens | 1,335 tokens | 98% |
do_sys_open() in fs/open.c (1583 lines) |
9,915 tokens | 89 tokens | 99% |
kmalloc() in include/linux/slab.h (1280 lines) |
11,272 tokens | 1,372 tokens | 88% |
ext4_fill_super() in fs/ext4/super.c (7573 lines) |
53,651 tokens | 376 tokens | 99% |
One command indexes your codebase. Your agent searches symbols, traces imports, and retrieves only the code it needs – 88-99% fewer tokens on every operation.
toktoken index:create # index your project (once)
toktoken search:symbols "auth" # find symbols by name
toktoken inspect:symbol # retrieve just the code that matters
Works with Claude Code, Cursor, Windsurf, Copilot, Gemini, Codex, and any MCP-compatible agent. Single binary, zero dependencies, nothing written inside your project.
Quick setup: tell your AI agent to read docs/LLM.md – it will install and configure TokToken (almost) autonomously. For the rest of you, humans, keep reading.
Features
- 49 languages via universal-ctags + 16 custom parsers (see docs/LANGUAGES.md)
- Import graph: cross-file dependency tracking with
find:importers,find:references,find:callers, andinspect:dependencies - FTS5 search with relevance scoring, cascading query strategies, and token-budget-aware result slicing
- Incremental indexing using content hashing – re-indexes only changed files, including single-file reindex
- Dead code detection: find symbols with no callers or importers across the codebase
- Blast radius analysis: trace all files and symbols affected by a change to a given file or symbol
- Circular import detection: identify import cycles in the dependency graph
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"toktoken": {
"command": "toktoken",
"args": ["serve"]
}
}
}