Skip to content

Add Model Context Protocol#4

Merged
KnathanM merged 13 commits intochemprop:mainfrom
JacksonBurns:feature/mcp
Nov 29, 2025
Merged

Add Model Context Protocol#4
KnathanM merged 13 commits intochemprop:mainfrom
JacksonBurns:feature/mcp

Conversation

@JacksonBurns
Copy link
Copy Markdown
Member

Description

This PR add a Chemprop Model Context Protocol, which allows LLMs to call Chemprop training, prediction, fingerprinting, conversion, and hyperparameter optimization functions.

It is confirmed working with Chemprop 2.2.0 and 2.2.1

Questions

So far I have only added tests for chemprop_train since the others are largely derivative of this one - we can add more, if we would like, but the fragile part of this code is the server and the interconnection which the current test proves is working.

Checklist

  • License file included - MIT
  • Documentation provided (perhaps a Notebook or README) - README with details and a Demo, associated paper will be added
  • Tests provided and passing on the stated Chemprop version - passing locally, let's check the CI

Forgive the messy commit history, I accidentally pushed this to main and had to revert it.

cc @shihchengli the co-author on this project

@JacksonBurns JacksonBurns self-assigned this Nov 15, 2025
@JacksonBurns JacksonBurns added the enhancement New feature or request label Nov 15, 2025
@JacksonBurns
Copy link
Copy Markdown
Member Author

@KnathanM something is wrong with the 'check for new stuff' part of the CI, could you take a look?

@shihchengli shihchengli self-assigned this Nov 16, 2025
@JacksonBurns
Copy link
Copy Markdown
Member Author

@KnathanM thanks for fixing that! Looks like the test ran sucessfully. Please review at your leisure - @shihchengli and I have combed through it pretty well, so hopefully it doesn't need much.

@JacksonBurns
Copy link
Copy Markdown
Member Author

@KnathanM I have added the citation for the white paper describing the tool. This is good to go from our end.

KnathanM
KnathanM previously approved these changes Nov 25, 2025
Copy link
Copy Markdown
Member

@KnathanM KnathanM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah looks good. I'll leave a few questions, but we can merge this whenever.

Comment thread chemprop_contrib/mcp/demo/README.md Outdated
Comment thread chemprop_contrib/mcp/demo/baseline_and_llm_opt_conversation.txt
Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
@KnathanM KnathanM dismissed their stale review November 25, 2025 22:21

Wait actually the Mac tests are failing. The moe test passes which is what I think gives the action a pass, so two questions are:

  1. What are the tests failing on mac
  2. Why does the CI not care that some of the tests with pytest are failing.
@KnathanM
Copy link
Copy Markdown
Member

@JacksonBurns
Copy link
Copy Markdown
Member Author

The GHA passes because each step's status is determined by the last command that was called. In the for loop of pytest calls, the last command is not pytest but actually the exit of the loop (done) - I will fix this with a workaround.

@JacksonBurns
Copy link
Copy Markdown
Member Author

I haven't yet figured out why the actual test fails on Mac.

@JacksonBurns
Copy link
Copy Markdown
Member Author

@KnathanM I fixed the failing tests and addressed your comments as well - please re-review when possible!

Copy link
Copy Markdown
Member

@KnathanM KnathanM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding those fixes.

@KnathanM KnathanM merged commit e2167a0 into chemprop:main Nov 29, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants