What the Units-LE MCP server does
Units-LE MCP server gives an MCP-compatible agent a way to inspect text for explicit quantities. Its extract_units tool covers four dimensions: durations normalized to milliseconds, byte quantities normalized to bytes, percentages normalized to ratios, and frequencies normalized to hertz. Results retain the written value and identify where it appeared, including a line, column, and, for structured formats, a key path.
The tool is intended for comparison and review rather than policy enforcement. It reports what a document says and does not decide whether a timeout, memory limit, retention period, or frequency is appropriate. It also does not rewrite the input or apply arithmetic to expressions.
How it works
Units-LE MCP server receives text and looks for a number attached to a recognized unit. JSON, YAML, CSV, TOML, INI, and dotenv content can be parsed for structure; other content is scanned as text. This allows the same extraction approach to cover configuration files, Kubernetes manifests, Terraform files, Markdown tables, and logs.
Recognized examples include standard duration symbols, ISO-8601 durations, duration compounds such as 1h30m, SI and IEC byte units, Kubernetes byte units, %, and common hertz symbols. Case is significant: byte and bit-like spellings are not silently treated as equivalent.
When interpretation is unsafe, the result remains visible with a reason. Ambiguous symbols, locale-style numeric separators, arithmetic expressions, fractional byte counts, and values outside the supported range can be refused. An SI/IEC byte notation hazard is handled differently: the standard base value is returned together with a warning reason rather than being discarded.
Setup and configuration
Run the MCP server with Node.js tooling using:
The README identifies this as a stdio server for MCP agents. Configure the command in the MCP client of your choice, then use the exposed extraction tool against document text. The provided material does not specify environment variables, command-line options, a configuration file, or a required Node.js version.
The project also offers separate editor and command-line entry points, but those are not required to use the MCP server. The VS Code extension and Rust CLI should therefore be treated as alternative interfaces rather than MCP configuration steps.
Tools and capabilities
Units-LE MCP server exposes the documented extract_units tool. Its supported output can represent:
- A normalized base value for unambiguous quantities.
- The original quantity text.
- The quantity dimension and unit interpretation.
- A source line and column, using editor-style UTF-16 column units.
- A structured key path when the input format provides one.
- A refusal reason when normalization is unsafe.
A bare number without a unit is excluded. Physical units such as length, mass, and temperature are outside the documented scope, as is general unit algebra such as meters per second squared.
Limitations and notes
The parser deliberately avoids guessing. For example, symbols whose meaning depends on context can be refused, and calendar years are not converted to a fixed duration. Compound quantities must follow the supported quantity grammar; an arithmetic expression is not treated as a compound measurement.
Text scanning can also identify quantity-shaped text inside opaque values, so callers should review the reported source location before treating every row as meaningful. The server reports findings but does not validate them against defaults, runbooks, platform policies, or recommended thresholds.
The README documents stdio usage through npx units-le-mcp, but does not describe an HTTP transport, authentication, workspace scanning through MCP, or a formal tool schema. Those capabilities should not be assumed from the editor and CLI features documented for the wider Units-LE project.