Numbers-LE

io.github.nolindnaidoo由 GitHub 账号 nolindnaidoo 发布v2.8.0更新于 Nov 3, 2026

Extract numeric values from config files, data files and plain text.

发布方自己的服务:Numbers Online — phone intelligence

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

从配置文件、数据文件和源代码中提取所有数值,并返回每个数字的书写形式与位置。

可以做什么
  • 从作为文本传入的文档中提取全部数值,可选去重并限制结果数量
  • 解析 JSON、YAML、CSV、TOML、INI 和 dotenv 内容,以及十二种编程语言中的数字字面量
  • 报告每个结果的书写形式(十进制、十六进制、二进制、八进制、科学计数、bigint),位置精确时给出行列号
  • 无法识别的格式改为按纯文本扫描,而不是拒绝输入
适用场景
适合需要从配置、测试数据、CSV 或源码中取出数字,以核对取值范围、比较端口与阈值,或确认某个常量与规范一致的场景。
运行要求
通过 npx(npm 包 numbers-le-mcp)以 stdio 在本地运行,需要 Node.js。无需 API 密钥、环境变量或额外配置;服务器不读取文件也不发起网络请求,内容须作为参数传入。
安装前请注意
只读:接收内容并返回数据,无文件系统访问、无网络请求、无遥测。结果默认上限为 500 条;YAML、TOML、CSV、INI、dotenv 等解析格式不提供行列位置。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Numbers-LE,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Numbers-LE Logo]

Numbers-LE: Zero Hassle Number Extraction

Pull every number out of the current file in one keystroke
JSON/JSONC, YAML, CSV/TSV, TOML, INI, Environment files, and twelve source languages

[Install from VS Code Marketplace] [Open VSX downloads] [numbers-le-mcp on npm] [numbers-le on npm] [numbers-le on crates.io] [LE Tools]


[Numbers-LE in VS Code]

Useful? A star or rating is how other developers find it — ★ GitHub · ★ Open VSX · ★ Marketplace

What it does

Open a file, run Numbers-LE: Extract Numbers, and every numeric value in the document lands in a new editor — deduplicate and sort it from there. Works in VS Code and in VS Code–based editors like Cursor and VSCodium (installable from Open VSX).

  • Data validation — pull the numbers out of a config or fixture and eyeball ranges at a glance
  • Config audits — compare ports, thresholds, and limits across INI/TOML/.env files
  • CSV work — extract everything, one column, or several columns into separate documents

Install

WhereWhat you getInstall
VS CodeThe same extraction, in your editor, on a keystrokeMarketplace
Cursor, VSCodium, WindsurfThe same extensionOpen VSX
A terminal or a CI stepThe same run over a whole tree, with exit codesnpx numbers-le · npm or cargo install numbers-le · crates.io
Any MCP agent, via Nodeextract_numbers over stdionpx numbers-le-mcp · npm

Use it from an AI agent

The same engine runs as an MCP server, so an agent can call it directly instead of you running a command.

EditorHow
VS Code 1.101+Nothing to install — the extension registers extract_numbers with agent mode
Claude Codeclaude mcp add numbers-le -- npx -y numbers-le-mcp
Cursor, Windsurf, anything elsepoint it at npx numbers-le-mcp

[An agent in Claude Code calling the numbers-le MCP server]

extract_numbers(content, format?, filename?, dedupe?, maxResults?)

Returns the values in document order, each with the notation it was written in and — for JSON, source code and plain text, where the position is exact — its 1-based line and column; a parsed format (YAML, TOML, CSV, INI, dotenv) carries no position rather than a guessed one. Capped at 500 by default with meta.truncated. A format is optional — anything unrecognised is scanned as plain text rather than refused.

The server takes content and returns data — it reads no files and makes no network requests of its own. Published as numbers-le-mcp on npm and as io.github.nolindnaidoo/numbers-le in the MCP registry.

Configuring it by hand — any host with an MCP config file

Most hosts read a JSON config. Add one entry:

json
{  "mcpServers": {    "numbers-le": {      "command": "npx",      "args": ["-y", "numbers-le-mcp"]    }  }}

-y skips the install prompt on first run. Pin a version if you would rather not track releases — [email protected].

Prefer not to go through npx on every launch? Install it once and point at the binary instead:

bash
npm install -g numbers-le-mcp
json
{  "mcpServers": {    "numbers-le": { "command": "numbers-le-mcp" }  }}

It speaks MCP over stdio and needs no environment variables, no API key and no configuration of its own. To check it before wiring it into anything:

bash
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx -y numbers-le-mcp

That prints the tool list and exits — if you see extract_numbers, the server works.

Supported formats

FormatWhat counts as a number
JSONNumber values anywhere in the structure. Quoted numbers ("42") are strings, not numbers, and are never extracted
YAMLNumber values, including hex/octal int forms and exponents; multi-document (---) streams extract from every document
TOMLInteger and float values (dates are not numbers)
CSVCells whose entire content is numeric — 19.99 counts, 12abc and 1,000 do not. No header inference: every row is data
INIValues whose entire content is numeric (INI values are inherently strings)
EnvironmentValues whose entire content is numeric (PORT=3000 yields 3000; VERSION=1.2.3 yields nothing)

