Tokennuke

io.github.BigJai由 GitHub 帳號 BigJai 發布v1.3.0更新於 Oct 24, 2026

Code indexing MCP: 15 tools, 10 languages, hybrid search, call graphs, O(1) retrieval.

概覽

AI 產生的概覽

為本機或遠端程式碼倉庫建立索引,讓助理能搜尋符號、讀取精確的函式原始碼並追蹤呼叫關係。

可以做什麼
TokenNuke 使用 tree-sitter 解析十種語言的原始碼,為每個倉庫建立 SQLite 索引。它的 15 個工具涵蓋:索引本機目錄或 GitHub/GitLab 倉庫、列出倉庫、檢視檔案樹與檔案大綱、關鍵字加向量的混合符號搜尋、原始文字搜尋、以位元組位移取得符號、批次取得符號、查詢被呼叫者與呼叫者、比對上次索引後的符號變化,以及相依關係圖。
適用情境
適合助理需要在不讀取整個檔案的情況下瀏覽大型程式碼庫的情境,例如查找某個函式的原始碼、在修改簽名前定位呼叫方、檢視自上次索引以來的變更,或在重構時梳理相依關係。
執行需求
以本機程序執行,從 PyPI 安裝(pip install tokennuke)後透過 stdio 啟動,也可選擇以 streamable HTTP 方式在指定連接埠執行。它會在本機目錄下寫入依倉庫區分的 SQLite 資料庫。索引遠端倉庫需要連網下載壓縮檔;私有倉庫需要驗證權杖。
安裝前請注意
索引遠端倉庫會下載其內容,私有倉庫需要驗證權杖,應將該憑證視為敏感資訊。索引資料庫寫入本機目錄,可能包含原始碼與檔案內容。此伺服器可以強制重新索引並使快取失效,會改變本機索引狀態。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tokennuke,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

TokenNuke

Intelligent code indexing MCP server. 15 tools, 10 languages, tree-sitter AST extraction, hybrid search (FTS5 + vector), call graphs, remote repo indexing, incremental indexing.

Save 99% of tokens — get exact function source via byte-offset seek instead of reading entire files.

Formerly codemunch-pro. Same code, better name.

Install

bash
pip install tokennuke

Quick Start

Claude Desktop / Cline

Add to your MCP client config:

json
{  "mcpServers": {    "tokennuke": {      "command": "tokennuke"    }  }}

HTTP Server

bash
tokennuke --transport streamable-http --port 5002

15 MCP Tools

ToolDescription
index_folderIndex a local directory (incremental, SHA-256 based)
index_repoIndex a GitHub/GitLab repo (tarball download, no git needed)
list_reposList all indexed repositories with stats
invalidate_cacheForce re-index a repository
file_treeGet directory tree with file counts
file_outlineList symbols in a single file
repo_outlineList all symbols in repo (summary)
get_symbolGet full source of one symbol (O(1) byte seek)
get_symbolsBatch get multiple symbols
search_symbolsHybrid search (FTS5 + vector RRF)
search_textFull-text search in file contents
get_calleesWhat does this function call?
get_callersWho calls this function?
diff_symbolsWhat changed since last index? (PR review)
dependency_mapWhat does this file depend on? What depends on it?

10 Languages

Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, C#, Ruby

All via tree-sitter-language-pack — zero compilation, pre-built binaries.

Key Features

O(1) Symbol Retrieval

Every symbol stores its byte offset and length. get_symbol seeks directly to the function source — no reading entire files. A 200-byte function from a 40KB file = 99.5% token savings.

Incremental Indexing

Files are hashed (SHA-256). Only changed files are re-parsed. Re-indexing a 10K file repo after changing one file takes milliseconds.

Hybrid Search (FTS5 + Vector)

Combines BM25 keyword matching with semantic vector similarity using Reciprocal Rank Fusion. Search "authentication middleware" and find auth_middleware, verify_token, and login_handler.

Call Graphs

Traces function calls through the AST. get_callees("main") shows what main calls. get_callers("authenticate") shows who calls authenticate. Supports depth traversal.

Remote Repo Indexing

Index any public GitHub or GitLab repo by URL — no git binary needed. Downloads the tarball via API, extracts, and indexes. Cached locally with SHA-based freshness checks. Supports private repos with auth tokens and sparse paths.

Full-Text Content Search

Search raw file contents — string literals, TODO comments, config values, error messages. Not just symbol names.

How It Works

  1. Parse — tree-sitter builds an AST for each source file
  2. Extract — Walk AST to find functions, classes, methods, types, interfaces
  3. Store — SQLite database per repo with FTS5 virtual tables
  4. Embed — FastEmbed (ONNX, CPU-only) generates 384-dim vectors for semantic search
  5. Graph — Call expressions extracted from function bodies, edges stored and resolved
  6. Serve — FastMCP exposes 15 tools via stdio or HTTP

Architecture

~/.tokennuke/├── myproject_a1b2c3d4e5f6.db    # Per-repo SQLite database├── otherproject_7890abcdef.db└── ...
Each DB contains:├── files          # Indexed files with SHA-256 hashes├── symbols        # Functions, classes, methods, types├── symbols_fts    # FTS5 full-text search index├── symbols_vec    # sqlite-vec 384-dim vector index├── call_edges     # Call graph (caller → callee)└── file_content_fts  # Raw file content search

Use Cases

  • AI Coding Agents: Give your agent surgical access to codebases without burning context
  • Code Review: Find all callers of a function before changing its signature
  • Onboarding: Search symbols semantically — "where is error handling?" finds relevant code
  • Refactoring: Map call graphs before moving functions between modules
  • Documentation: Extract all public APIs with signatures and docstrings

License

MIT

來源:README.md,提交 b86a4c5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.3.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分