-
Notifications
You must be signed in to change notification settings - Fork 50
[WIP] Create model context protocol for MP's API #997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Only have a couple of comments.
Should regenerating the tools be integrated with Github actions and run during a release?
@tschaume Re:
It's mostly automated but requires some cleanup work. A key thing is ensuring that the typing is correct ( Before this gets merged, I'd like to test a bit or get feedback from those who are more in the LLM space |
@esoteric-ephemera how about Thrust 3 of SciDAC (Knowledge) get involved with the MCP testing? Let me know if you want me to mobilize them, happy to do so as a first concrete action item for that team |
Thanks @computron! That might be helpful. Right now, I have it integrated with Claude desktop, but am running into limits testing it for "enterprise" LLMs (e.g., ChatGPT needs a web-accessible MCP server), especially with the limited tokens you get at the freemium tier Would be good to know if anyone on SciDAC has worked with Llama 3 or another good open source LLM, or even has integrated an MCP with LBL's CBORG |
Model context protocols (MCPs) are a generally architecture agnostic standard for allowing LLMs to access the key functionalities of an API or other walled-off data (or abstract functionality)
Want to note that a previous effort within LBL was undertaken to write an MCP for MP. This expands on that to encompass all of the API client's functionality.
This still uses the FastMCP package to generate an MCP. There is a 10-line, easy solution for generating an MCP programmatically from an OpenAPI spec. The FastMCP developer recommends this approach only for bootstrapping. Basically LLMs struggle to understand what is important in the API if there is no structure beyond the OpenAPI spec.
A more fleshed-out solution using the (mostly) auto-generated
mp_api.mcp.tools
is included as well. These basically structure the core functionalities of the API client by both usingMPRester
's convenience functions, and thesearch
features.Still needs work and testing