The shared policy (one heuristics module, applied to every format): only finite numbers are extracted — NaN and inf/.inf never appear in results — and a coerced string must be numeric in full: plain decimals with optional sign, decimal point, and exponent.

Python, Rust, Go, Java, Kotlin, C#, C, C++, JavaScript, TypeScript, SQL and shell are read by a numeric-literal extractor that understands hex 0xFF, binary 0b1010, octal 0o755 and legacy 0755, digit separators 1_000_000 and 1'000, and suffixes 123n, 1.5f, 10u32, 100L — and that knows u32 is a type name, not the number 32. A dialect changes an answer: 0755 is 493 in C, C++, Go and Java, and 755 in Rust, Python 3, Kotlin and C#.

Every finding carries the notation it was written in — decimal, hex, binary, octal, scientific, bigint. For anything left over you can pick a format explicitly or fall back to a plain-text scan (no grammar: v1.2.3 reads as 1.2 and 0.3).

The CLI

The same extraction runs from a terminal or a shell pipeline: a Rust CLI in crate/, sharing one corpus with the extension — crate/fixtures/ — so the two can never read a document differently. Install it from npm with npm install -g numbers-le (or run it with npx numbers-le) or from crates.io with cargo install numbers-le. Both install the same command and are held to the same output byte for byte, apart from the words a parser uses to refuse a broken document.

bash
numbers-le .                     # every number in the tree; JSON on stdout when pipednumbers-le --values config/      # just the numbers, one per linenumbers-le mcp                   # the same extraction over MCP on stdio
# the point of the whole thing:numbers-le --values --dedupe src/ | sort -n > after.txtdiff before.txt after.txt        # what constants moved this release

[numbers-le in a terminal]

Install it from npm (numbers-le) or from crates.io (numbers-le). Both install the same numbers-le command.

[numbers-le on npm] [numbers-le on crates.io]

bash
npm install -g numbers-le   # or run it once: npx numbers-lecargo install numbers-le

Somebody has to verify that the rate in the code is the rate in the specification. A tax percentage, a retention window, a rounding boundary. In a regulated setting that check is a deliverable, and the person doing it usually has no checkout and never has the editor open.

Numbers are printed exactly as JavaScript prints them — 1e+21, not Rust's 1000000000000000000000. This tool's whole output is numbers as text, so the rendering is the contract, and the corpus pins it.

Exit codes follow grep — 0 numbers found, 1 none found, 2 the question was malformed.

Commands

CommandDescription
Numbers-LE: Extract NumbersExtract all numbers from the active document
Numbers-LE: Deduplicate NumbersRemove duplicate numbers from the results
Numbers-LE: Sort NumbersSort results numerically or by magnitude
Numbers-LE: Open SettingsOpen Numbers-LE settings
Numbers-LE: Help & TroubleshootingBuilt-in documentation

No command is bound to a key by default. Give any of them one under Keyboard Shortcuts in the editor.

Settings

SettingDefaultDescription
numbers-le.openResultsSideBySidetrueOpen results beside the current editor
numbers-le.postProcess.openInNewFiletrueDedupe/Sort write to a new file instead of replacing the editor content
numbers-le.showPositionsfalseShow the line and column of each number
numbers-le.copyToClipboardEnabledfalseAlso copy results to the clipboard (non-CSV)
numbers-le.clipboardIncludesPositionsfalseInclude the line and column in that copy
numbers-le.dedupeEnabledfalseDeduplicate automatically during extraction
numbers-le.sortEnabledfalseSort automatically during extraction
numbers-le.sortModeoffnumeric-asc/desc, magnitude-asc/desc
numbers-le.showParseErrorsfalseSurface parse errors as notifications
numbers-le.notificationsLevelsilentall = every notification, important = warnings + errors, silent = errors only
numbers-le.safety.enabledtrueGuardrails for very large files/outputs
numbers-le.safety.fileSizeWarnBytes1000000Warn above this file size
numbers-le.safety.largeOutputLinesThreshold50000Offer Open/Copy/Cancel above this result count
numbers-le.safety.manyDocumentsThreshold8Confirm before opening this many column documents
numbers-le.statusBar.enabledtrueShow the status bar item
numbers-le.telemetryEnabledfalseLocal-only event log (see Privacy)

Languages

Twelve languages besides English:

German · Spanish · French · Indonesian · Italian · Japanese · Korean · Portuguese (Brazil) · Russian · Ukrainian · Vietnamese · Chinese (Simplified)

Both halves are covered — the manifest (command titles, setting names and descriptions) and everything shown while the extension runs (notifications, the status bar, quick-picks and prompts). The extension follows VS Code's display language, so it matches whatever the editor is already set to; no setting of its own.

Privacy & security

  • No network access. The extension never sends data anywhere. The telemetryEnabled setting only writes events to a local Output Channel you can inspect (Numbers-LE).
  • The MCP server holds the same line. It takes content as an argument and returns data: no filesystem access, no network calls, no telemetry. Your agent already has file-read tools, so duplicating them inside the server would add a path-traversal surface for no capability. check:mcp-bundle fails the build if the server ever imports something that could reach either.
  • Error notifications redact home directories and credential-shaped fragments.
  • One rating prompt, at most twice. On the 3rd successful use the extension asks once whether you would rate it, and once more on the 20th if you chose Later or dismissed it. Don't Ask Again ends it. Setting notificationsLevel to important or silent yourself turns it off. The counts are kept in VS Code's extension storage and nothing is sent anywhere; Rate opens the listing you installed from — the VS Code Marketplace or Open VSX — in your browser.

Documentation

WhatWhere
What the tool is allowed to say — scope, output contract, refusals, non-goalscrate/SPEC.md
How the extension is built and held together — architecture, invariants, toolchain, releaseAGENTS.md
How the CLI is built and held togethercrate/AGENTS.md
What changedCHANGELOG.md · crate/CHANGELOG.md
The tool's page, and the other fifteenletools.dev/tools/numbers-le

Performance

InputSizeFoundTimeRateScan speed
JSON metrics2.18 MB120,00069.12 ms1,736,013/sec31.6 MB/s
CSV data0.93 MB150,00088.02 ms1,704,098/sec10.6 MB/s
INI config0.42 MB30,00023.01 ms1,303,868/sec18 MB/s

Median of 7 runs after warmup, on Apple M5 Pro, 24 GB RAM, Node 24.3.0. Inputs are generated by scripts/benchmark.ts rather than checked in, so the sizes above are exactly what was measured. Reproduce with bun run benchmark.

These are machine-specific and are not asserted in CI — a benchmark that gates a build only tells you how busy the runner was.

Testing

MetricCoverage
Statements81.24%
Branches72.41%
Functions89.08%
Lines82.72%

526 test cases across 37 files, plus an integration suite that runs in a real VS Code extension host and an end-to-end test that installs the built .vsix into a clean profile.

Generated from a real run — coverage/coverage-summary.json and coverage/test-results.json — by scripts/coverage-readme.js, and bun run coverage:readme:check says whether it has drifted since. Reproduce with bun run test:coverage, and the case count is the one vitest prints.

More from the LE family

Sixteen single-purpose tools for the work in front of every model. Each ships a Rust CLI and an MCP server. One page: letools.dev

Get it out

  • String-LE — Extract every string in a codebase, so a person can read them
  • Numbers-LE — Extract every hardcoded number in a codebase, so a person can check them
  • Units-LE — Extract every quantity with its unit, normalized, and refuse the ambiguous ones by name
  • Dates-LE — Extract every date and timestamp, and the exact instant each one resolves to
  • IDs-LE — Extract every UUID, ULID, NanoID, ObjectId and Snowflake, and decode the time inside
  • IPs-LE — Extract every IP address, CIDR block and MAC, normalized and classified by scope
  • URLs-LE — Extract every URL in a codebase, with its protocol and exact position
  • Paths-LE — Extract every file path in a codebase, and say whether it still points at anything
  • Colors-LE — Extract every color in a codebase, and say which ones are not in your palette

Check it

  • Regex-LE — Find every regex in a codebase, and report which can be driven into catastrophic backtracking
  • Versions-LE — Find where one dependency is constrained differently across a repository's manifests
  • i18n-LE — Identify the i18n library a project uses, then audit its catalogs by that library's rules
  • Scrape-LE — Check whether a page is scrapeable before the scraper is written, and say when it cannot tell

Guard it

  • Secrets-LE — Find hardcoded credentials in a codebase, and never print one into the report
  • EnvSync-LE — Compare the dotenv files in a tree, and say which keys are missing from which
  • Unicode-LE — Find the Unicode that hides meaning — bidi controls, invisibles, homoglyphs, mixed scripts

Each stands on its own: no shared crate, no published core. Where two of them agree, it is because the same answer was right twice.

Contact — nolindnaidoo.com · GitHub · LinkedIn

Also by nolindnaidoo

Rust — pixelcoords and pixelactions are one loop: pixelcoords answers where, pixelactions acts there. Their own tools, their own voice — not part of the LE family.

License

MIT © nolindnaidoo

来源:README.md,提交 5c7a03c

工具

1

extract_numbers

Extract every numeric value from a document. Parses JSON, YAML, CSV, TOML, INI and dotenv, and reads numeric literals in Python, Rust, Go, Java, Kotlin, C#, C, C++, JavaScript, TypeScript, SQL and shell — including hex, binary, octal, digit separators and type suffixes. Anything else is scanned as plain text, so a format is optional. Returns each number with the notation it was written in, in document order, and its 1-based line and column where the source says exactly where it is: JSON, the source languages and plain text. Parsed formats (YAML, TOML, CSV, INI, dotenv) carry no position.

输入参数dedupeformatcontent必填filenamemaxResults

版本历史

7
  1. v2.8.0最新Oct 29, 2026
  2. v2.5.0Oct 8, 2026
  3. v2.4.3Oct 5, 2026
  4. v2.4.2Oct 3, 2026
  5. v2.4.0Oct 1, 2026
  6. v2.3.1Sep 30, 2026
  7. v2.3.0Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Numbers 集成