fp-conv-mcp
Floating Point Conversion Calculator
Interactive tool for converting and visualizing floating-point numbers across standard and custom formats. Convert between FP32, FP16, BF16, TF32, FP8, etc. while inspecting binary representations and precision loss.
Live URL: https://sw23.github.io/fp-conv/
Features
Format presets: FP64, FP32, FP16, BF16, TF32, OCP FP4/FP6/FP8
Integer formats: INT32, UINT32, INT16, UINT16, INT8, UINT8, INT4, UINT4
OCP format support: Full support for Open Compute Project FP8 and microscaling formats
Custom formats: Define any bit layout (0–15 exponent bits, 0–112 mantissa bits)
Interactive editing: Toggle individual bits and see decimal/hex updates
Precision analysis: Calculate absolute and relative error between formats
Special values: Explore zero, infinity, NaN, subnormals, and boundary cases
Rounding modes: Implements IEEE 754 rounding modes (ties to even, ties away from zero, toward zero, toward +inf, and toward −inf)
Overflow behavior: Configurable overflow (Infinity/NaN vs. max normal).
NaN handling: Convert a NaN to the output's canonical quiet NaN, or keep its sign and payload as IEEE 754 §6.2.3 describes (details)
Fixed-point mode: Set exponent bits to 0 for fractional representations
Light and dark modes: Switch between light and dark themes based on your preference
Basic and advanced views: Additional details shown in advanced mode. Defaults based on the screen width until you choose
Shareable links: Bookmark or share a conversion via URL parameters (input/output format, value, rounding mode, overflow behavior, NaN handling, and view mode)
Mobile-friendly: Works on screens of all sizes
WebMCP API: AI agents can perform conversions via WebMCP
Related MCP server: DevKits MCP Server
Supported Formats
The following standard formats are supported, in addition to any custom format you define (up to 15 exponent bits and 112 mantissa bits). Interactive pages have been created to help explain and visualize each standard format:
Integer: INT32, UINT32, INT16, UINT16, INT8, UINT8, INT4, UINT4
OCP Microscaling: FP8 E4M3, FP8 E5M2, FP6 E2M3, FP6 E3M2, FP4 E2M1, E8M0 (MX scale), MXINT8
Custom: Supports a wide range of user-defined formats
MCP Server
The fp-conv-mcp npm package provides
a local Model Context Protocol server, giving
agents direct local access to floating point format conversions.
Example client configuration (VS Code, .vscode/mcp.json):
{
"servers": {
"fp-conv": {
"type": "stdio",
"command": "npx",
"args": ["-y", "fp-conv-mcp"]
}
}
}See the package README for full usage, per-client setup, and debugging instructions.
Command-Line Tool
The fp-conv-cli npm package provides a
cross-platform command-line version of the converter (Windows, macOS, and Linux),
reusing the same conversion engine as the web app and MCP server. The installed
command is fp-conv.
npx fp-conv-cli convert 3.14 --from fp32 --to fp16It supports encode, decode, convert, info, and list commands with
human-readable or --json output. See the
package README for full usage and examples.
Development
See CONTRIBUTING.md for local setup, testing, linting, serving the site, and the oracle test-vector workflow.
License
MIT © 2026 Spencer Williams. See LICENSE.
Available Tools
5 toolsconvert_formatConvert formatARead-only
Convert a value or bit pattern from one floating-point or integer format to another. Returns full encoding details for both formats and precision loss analysis.
Inputs: inputFormat (required), outputFormat (required), bits, value, +3 more.
decode_bitsDecode bitsARead-only
Decode a binary or hexadecimal bit-pattern into a specified format. Returns the decimal value and full component breakdown.
Inputs: bits (required), format (required).
encode_numberEncode numberARead-only
Encode a decimal number (or special value like Infinity / NaN) into a specified floating-point or integer format. Returns binary, hex, and component breakdown.
Inputs: value (required), format (required), overflowMode, roundingMode.
get_format_infoGet format infoARead-only
Get detailed information about a floating-point or integer format, including value range (max/min normal, subnormal), bias, and special value support.
Inputs: format (required).
list_formatsList formatsARead-only
List all available floating-point and integer format presets supported by this converter. Returns format keys, names, categories, and parameters (bits, exponent, mantissa, etc.).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct role: listing formats, encoding, decoding, converting between formats, and retrieving detailed format metadata. The only mild overlap is between list_formats and get_format_info, but the former is collection-level and the latter is single-format detail, so selection is unambiguous.
All tool names follow a consistent snake_case verb_noun pattern: list_formats, encode_number, decode_bits, convert_format, get_format_info. The convention is predictable throughout.
Five tools are well-scoped for a floating-point format converter. The set covers discovery, metadata lookup, encoding, decoding, and conversion without redundant tools.
The tool surface covers the full lifecycle for this domain: discovering formats, inspecting format details, encoding values, decoding bit patterns, and converting between formats with precision-loss analysis. No obvious operational gap remains for a format converter.
Maintenance
Related MCP Connectors
Free deterministic tools for math, data transforms, dates, text, statistics, finance, and units.
300+ offline developer utilities, plus 22 AI tools with a free API key. JSON, JWT, regex, cron, SQL.
500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.
Will this LLM fit on your GPU, multi-GPU rig or Mac? Exact VRAM & KV-cache math. Read-only.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables comprehensive color manipulation, conversion between 22+ formats (HEX, RGB, HSL, CMYK, LAB, etc.), palette generation, gradient creation, and accessibility compliance checking. Supports framework-specific outputs for CSS, Swift, Android, Flutter, and Tailwind with high-precision conversions and visualization capabilities.25MIT
- AlicenseNot gradedqualityDmaintenanceProvides 12 local developer tools (JSON format, Base64, JWT decode, regex test, hash, UUID, etc.) for AI assistants like Claude Desktop and Cursor.7 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to perform accurate local computations including arbitrary-precision math, date handling, unit conversion, subnet calculations, encoding, hashing, and text analysis, all without network calls or API keys.27MIT
- AlicenseBqualityCmaintenanceEnables LLMs to run arbitrary-precision integer and bitwise operations, endianness swaps, IEEE 754 float decomposition, hashing/checksum/modular math, data codecs, statistics, and trigonometry through 29 specialized tools. Its chained batch execution engine lets multiple dependent steps run in one call, eliminating multi-turn round-trip overhead.2916 npm20MIT