MCP server for materials simulations
Compute thermal conductivity from your AI agent, at a maximum price set before the run.
MaterialsCodeGraph gives your agent one MCP server for Quantum ESPRESSO, GPUMD, and kALDo. Every run starts with a free, binding quote and ends with a permanent record of its inputs, code versions, and artifact hashes.
- price
- 0.001 USD per token, rate card 6
- a quote
- free no hardware starts
- silicon, kALDo
- 179 tokens = 0.18 USD launch to record in 4:20 (Fig. 1)
- academic signup
- 5,000 tokens about 27 runs like Fig. 1
An academic email (.edu, .edu.xx, .ac.xx) gets 5,000 tokens at signup. Reading and quoting are free for every account. Plans and token blocks are on sale in the app.
claude mcp add --transport http mcg https://api.materialscodegraph.com/mcp \ --header "Authorization: Bearer $MCG_MCP_KEY"
export MCG_MCP_KEY=mcg_sk_... # or put it in your shell profile codex mcp add mcg --url https://api.materialscodegraph.com/mcp --bearer-token-env-var MCG_MCP_KEY
curl -s https://api.materialscodegraph.com/mcp \
-H "Authorization: Bearer $MCG_MCP_KEY" -H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"mcg_rates","arguments":{}}}'
Then ask your agent: Price a thermal conductivity calculation for silicon at 300 K on MaterialsCodeGraph.
Fig. 1 A run, replayed from its event log
t = 4:20 of 4:20- 0:00launch179 tokens, bound to the quote
- 0:20provisionhardware requested
- 0:22hardwareCPU on an NVIDIA L40S node
- 1:21bootimage phonon@c6efafd04d2d
- 2:45computekALDo, direct-inverse BTE
- 3:12resultκ = 254.52 W/(m K) at 300 K
- 3:20gatepass: finite, non-negative, plausible magnitude (convergence not assessed)
- 4:19artifacts5 files, SHA-256 each
- 4:20done179 quoted, 179 billed
§ 1 Price
Every run is priced before it starts.
mcg_quote returns the binding price of a request at no cost. mcg_run starts a run that never costs more than that price, or it refuses to launch and charges nothing. These rows come from mcg_catalog, which your agent reads live.
| computes | method, from mcg_catalog | tokens | USD | wall time |
|---|---|---|---|---|
| Lattice thermal conductivity of silicon from first principles, relaxation-time approximation | Bulk phonons and thermal conductivity, DFPT + 2n+1 BTE (QE + D3Q) | 1,339 | 1.34 | 35 min |
| Lattice thermal conductivity of silicon from first principles, full linearized Boltzmann equation | Bulk thermal conductivity, exact BTE (CGP, QE + D3Q) | 1,339 | 1.34 | 35 min |
| Lattice thermal conductivity of silicon, full linearized Boltzmann equation with the Tersoff potential (the run in Fig. 1) | kALDo direct inversion, three-phonon (catalog graph kaldo-direct-bte) | 179 | 0.18 | 4 min, measured |
Tokens and wall time from mcg_catalog, read 2026-10-18 UTC at rate card 6 (JSON), with private engines and retired kinds removed. The kALDo row is the measured quote and run of Fig. 1. Today the QE + D3Q engine covers silicon only, on meshes below convergence, so its values are pipeline checks.
| plan | price | tokens per period | academic email (.edu, .edu.xx, .ac.xx) | status |
|---|---|---|---|---|
| Signup | 0 | 0 | 5,000 once | available today |
| Monthly | 20 USD | 20,000 | 40,000 | on sale, first three months free on a first purchase while the offer runs |
| Yearly | 200 USD | 240,000 | 480,000 | on sale |
| 10,000-token block | 10 USD | 10,000 once | 10,000 once | on sale, tokens do not expire while the account is open |
| 50,000-token block | 50 USD | 50,000 once | 50,000 once | on sale, tokens do not expire while the account is open |
| 250,000-token block | 250 USD | 250,000 once | 250,000 once | on sale, tokens do not expire while the account is open |
An academic email receives 5,000 tokens at signup, and a quote is free for every account. Plans and blocks are bought on the billing page of the app, and checkout runs on Stripe. A run spends plan tokens before block tokens. The rate card, with the USD price of one token, is served at api.materialscodegraph.com/api/rates. Refunds, expiry and the conditions of the three-month offer are in the terms.
§ 2 Calls
An agent prices a run, launches it, and reads the record.
Three tool calls cover a run. The field names are the ones the server returns.
1mcg_quote
{
"kind": "bulk_kappa",
"name": "Si thermal conductivity, QE + D3Q, 300 K",
"material": "Si",
"engine": "qe_d3q",
"conditions": {
"temperature_K": [
300
]
},
"spec": {
"params": {}
},
"study": "materialscodegraph.com landing"
}Returns quote_id, quote_hash, tokens, wall_s, and expires_at. Spends nothing.
2mcg_run
{
"quote_id": "...",
"quote_hash": "...",
"idempotency_key": "...",
"max_tokens": 1339
}Holds the quoted tokens or refuses a repriced or expired quote. The run is charged no more than the hold. The same idempotency_key returns the same run.
3mcg_get_run
{
"run_id": "..."
}Returns state, billing, and the record. mcg_fetch_artifacts lists every file with its SHA-256. Spends nothing.
The reply to call 1, captured 2026-10-16 UTC (JSON): a QE + D3Q silicon quote, a pipeline check below convergence
- quote_id
- sim_ad4abea948104900bcf0
- tokens
- 1,339 = 1.34 USD, binding
- wall_s
- 2,088 35 min
- expires_at
- 2026-10-16T01:07:25.354Z
§ 3 Record
The run in Fig. 1, as its record.
mcg_get_run and mcg_fetch_artifacts return these fields for every finished run. Each artifact carries its SHA-256, so a rerun can be checked file by file.
- run_id
- run_e67bd64f82b84c5ba71d
- state
- done
- billing
- 179 quoted, 179 billed tokens, 0.18 USD
- hardware
- CPU on an NVIDIA L40S node
- result
- 254.518 W/(m K), direct-inverse BTE, 300 K, one deterministic solve
- reference
- 254.466 W/(m K), OpenMaterials conformance target, 2% tolerance f64affbf549a
- conditions
- lineage f64affbf549a: Si.tersoff, a = 5.432 Å, supercell 3x3x3, mesh 5x5x5, quantum occupation
- time
- 4:20 launch to record
- artifacts
- 5 files, SHA-256 each event log, billing, and hashes: JSON
§ 4 Connect
Connect your MCP client to one endpoint.
- endpoint
- https://api.materialscodegraph.com/mcp
- transport
- Streamable HTTP, POST-only JSON-RPC: initialize, ping, tools/list, tools/call
- tools
- mcg_catalog, mcg_rates, mcg_quote, mcg_clusters, mcg_stage, mcg_run, mcg_list_runs, mcg_get_study, mcg_list_studies, mcg_update_study, mcg_study_members, mcg_delete_study, mcg_archive, mcg_get_run, mcg_cancel_run, mcg_fetch_artifacts, mcg_get_artifact
- key scopes
- read, quote, spend (a new key reads and quotes)
- daily_token_cap
- required on every spend key: the most tokens it may commit per UTC day, or "unlimited" (only the account balance bounds it)
- for agents
- llms.txt