Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

laszlopere/mcp-molecules MCP server](https://glama.ai/mcp/servers/laszlopere/mcp-molecules/badges/score.svg)](https://glama.ai/mcp/servers/laszlopere/mcp-molecules) 🐍 🏠 ☁️ 🐧 🍎 - Chemistry toolbox computed from authoritative data: molecular weight /...

README.md

mcp-molecules

![CI](https://github.com/laszlopere/mcp-molecules/actions/workflows/ci.yml) ![PyPI](https://pypi.org/project/mcp-molecules/) ![Python 3.10+](https://www.python.org/) ![License: GPLv3](LICENSE) ![Sponsor](https://github.com/sponsors/laszlopere) ![Ruff](https://github.com/astral-sh/ruff) ![Checked with mypy](https://mypy-lang.org/) ![Last commit](https://github.com/laszlopere/mcp-molecules/commits)

Atoms and molecules for the artificial minds β€” trustworthy chemistry tools, computed for real and backed by authoritative data.

Atoms combine into molecules, and a language model asked about them should not have to recall facts from memory; it should compute answers it can trust. mcp-molecules is a growing toolbox for working with chemical elements and molecules β€” offline, deterministic, and backed by authoritative sources such as the NIST Atomic Weights and Isotopic Compositions database.

For example, it can already take a chemical formula and return its molecular weight: ask "what does C₆H₁₂O₆ weigh?" and it parses the formula, looks every element up in NIST data, and computes the molar mass rather than guessing it. More molecule-oriented tools are planned.

You can ask things like:

  • "What does a mole of glucose weigh?" β€” resolves the name to C₆H₁₂O₆ and

computes the molar mass.

  • "How much of Feβ‚‚(SOβ‚„)₃'s mass is iron?" β€” per-element percent composition.
  • "What's the molar mass of caffeine, with uncertainty?" β€” propagates the NIST

standard uncertainties.

  • "What does the mass spectrum of chloroform look like?" β€” the natural chlorine

isotope pattern (the M, M+2, M+4 … peaks).

  • "What's the [M+H]⁺ m/z for caffeine?" β€” the protonated-ion mass.
  • "Which compound has the formula C₉Hβ‚ˆOβ‚„?" β€” formula β†’ name (aspirin, among its

isomers).

  • "What are the isomers of Cβ‚‚H₆O?" β€” one formula, several names (ethanol and

dimethyl ether).

What it gives you

  • molecular_weight_calculator β€” (one example of what's here today)

compute the molecular weight (molar mass) of a chemical formula. Parameters:

  • formula β€” element symbols, integer multipliers, arbitrarily nested

parentheses, and the isotope labels D (deuterium) and T (tritium). Examples: H2O, C6H12O6, Ca(OH)2, Fe2(SO4)3, ((CH3)2CH)2, D2O, Tc.

  • unit β€” g/mol (default), kg/mol, Da, u, or kDa.
  • uncertainty β€” propagate the per-element NIST standard uncertainties in

quadrature and report value Β± sigma.

  • monoisotopic β€” use the most abundant isotope of each element

(mass-spectrometry monoisotopic mass) instead of the standard atomic weight.

  • composition β€” return the per-element percent composition by mass.
  • isotope_distribution β€” compute the natural isotopic pattern (the peaks a

mass spectrometer would see) for a formula, with each peak's mass, m/z, and relative intensity, plus the monoisotopic and average masses. Parameters:

  • formula β€” same syntax as molecular_weight_calculator.
  • charge β€” 0 (default) reports neutral masses; a non-zero n reports m/z

for the [M+nH]/[M-nH] ion.

  • threshold β€” drop peaks below this percent of the base peak (default 0.1).
  • limit β€” maximum peaks to return, most intense first (default 10).
  • grouping β€” unit (default) collapses to nominal integer masses; exact

keeps every resolved isotopologue.

  • find_chemical_compound β€” look up a compound by name or molecular

formula. Searches a bundled offline database (a PubChem subset) and a writable user cache first, then β€” unless disabled β€” an online fallback (PubChem, Wikidata, and, when an API key is set, EPA CompTox), caching what it fetches. Parameters:

  • query β€” a name (aspirin, acetylsalicylic acid) or a formula

(H2O, C9H8O4); formulae are matched in the Hill system.

  • by β€” auto (default) guesses name vs. formula and falls back to the

other direction on a miss; name or formula pin the direction.

  • limit β€” maximum compounds to return for a formula lookup (isomers share

a formula), preferred name first.

The online fallback is on by default; set MCP_MOLECULES_ONLINE to a falsy value (0/false/no/off) to keep lookups fully offline. The EPA CompTox source additionally needs a free CCTE API key in MCP_MOLECULES_EPA_API_KEY; without it that source is skipped.

  • info β€” server availability / version / environment health check.

Install

uv tool install mcp-molecules

Register with Claude Code

claude mcp add molecules -- mcp-molecules

Development

uv sync --all-extras
uv run mcp-molecules        # run the server over stdio
uv run pytest               # tests
uv run ruff format .        # format
uv run ruff check .         # lint
uv run mypy                 # type-check

A pre-commit hook in .githooks/ auto-formats and lints staged Python files so the CI format gate can't be missed. Enable it once per clone:

git config core.hooksPath .githooks

Data

Element masses come from the NIST Atomic Weights and Isotopic Compositions database (<https://physics.nist.gov/cgi-bin/Compositions/stand_alone.pl>), which is in the public domain. The data is bundled in the package as mcp_molecules/data/nist_atomic_weights.json.

Sponsoring

Sponsoring this project will keep it alive. If it is useful to you, please consider sponsoring.

Credits

The idea and the inspiration came from MΓ‘tyΓ‘s Mayer. The idea was excellent, the inspiration priceless.

License

GPL-3.0-or-later. See LICENSE. The bundled NIST data is public domain.

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Databases servers.