An MCP server for chemistry, calculations (e.g. molecular weights, isotope distributions) and a cached formula finder backed by multiple online and offline sources.
mcp-molecules demonstrates solid definition quality with well-structured tool schemas and comprehensive parameter documentation. All 5 tools have explicit descriptions (194 - 500+ chars, well above the 10-char minimum). Input schemas are complete with proper JSON Schema types, enums, and constraints. However, output schemas are not formally documented in the tool definitions, responses are inferred from docstrings rather than declared in a structured format. Tool naming follows verb_noun convention (molecular_weight_calculator, isotope_distribution, find_compound, infer_formula). Error handling is mentioned in docstrings but not formalized in the tool definitions. No tool annotations (readOnlyHint, destructiveHint) are present despite all tools being read-only operations.
Resolve a compound name or formula to a list of matching compounds. Searches the bundled offline database first (Tier 1), then the writable cache (Tier 2, populated on-demand from online sources), then optionally queries online sources (Tier 3: PubChem, Wikidata, EPA CompTox with an API key). Each match includes the canonical name and all known formulae. Offline-only when ``MCP_MOLECULES_ONLINE`` is set to a falsy value (``0``, ``false``, ``no``, ``off``, ``""). Raises ``ValueError`` for an empty query.
Infer the best-fit formula from per-element mass percentages. ``percentages`` maps element symbols to their mass percent (e.g. ``{"C": 40.0, "H": 6.71, "O": 53.29}``). ``balance``, when given, names an element assigned the remainder to 100% -- the usual convention for oxygen in CHN analysis, where only C, H and N are measured. ``molar_mass`` (g/mol), if known, scales the empirical formula up to the molecular formula. Returns a dict with the resolved input, the ``empirical_formula`` and its weight, the ``molecular_formula`` (``None`` without a molar mass), the integer ``multiplier`` search outcome, a ``fit`` block (predicted percentages, per-element residuals, RMS and max error) and any ``warnings``. Raises ``ValueError`` on an unknown element, a non-positive percentage, or percentages that leave no room for the balance element.
Report mcp-molecules server availability, version, and environment information.
Compute the natural isotopic pattern (isotope distribution) of a formula. Returns the set of isotopologue peaks a mass spectrometer would see: each peak's neutral ``mass`` (and ``mz`` when charged) and intensity relative to the base (most intense) peak. Optionally groups peaks by nominal (integer) mass (``grouping='unit'``, the low-resolution spectrum) or keeps every resolved isotopologue (``grouping='exact'``). Peaks below ``threshold`` percent of the base peak are dropped; at most ``limit`` peaks (most intense first) are returned. Also reports the monoisotopic and average masses of the formula. Raises ``ValueError`` for an unparseable formula, an unknown element, or an out-of-range argument.
Output schemas not formally documented in tool definitions. Responses are described in docstrings but not declared as structured JSON Schema. LLMs cannot reliably parse response structure without explicit schema.
No tool annotations present. All tools are read-only (safe to retry), but readOnlyHint is not declared. This forces LLMs to infer safety from descriptions rather than machine-readable metadata.
Error handling guidance is embedded in docstrings (e.g., 'Raises ValueError') but not formalized in tool definitions. LLMs cannot programmatically determine recovery paths.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2026-07-28+ | v2 |
Compute the molecular weight (molar mass) of a chemical formula. Parses ``formula`` into an atom tally, looks up each element's mass in the bundled NIST Atomic Weights and Isotopic Compositions database, and returns the total weight in the requested ``unit``. Every call reports all three distinct mass flavors under ``masses`` so callers never conflate them or have to re-ask: * ``nominal`` -- sum of the integer mass numbers of the most abundant isotopes, * ``average`` -- the standard atomic weight (average molar mass), * ``monoisotopic`` -- the exact mass of the most abundant isotopes. The ``monoisotopic`` flag selects which of these is mirrored at the top level (``weight`` / ``uncertainty`` / ``formatted``) and named by ``primary``. Optionally propagates NIST uncertainties (``uncertainty``) and/or reports percent composition by mass (``composition``). Raises ``ValueError`` for an unparseable formula or an unknown element.
find_compound accepts 'limit' parameter but does not document pagination or total count in response. Large result sets could exhaust context without explicit pagination guidance.
infer_formula's 'percentages' parameter is typed as 'object' without schema constraints. LLMs may pass invalid element symbols or negative percentages without validation hints.