PluginWorld
Fp

fp-conv

MCP

Encode, decode, and convert numbers across FP64, FP32, FP16, BF16, TF32, OCP FP8/FP6/FP4, MX, and integer formats, with bit-level breakdowns, rounding modes, and precision-loss analysis. Runs locally; no API key needed.

@sw23 · v1.0.0 · MIT License · updated today

SECURITY

B

SCORE

70

STARS

▲ 7

PLUG IN

git clone https://github.com/sw23/fp-conv.git

See the README to configure this MCP server

README

Floating Point Conversion Calculator

fp-conv-mcp fp-conv-cli Unit Tests

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

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:

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 fp16

It 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.

SIMILAR PLUGINS