Reconstitution Calculator MCP

MCP-сервер с шестью лабораторными математическими инструментами: концентрация для восстановления, конвертация единиц, разведение C1V1, молярность, процент w/v и серийное разведение. Чистая математика, без сетевых вызовов. От Peptara Labs.

Документация

Reconstitution Calculator MCP Server

A small Model Context Protocol server with six lab math tools. Pure math, no network calls, no data stored. Same formulas as the Reconstitution Calculator browser extension.

Made by Peptara Labs (https://www.peptaralabs.io)

Tools

ToolWhat it doesInputs
reconstitution_concentrationConcentration after adding diluent to a powder, in mg/mL and mcg/mL, plus the volume in mL and µL that holds a wanted amountpowder_amount, powder_unit (mg, mcg, g), diluent_ml, optional wanted_amount, wanted_unit
convert_unitsConverts mass, volume or mass concentration unitsvalue, from, to
dilution_c1v1Solves C1V1 = C2V2 for the one missing value and gives the diluent volume to addany three of c1, v1, c2, v2
molarityMass needed for a molarity, or molarity from a massmw, volume, volume_unit, then molarity and molarity_unit or mass and mass_unit
percent_solutionGrams of solute for a percent w/v solutionpercent_wv, final_volume_ml
serial_dilutionConcentration in each tube, plus transfer and diluent volume per tubestart_conc, factor, steps (1 to 20), volume_per_tube_ml

Supported units for convert_units:

  • Mass: kg, g, mg, mcg, ug, µg, ng
  • Volume: L, mL, uL, µL, nL
  • Mass concentration: g/L, mg/mL, mg/L, mcg/mL, ug/mL, µg/mL, mcg/L, ug/L, µg/L, ng/mL

Every tool checks its input. A bad value (a zero volume, a unit of the wrong kind, too many blanks) returns a clear error instead of a number.

Install

Requires Node.js 18 or newer.

Run it with npx:

npx -y reconstitution-calculator-mcp

Or run it from a local copy:

npm install
npm start

Claude Desktop config

Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "reconstitution-calculator": {
      "command": "npx",
      "args": ["-y", "reconstitution-calculator-mcp"]
    }
  }
}

From a local copy, point command at Node instead:

{
  "mcpServers": {
    "reconstitution-calculator": {
      "command": "node",
      "args": ["/absolute/path/to/mcp/src/index.js"]
    }
  }
}

Streamable HTTP

The server speaks stdio by default. Add --http to serve Streamable HTTP at /mcp (stateless, JSON responses):

node src/index.js --http --port 8081 --host 127.0.0.1

PORT, HOST and TRANSPORT=http work as environment variables too. GET /status returns a status line. The included Dockerfile and smithery.yaml run the HTTP mode in a container for remote hosting.

Example

Input to reconstitution_concentration:

{ "powder_amount": 10, "powder_unit": "mg", "diluent_ml": 2, "wanted_amount": 250, "wanted_unit": "mcg" }

Result: 5 mg/mL (5000 mcg/mL), and 250 mcg is in 0.05 mL (50 µL).

Tests

npm test

The test starts the server over stdio and over HTTP with the MCP SDK client, lists the tools, checks known answers for each tool, and runs one bad input per tool that must return an error.

License

MIT. For laboratory calculations only.