Skip to main content

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_material instead 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymat_mcp-0.1.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymat_mcp-0.1.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file pymat_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: pymat_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymat_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c932124850dae1d838283300356d4b073d3339d202283762538da1f0a94c14d
MD5 ff603e71684c534bad4e2b3b8161b7de
BLAKE2b-256 20fff6952ef0f2bdd42ef54f73950c027475ba862b7094d3a4b96c8805626aa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymat_mcp-0.1.1.tar.gz:

Publisher: publish-mcp.yml on MorePET/mat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymat_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pymat_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pymat_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4d198ccd967b8b2e1505e52979fc232e28b2fc94b79593dc06a21d0693a8410
MD5 d612571879c2d924fd19c5a473dbc173
BLAKE2b-256 dc229a345666fed4d2be275f7be574089f442a19ba87552a6d6e0b8a5d886684

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymat_mcp-0.1.1-py3-none-any.whl:

Publisher: publish-mcp.yml on MorePET/mat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page