MCP server exposing py-materials curated material properties to AI agents
Project description
pymat-mcp
MCP server exposing the py-materials curated material registry to AI agents — Claude Desktop, Cursor, MCP Inspector, any MCP-compatible client.
"Aluminum 6061-T6 yield strength?" — agent calls
get_materialinstead of guessing. CAD prompts that need real density / mechanical properties stop hallucinating.
Install
Zero-install via uvx:
{
"mcpServers": {
"pymat": {
"command": "uvx",
"args": ["pymat-mcp"]
}
}
}
That's it. uvx fetches pymat-mcp (which transitively pulls
py-materials) and runs it in an isolated venv per session.
For a pinned version: "args": ["pymat-mcp@0.1.0"].
For programmatic use, pip install pymat-mcp works too — the package is
fully a normal Python module.
Tools
| Tool | What |
|---|---|
search_materials(query, limit=10) |
Fuzzy lookup → list of brief rows |
get_material(key_or_name) |
Full property dump (mechanical / thermal / electrical / optical / manufacturing / compliance / sourcing) + visual identity |
list_categories() |
Top-level groups (aluminum, stainless, lyso, …) |
list_grades(material) |
Children (grades / tempers / treatments) |
compute_mass(material, volume_mm3) |
Mass in grams from a build123d-style volume |
get_appearance(material) |
Vis dict — mat-vis identity, finishes, PBR scalars |
to_threejs(material, finish=None) |
Three.js MeshPhysicalMaterial init dict |
to_gltf(material, finish=None) |
glTF 2.0 material node |
compare_materials(keys, properties=None) |
Side-by-side property comparison |
All tools are read-only. Errors come back as {"error": "...", "did_you_mean": [...]} rather than exceptions.
Example agent prompts
- "What's the yield strength of 17-4 PH H1025? Use the materials database."
- "I have a 50×50×10 mm 6061 plate; what's the mass?"
- "Give me a Three.js material dict for stainless steel with a polished finish."
- "Compare density and thermal conductivity for 6061, 7075, and copper."
Logging
Logs to stderr only (stdout is the MCP transport channel). Bump verbosity:
PYMAT_MCP_LOG=DEBUG uvx pymat-mcp
Development
git clone https://github.com/MorePET/mat
cd mat/clients/python/pymat-mcp
uv sync --all-extras
uv run pytest -v
To exercise the server interactively:
uvx mcp dev pymat-mcp # MCP Inspector — point-and-click tool calls
Links
- Source: https://github.com/MorePET/mat/tree/main/clients/python/pymat-mcp
- Issues: https://github.com/MorePET/mat/issues
- py-materials (the wrapped library): https://github.com/MorePET/mat
- MCP spec: https://spec.modelcontextprotocol.io
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymat_mcp-0.2.0.tar.gz.
File metadata
- Download URL: pymat_mcp-0.2.0.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cee68e9e570dc7b4e957e0ecede1269065cd715dd0495b556ca6f78b758e90a1
|
|
| MD5 |
b25802b748558e2a383f17ee0d94b08b
|
|
| BLAKE2b-256 |
0c097df74f6709811256f02858b6887fb6db7202ed52505762cb5365c83bd5b2
|
Provenance
The following attestation bundles were made for pymat_mcp-0.2.0.tar.gz:
Publisher:
publish-mcp.yml on MorePET/mat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymat_mcp-0.2.0.tar.gz -
Subject digest:
cee68e9e570dc7b4e957e0ecede1269065cd715dd0495b556ca6f78b758e90a1 - Sigstore transparency entry: 1438429899
- Sigstore integration time:
-
Permalink:
MorePET/mat@536e65bccc3a807b9671156e88468723c7cc443c -
Branch / Tag:
refs/tags/pymat-mcp/v0.2.0 - Owner: https://github.com/MorePET
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@536e65bccc3a807b9671156e88468723c7cc443c -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymat_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pymat_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c278c33c542f5ec3fce06994aac073a2421cedcfd0052ca94673f9f06349dfbe
|
|
| MD5 |
aa02f5551a0f174cb2bf34dafd7fc5d2
|
|
| BLAKE2b-256 |
0dfcf1463c3c32d303cf99daaf458727794c5599ca368955583c44db1b6ef63c
|
Provenance
The following attestation bundles were made for pymat_mcp-0.2.0-py3-none-any.whl:
Publisher:
publish-mcp.yml on MorePET/mat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymat_mcp-0.2.0-py3-none-any.whl -
Subject digest:
c278c33c542f5ec3fce06994aac073a2421cedcfd0052ca94673f9f06349dfbe - Sigstore transparency entry: 1438430003
- Sigstore integration time:
-
Permalink:
MorePET/mat@536e65bccc3a807b9671156e88468723c7cc443c -
Branch / Tag:
refs/tags/pymat-mcp/v0.2.0 - Owner: https://github.com/MorePET
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@536e65bccc3a807b9671156e88468723c7cc443c -
Trigger Event:
push
-
Statement type: