About Token Goat
Token Goat is an MCP server published by DFKHelper in the Blockchain category: auto AI improver. Cost and token burn reducer, turn saver, and focus keeper for Claude Code, Codex, Copilot, Gemini, and more: surgical read hints, PDF/Office/CSV/md file interception, 255+ filter & interception rules, compact manifest injection, image shrinking, cache and compact skills, cache MCPs, prompt injection protection, and much more. Conduid read 18 tools from its source: brief, changed, compress_text, exports, grep, handoff_create and 12 more. It is published to npm as token-goat and starts with npx.
The repository has 149 stars and 20 forks, and its last commit was on 1 Dec 2026. The latest release is v2.9.35 (11 Nov 2026): read and section accept separate positional arguments, and hint suggestions quote safely in PowerShell. It follows v2.9.34 (3 Nov 2026), and the 5 most recent releases go back to v2.9.31 (16 Oct 2026). It passes all 4 static checks Conduid ran on the repository. Its topics include ai-coding, cli-tool, codex-cli, context-window, developer-productivity and hooks.
Install
claude mcp add token-goat -- npx -y token-goatnpx -y token-goatgit clone https://github.com/DFKHelper/token-goatTools (18)
briefUnderstand a symbol in one call: signature, location, token count, body, callers and containing doc section. Prefer it to read plus refs. Spec file::symbol, file::a,b or a.ts::x,b.ts::y; a bare name without a file is not accepted.| Parameter | Type | Description |
|---|---|---|
| context | number | call-site lines to show around each caller (default 0) |
| excludeTests | boolean | hide callers in test files |
| grep | string | only callers whose enclosing symbol matches this regex (a literal substring if it is not valid regex) |
| json | boolean | output as JSON |
| limit | number | max callers to show (default: 20) |
| spec * | string | file::symbol, file::a,b, or a.ts::x,b.ts::y |
changedList files or symbols changed since a git ref.| Parameter | Type | Description |
|---|---|---|
| json | boolean | output as JSON |
| ref | string | git ref to compare against (default: HEAD~5) |
| symbolMode | boolean | list symbols instead of files |
compress_textCompress arbitrary local text, persist it in the bounded local cache, and return an opaque recovery ID plus metadata.| Parameter | Type | Description |
|---|---|---|
| text * | string | text to compress |
exportsList exported (public) symbols in a file.| Parameter | Type | Description |
|---|---|---|
| file * | string | file path |
| json | boolean | output as JSON |
grepRegex search over files, caching nothing (session-aware grep).| Parameter | Type | Description |
|---|---|---|
| context | number | lines of context to show before and after each match |
| json | boolean | output as JSON |
| maxLines | number | max matching lines to print |
| path | array | files or directories to search; defaults to this server process's cwd |
| pattern * | string | regex pattern to search for |
| recursive | boolean | descend into subdirectories (default: true) |
handoff_createCreate a bounded, project-local named compressed handoff for another agent.| Parameter | Type | Description |
|---|---|---|
| name * | string | handoff name |
| text * | string | handoff text |
handoff_resolveResolve a project-local handoff compactly or in full. MCP does not intercept built-in file reads.| Parameter | Type | Description |
|---|---|---|
| full | boolean | return full text instead of a compact payload |
| name * | string | handoff name |
importsList the modules a file imports.| Parameter | Type | Description |
|---|---|---|
| file * | string | file path |
| json | boolean | output as JSON |
index_statusWhether the project index can be trusted now: indexed at all, file and symbol counts, reindex queue depth, worker alive, and embeddings available (without them semantic falls back to full-text search). Call it when another token-goat tool returns nothing, to tell "no match" from "index not ready".mapProject overview: file count, languages, headline symbols, and recently modified files.| Parameter | Type | Description |
|---|---|---|
| compact | boolean | compact, low-token summary |
outlineList symbols in a file with line ranges and docstrings.| Parameter | Type | Description |
|---|---|---|
| file * | string | file path |
| forceRefresh | boolean | reparse file from disk before querying (ignore stale index) |
| json | boolean | output as JSON |
| minLines | number | only show symbols at least N lines long |
| stats | boolean | add per-symbol reference count and doc-coverage flag |
readRead a symbol's full body (file::symbol), several from one file (file::a,b), a line range (file@N-M, file@N), or a file.| Parameter | Type | Description |
|---|---|---|
| forceRefresh | boolean | reparse file from disk before querying (ignore stale index) |
| json | boolean | output as JSON |
| spec * | string | file::symbol, file::a,b, file@N-M, file@N, or a file path |
| stats | boolean | add per-symbol reference count and doc-coverage flag |
refsFind references to symbols. An unambiguous TypeScript symbol is type-resolved, dropping same-named symbols; anything else matches by name.| Parameter | Type | Description |
|---|---|---|
| callers | boolean | group references by their enclosing caller symbol |
| json | boolean | output as JSON |
| limit | number | max results |
| spec * | string | file::symbol, symbol, a,b,c, or file::a,b |
| top | number | list only the top N files by reference count, instead of every reference |
retrieve_textRetrieve original text from a token-goat compression ID.| Parameter | Type | Description |
|---|---|---|
| id * | string | opaque token-goat content ID |
sectionRead one section from a file, given a spec of the form file::Heading.| Parameter | Type | Description |
|---|---|---|
| json | boolean | output as JSON |
| spec * | string | file::Heading |
semanticSemantic search over the indexed project; falls back to full-text search without an embedding index.| Parameter | Type | Description |
|---|---|---|
| excludeTests | boolean | hide hits in test files |
| grep | string | only hits whose file path matches this regex (a literal substring if it is not valid regex) |
| json | boolean | output as JSON |
| limit | number | max results (default: 20) |
| preflight | boolean | report whether embeddings are ready, instead of searching |
| query * | string | natural-language search query |
| warm | boolean | load the embedding model before the query |
skeletonList all symbols in a file without bodies (name, kind, line range).| Parameter | Type | Description |
|---|---|---|
| file * | string | file path |
| forceRefresh | boolean | reparse file from disk before querying (ignore stale index) |
| json | boolean | output as JSON |
| minLines | number | only show symbols at least N lines long |
| stats | boolean | add per-symbol reference count and doc-coverage flag |
symbolSearch for a symbol by name across the indexed project.| Parameter | Type | Description |
|---|---|---|
| file | string | restrict to one file |
| json | boolean | output as JSON |
| kind | string | restrict to one kind (function, class, ...) |
| limit | number | max results (default: 20) |
| name * | string | symbol name to search for |
Security checks
- ✓README presentThe repository's README runs to about 16K words.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
2 checks have not been run yet.
Releases
README
The repository's README runs to about 16K words, fetched 13 days ago. The original in the repository is authoritative.
Read full README