SwarmUI_MCP_Agent

by MathewTomberlin

243 downloads Not rated yet MIT license

About

A simple prototype SwarmUI MCP server with accompanying local LangChain Ollama agent

Details

License
MIT license

Explore

- Exposes SwarmUI image generation as MCP tools
- Integrates a local Ollama agent (dolphin-mistral)
- Provides a Streamlit UI for prompt entry
- Automatically fetches a new session and generates images
- Generated images saved in SwarmUI's Output directory

With the SwarmUIMCPServer running and SwarmUI itself running, from the /SwarmUI_MCP_Agent directory, run: python run.py

Run setup.sh

npm install
pip install -r requirements.txt

A generate_image StructuredTool is declared in tools.py that POSTS to the /generate-image endpoint of the Express server
started by the SwarmUIServer. The description of the StructuredTool and its docstring are used by the llm
to know about the tool. Theoretically, Pydantic models should assert tool input, but the current setup doesn't work for multiple
inputs yet.

A simple prototype SwarmUI MCP server with accompanying local LangChain Ollama agent. The prototype only exposes the SwarmUI /GenerateText2Image endpoint. It uses Python, Node.js, Typescript, Langchain, @ModelContextProtocol, Axios, Express, and Pydantic (though Pydantic is mostly unused in this implementation).
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.