PromptChain
PromptChain is a pip-installable library and MCP server for explicitly loading, unloading, pinning and swapping local language models across LM Studio and Ollama, plus a small Streamlit app that chains a drafting model into a coding model with a human review step in between.
The library gives a single client, and a matching MCP server, that spans LM Studio, Ollama and any OpenAI-compatible endpoint, with a policy engine rather than raw load and unload calls: it can show what is resident across both servers at once, pin a model so it is never evicted, preload the next model before it is needed, swap a whole working set in one call, and cap usage by count or VRAM budget. Exposed over MCP, the same controls let a coding agent manage its own GPU memory across backends instead of leaving that to a server heuristic or a human alt-tabbing between apps.
Built on top of the library, the PromptChain application itself is a two-model pipeline: a small local model drafts a prompt, a human edits it, and a larger local or cloud model then writes the code.
It is a Python project distributed on PyPI, released under the MIT license.