Skip to content

Basic PySCF MCP tools#125

Open
JinchuLi2002 wants to merge 11 commits into
argonne-lcf:devfrom
JinchuLi2002:dev-pyscf
Open

Basic PySCF MCP tools#125
JinchuLi2002 wants to merge 11 commits into
argonne-lcf:devfrom
JinchuLi2002:dev-pyscf

Conversation

@JinchuLi2002

@JinchuLi2002 JinchuLi2002 commented May 12, 2026

Copy link
Copy Markdown

This pull request adds support for PySCF workflows to the ChemGraph MCP tool suite, introduces schemas for PySCF molecule and crystal objects, and improves the CLI response formatting to handle complex content blocks. It also adds tests to ensure robust handling of new content shapes. The most important changes are grouped below:

PySCF Integration

  • Added new MCP tools for creating and running PySCF molecule and crystal workflows, including create_pyscf_molecule, create_pyscf_crystal, run_pyscf_molecule, and run_pyscf_crystal, with robust stdout silencing to prevent library output from interfering with MCP communication. (src/chemgraph/mcp/mcp_tools.py) [1] [2]
  • Added a new dependency group for PySCF in pyproject.toml.

Schema Additions

  • Introduced src/chemgraph/schemas/pyscf_schema.py, defining Pydantic models and type aliases for PySCF molecule and crystal specifications, as well as shared enums for device, driver, unit, and reference types.

Testing

  • Added tests for the new content extraction and atomic JSON detection logic in the CLI formatter. (tests/test_cli_formatting.py)

@JinchuLi2002 JinchuLi2002 changed the title Add PySCF MCP tools and capability checklist Basic PySCF MCP tools May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants