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.0.tar.gz (15.3 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.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymat_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 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.0.tar.gz
Algorithm Hash digest
SHA256 3bf36c5d4df153f91df07e1b89e2f42306d8ffc4ca7be4bdb3ada5d212b7fb67
MD5 2ee282b47a90aff3e83bff90550ff0c4
BLAKE2b-256 1cd4360a82ad64423acfaeb391c8b8a5ca9dfe1637a289a22920dc68375debfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymat_mcp-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: pymat_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bbb712a5cac1878829c461e462a3c7ddd75c99cc0e730ac830b7dd7fd86b082
MD5 a3e241625308df1c082198548e63da05
BLAKE2b-256 0b3b97a95529602f9871654a8bbad4494bfdbd743c86b11cf3b9cab9c7d378bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymat_mcp-0.1.0-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