STEM Calc MCP
STEM Calc MCP is a read-only, offline calculator server for chemistry and unit-conversion homework.
Calculate the molar mass of a chemical formula, including brackets and hydrates, with an element-by-element mass breakdown.
Balance chemical equations written with
+and->.Convert between grams, moles, and particles; a formula is required when grams are involved.
Convert compatible units of length, mass, time, volume, energy, temperature, pressure, speed, or flow rate, and refuse incompatible conversions.
Round a number to a specified number of significant figures.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@STEM Calc MCP Balance C3H8 + O2 -> CO2 + H2O and give the molar mass of O2"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
STEM Calc MCP
When an AI guesses chemistry and physics homework, the numbers are often wrong. STEM Calc MCP fixes that: it is a free, open source MCP server that does the arithmetic with tested code, so you get the same answer every time. It works out molar mass, balances chemical equations, converts between grams, moles and particles, converts units, rounds to the right number of significant figures finds empirical formulas and gives the percent composition of a formula.
Install with one line:
npx -y stem-calc-student-mcpTry these prompts:
"What is the molar mass of copper sulfate pentahydrate, CuSO4.5H2O?"
"Balance this equation: C3H8 + O2 -> CO2 + H2O"
"How many moles are in 36 grams of water?"
Use it with Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and any other app that runs a local MCP server. It runs on your computer and needs no internet, no account and no API key.
Claude Desktop
Add this to claude_desktop_config.json, then restart the app:
{
"mcpServers": {
"stem-calc": {
"command": "npx",
"args": ["-y", "stem-calc-student-mcp"]
}
}
}Claude Code
claude mcp add stem-calc -- npx -y stem-calc-student-mcpCursor
Add the same block as for Claude Desktop to .cursor/mcp.json.
VS Code
VS Code uses a servers key, not mcpServers. Add this to .vscode/mcp.json:
{
"servers": {
"stem-calc": {
"type": "stdio",
"command": "npx",
"args": ["-y", "stem-calc-student-mcp"]
}
}
}Tools
All ten tools are read only. They calculate an answer and never change anything on your computer.
Tool | What it does | Inputs | Example prompt |
| Molar mass of a formula in g/mol, with the mass each element adds |
| "What is the molar mass of Ca(OH)2?" |
| Balances a chemical equation |
| "Balance C3H8 + O2 -> CO2 + H2O." |
| Converts between grams, moles and particles |
| "How many moles are in 36 grams of water?" |
| Converts a value from one unit to another |
| "Convert 2.5 km to feet." |
| Rounds a number to a number of significant figures |
| "Round 123456 to 3 significant figures." |
| Finds the simplest whole number formula from mass composition |
| "What is the empirical formula of a compound that is 40 percent carbon, 6.7 percent hydrogen and 53.3 percent oxygen?" |
| Finds the percent by mass of each element in a formula |
| "What is the percent composition of Ca(OH)2?" |
| Solves molarity (M = mol/L) or a dilution (M1V1 = M2V2) for the one value you leave out |
| "What is the molarity of 0.5 mol of NaCl in 2 L of solution?" |
| Balances a reaction, then finds the limiting reagent, the theoretical yield of a product and the grams left over of each excess reactant |
| "How much NH3 can I make from 28 g of N2 and 3 g of H2, and which one runs out?" |
| Solves PV = nRT for the one value you leave out. Pressure is in atm or kPa, volume in L, temperature in K |
| "At 300 K, what pressure in kPa does 2 mol of gas have in a 10 L tank?" |
Every tool also returns its answer as fields next to the text, so an app that reads JSON gets the numbers without picking them out of a sentence.
Related MCP server: mcp-mathjs
What it knows
Formulas. Write each element with a capital first letter. Round brackets and square brackets work, so
Fe2(SO4)3andK3[Fe(CN)6]are fine, and so are hydrates written with a dot, likeCuSO4.5H2O. It knows 56 common elements, from hydrogen to uranium. A symbol it does not know gets a clear error, never a guess.Fe2(SO4)3has 2 iron, 3 sulfur and 12 oxygen atoms, and a molar mass of 399.858 g/mol.K3[Fe(CN)6]has 3 potassium, 1 iron, 6 carbon and 6 nitrogen atoms, and a molar mass of 329.247 g/mol.CuSO4.5H2Ocounts the five waters, so it has 1 copper, 1 sulfur, 9 oxygen and 10 hydrogen atoms, and a molar mass of 249.677 g/mol.
Units. Length:
m,km,cm,mm,in,ft. Mass:g,kg,mg,lb. Time:s,min,h. Volume:L,mL,m^3. Energy:J,kJ,cal,kcal. Temperature:K,C,F. Pressure:Pa,kPa,atm,mmHg,bar,psi. Speed:m/s,km/h. It refuses to convert one kind into another, so metres to seconds is an error.What it does not do. It does not find a limiting reagent, work with charges or isotopes, balance reactions that have no solution, or calculate a molecular formula from an empirical one. When it cannot answer, it says so.
How it compares
Some MCP servers connect an assistant to a learning management system, so it can read your courses, grades and due dates. Those need an account, a login and a network connection. This one does none of that. It only does homework math, and it runs on your own computer with no sign in, no network calls and no files read or written. The same input gives the same answer every time.
Use an LMS server to find out what is due. Use this one to check the chemistry and unit conversions once you sit down to do it. They work fine side by side.
Node version
There are two floors here, and they are not the same number.
What you are doing | Node.js |
Running the published server | 20 or newer |
Building and testing a clone | 22.12 or newer, on the 22 and 24 release lines or 26 and later |
The server itself is happy on Node.js 20, and that is what engines in package.json says. The test runner wants a newer Node.js, so the development floor lives in devEngines in the same file. npm checks devEngines before install, run and test, so a clone on Node.js 20 stops with a clear message instead of a strange failure part way through the test suite. The 23 and 25 release lines are left out on purpose, because the test runner does not run on them.
Both numbers live in package.json, and a test in tests/node-version.test.ts keeps them in step with the README and with the range the test runner asks for.
Development
npm install
npm run build
npm testThe tests call the same functions the tools use, and they check the README, llms.txt, glama.json and the package files against the tools in src/tools.ts.
npm test also runs the metadata and docs sync checks in tests/metadata.test.ts. If you add or change a tool, update glama.json, llms.txt and this README in the same change, or those checks will fail.
More free student MCP servers
All free, open source and read only where they touch your accounts. Browse the full list at brightspacemcp.com/more-mcps.
Server | What it does |
D2L Brightspace for AI. Due dates with real submission status, grades, a target grade calculator and course files. | |
Canvas LMS for AI, read only. Due dates, missing work, grades and announcements. | |
Moodle for AI, read only. Due dates, overdue work, grades and announcements. | |
Google Classroom for AI, read only. Todos, due dates, missing work and grades. | |
GPA, grade conversion and the grade you need on the final, for AI. Works offline, no account. | |
APA, MLA and Chicago citations from a DOI, an ISBN or typed details. No account. | |
Exam study schedules, spaced repetition dates, pomodoro plans and assignment milestones. Works offline. | |
Search scholarly papers, find open access copies and related work through OpenAlex. No key needed. | |
Clean, convert, dedupe and lint BibTeX, RIS and CSL JSON reference lists, and make cite keys. Works offline. | |
Find free legal copies of textbooks on OpenStax, DOAB and Open Library, look up editions by ISBN and suggest cheaper older ones. | |
Offline writing metrics for essays. Word and page counts, readability scores, passive voice, repeated openers, filler words, long sentences and word limit checks, so students can check their work against assignment requirements. No account, no network. | |
Syllabus to calendar MCP server. Extract dates from syllabus text, build an ics calendar, expand recurring classes and merge calendars. Works offline, no account. | |
Job application tracker MCP server. Track internships, jobs, interviews and deadlines offline, see what is coming up, and export your list as CSV or Markdown. No account and no API keys. |
License
MIT
Available Tools
10 toolsbalance_equationBalance equationARead-only
Balance a chemical equation written with -> and +.
Inputs: equation (required). Returns: balanced
convert_unitsConvert unitsARead-only
Convert a value between units of length, mass, time, volume, energy, temperature, pressure, speed or flow rate. Common spellings like ml, degC, °C and L/min are accepted. It refuses to convert one kind of unit into another.
Inputs: to (required), from (required), value (required). Returns: result
empirical_formulaEmpirical formulaARead-only
Find the simplest whole number formula from mass composition. Pass each element's mass or its percent of the total.
Inputs: composition (required), unit. Returns: counts, formula
ideal_gas_lawIdeal gas lawARead-only
Solve the ideal gas law PV = nRT for the one value you leave out. Pressure is in atm or kPa, volume in liters, temperature in kelvin and amount in moles. The answer comes back in the same pressure unit you used.
Inputs: moles, kelvin, liters, pressure, +1 more. Returns: moles, kelvin, liters, solved, +2 more
limiting_reagentLimiting reagentARead-only
Find the limiting reagent and theoretical yield for a reaction. Pass the unbalanced or balanced equation and the grams of every reactant. It balances the equation first, then reports the limiting reagent, the theoretical yield of a product in grams and moles, and the grams left over of each excess reactant.
Inputs: equation (required), reactants (required), product. Returns: product, balanced, limiting, theoreticalYieldGrams, +1 more
molar_massMolar massARead-only
Parse a chemical formula and return the molar mass in g/mol with the mass each element adds. Handles brackets and hydrates like CuSO4.5H2O.
Inputs: formula (required). Returns: mass, breakdown
percent_compositionPercent compositionARead-only
Find the percent by mass of each element in a chemical formula, along with the molar mass. This is the reverse of empirical_formula.
Inputs: formula (required). Returns: mass, elements
round_sig_figsRound sig figsARead-only
Round a number to a given number of significant figures.
Inputs: value (required), sigFigs (required). Returns: result
solution_mathSolution mathARead-only
Solve molarity (M = mol/L) or a dilution (M1V1 = M2V2). Leave out the one value you want and it is solved. Volumes are in liters.
Inputs: mode (required), moles, liters, molarity, +4 more. Returns: result, solved
stoichiometryStoichiometryARead-only
Convert between grams, moles and particles. The formula is required whenever grams are the from or to unit. Converting between moles and particles needs no formula.
Inputs: to (required), from (required), value (required), formula. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a clearly named chemistry operation, and complementary pairs like percent_composition/empirical_formula explicitly note their inverse relationship, which helps. The main overlap is between stoichiometry and limiting_reagent, since both convert grams/moles, but the descriptions distinguish them adequately.
All names use consistent snake_case and lowercase, which is good. However, the convention mixes verb-first names (balance_equation, convert_units, round_sig_figs) with noun-phrase names (percent_composition, empirical_formula, ideal_gas_law, molar_mass), making the pattern unpredictable even though each name is readable.
Ten tools is well within the ideal range and each corresponds to a distinct, commonly needed chemistry calculation. No tool feels redundant or like padding.
The surface covers core general-chemistry workflows: balancing, molar mass, composition, empirical formula, stoichiometry, limiting reagent, gas law, solutions, unit conversion, and sig figs. Minor gaps exist for adjacent topics like molecular formula from empirical data, pH/acid-base, and equilibrium calculations.
Maintenance
Related MCP Connectors
Physics calculators that show their work, plus the CODATA 2022 constants. Educational use.
Free deterministic tools for math, data transforms, dates, text, statistics, finance, and units.
More than a hundred everyday tools: PDFs, images, text, data, calculators, dice and currency.
Exact arithmetic, algebra, calculus, physics, chemistry and finance with a checkable formula.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables generation of chemical structures, reactions, spectra, titration curves, 3D models, and more from natural language or SMILES, using RDKit for offline rendering and supporting formats like PNG, SVG, CDXML, and Anki decks.418514 PyPI32Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables evaluating mathematical expressions and converting between units such as length, weight, temperature, volume, and time.267 npmMIT
- AlicenseBqualityCmaintenanceEnables AI agents to perform 22 unit conversions and common calculations such as length, weight, temperature, volume, tip, percentage, date difference, age, currency, cooking, and fuel consumption.141MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to list, explain, and run the same 20 offline water-chemistry calculations with explicit units, assumptions, references, warnings, and worked steps. It is read-only and requires no API key, account, cloud calculation, or internet connection after installation.MIT