Prototype SwarmUI MCP server

Prototype SwarmUI MCP server

swarmui_mcp_agent•bymathewtomberlin

A prototype MCP server, declared in server.ts, that exposes SwarmUI image generation and session endpoints as server capabilities, paired with a local LangChain Ollama agent.

License: Not specified•Runtime: Awaiting documentation review•Category: media design

WHAT IT DOES

  • •Exposes the SwarmUI /GenerateText2Image and /GetNewSession endpoints through generateImage() and getSessionId() methods described in the MCP Server capabilities config.
  • •Starts a Node server that initializes the SwarmUIServer and creates an Express POST endpoint at /generate-image that calls SwarmUIServer.generateImage.
  • •Uses an Axios instance to make HTTP requests to the local SwarmUI API from the SwarmUIServer class.
  • •Supports a local Ollama agent that invokes image generation with a supplied prompt using its generate_image tool.

BEST FOR

  • •Generating images in SwarmUI from a text prompt through an MCP-exposed tool interface.
  • •Prototyping a local LLM agent, using Ollama with LangChain, that calls SwarmUI image generation.

ABOUT SWARMUI_MCP_AGENT

Prototype SwarmUI MCP server is cataloged as an MCP server attributed to mathewtomberlin. A prototype MCP server, declared in server.ts, that exposes SwarmUI image generation and session endpoints as server capabilities, paired with a local LangChain Ollama agent. It is categorized under media design. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Prototype SwarmUI MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which SwarmUI API endpoints does the prototype expose?

The prototype exposes the /GenerateText2Image and /GetNewSession SwarmUI API endpoints via generateImage() and getSessionId().

Where can generated images be found?

Generated images are available within the SwarmUI Image History or directly in the SwarmUI /Output directory.

Upstream README

View this exact version on GitHub

README.md · 0a2520583bbf · Fetched 2026-11-13 12:43:52 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

SwarmUI_MCP_Agent

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).

SwarmUI MCP Server

The SwarmUI MCP Server prototype is declared in server.ts.

The /GenerateText2Image and /GetNewSession SwarmUI API endpoints are exposed via generateImage() and getSessionId() methods, which are described in the (MCP) Server capabilities config when instantiating the Server. The Server capabilities config is used by the agent to know about the available tools' input and output schemas and descriptions. The text descriptions for these tools are used by the llm to understand the tool. When the server.js Node server is started, the SwarmUIServer is initialized and an Express server is created with a POST endpoint at '/generate-image' that calls SwarmUIServer.generateImage, then the Express server is started. An Axios instance is created to make HTTP requests to the local SwarmUI API and stored in the SwarmUIServer class.

DEV NOTE: You will likely need to change the port used by SwarmUI as well as the model hardcoded for image generation.

GenerateImage StructuredTool

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.

LangChain Ollama Agent

A local Ollama agent (currently a dolphin-mistral model) is instantiated with tool-calling instructions, a max_iterations of 1, and AgentType of ZERO_SHOT_REACT_DESCRIPTION, with the generate_tool StructuredTool. User input is taken for the image prompt and then the agent is invoked with the input. The agent will use the generate_image Action with the supplied prompt as Action Input, calling the local SwarmUI API /GenerateText2Image endpoint with the prompt and other hardcoded image generation settings.

Starting the SwarmUI MCP Server

From the /SwarmUI_MCP_Agent/src directory, run: tsc server.ts && node server.js

Running the Agent

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

Viewing Generated Images

Generated images are available within the SwarmUI Image History or directly within the SwarmUI /Ouput directory

Quickstart

1. Clone Repository

git clone cd

2. Install Dependencies (Script)

Run setup.sh

2B. Install Dependencies (Manual)

npm install pip install -r requirements.txt

3. Start the API server

tsc server.ts && node server.js

5. Start the UI

streamlit run run.py

6. Ensure SwarmUI is running and accessible.

7. Enter your SwarmUI Port number in the Agent Settings > SwarmUI API Port

8. Select LLM Model and (optionally) Vision Model

9. Enter image request and click submit. Wait for models to download, if not downloaded.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Prototype SwarmUI MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/swarmui_mcp_agent)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related media design MCP Servers

Alternative and complementary servers in the same category

View all in media design →

A Rust CAD application with an MCP server for creating, inspecting and rendering drawings, either headlessly or through a connection to the desktop app.

8K
Media & Design
Liquid Composer
liquid-composer•frontedu

Liquid Composer is a browser-based Liquid Glass icon design tool that offers a local MCP server for agent-driven icon workflows.

69
Media & Design

agent-media makes short drama series and other short vertical videos from Claude, ChatGPT or Codex through one MCP connection, with OAuth sign-in and no API keys.

1
Media & Design