spawn
Open source supermachine proof of concept. Self host a MCP server with STDIO transport and get instant SSE Url
claude mcp add --transport stdio cameronking4-spawn-mcp node src/server.js \ --env DATABASE_URL="postgresql://username:password@localhost:5432/mcp_sse_db"
How to use
This MCP server provides a lightweight, STDIO-to-SSE bridge for running MCP configurations. Through a web UI you can create and save multiple MCP server configurations, each of which exposes a dedicated Server-Sent Events (SSE) endpoint that streams model responses in real time. The system uses a PostgreSQL database to persist configurations and leverages Express for the web service layer, with Drizzle ORM handling data access. The core capability is to feed a JSON MCP payload into a configured process (via STDIO) and stream tokens back to clients as SSE events, enabling efficient, real-time interaction with language models without complex infrastructure.
To use it, first ensure your backend is running and your database is accessible. Create a new MCP server configuration by supplying a unique name and a JSON configuration describing the command and arguments needed to start the underlying MCP process. After saving, an SSE URL is generated for that configuration. Point your client to this SSE URL to receive streaming model outputs. Each configuration isolates its own process so you can run multiple MCP instances concurrently and monitor them independently through the UI.
How to install
Prerequisites:
- Node.js v18 or later
- PostgreSQL database
Setup steps:
- Clone the repository:
git clone https://github.com/yourusername/mcp-sse-poc.git
cd mcp-sse-poc
- Install dependencies:
npm install
- Configure the database:
- Create a PostgreSQL database (e.g., mcp_sse_db)
- Create a .env file or set DATABASE_URL with your connection string, for example:
DATABASE_URL=postgresql://username:password@localhost:5432/mcp_sse_db
- Generate and apply migrations (if applicable):
npm run generate
npm run migrate
- Run the development server:
npm run dev
- Open the application in your browser, typically at http://localhost:3000
Additional notes
Environment considerations:
- Ensure the DATABASE_URL is reachable from the server process.
- If running behind firewalls or in containers, expose the necessary ports for the HTTP API and SSE endpoints.
- The UI stores configurations in PostgreSQL; migrate scripts should be run during deployment.
- The MCP JSON payloads should follow the MCP spec described in the README; the server streams each response chunk as an SSE event for real-time consumption.
Common issues:
- Connection failures to PostgreSQL: verify credentials and host/port, and that the database user has appropriate permissions.
- Migration errors: ensure the migration tooling (drizzle) is properly configured for your environment.
- SSE endpoint unavailable: confirm the server is started and the endpoint URL corresponds to the saved configuration.
Configuration tips:
- Each MCP server configuration should specify how to spawn its underlying MCP process via STDIO. This is defined in your mcpServers mapping and may vary per environment.
- For production, consider setting a fixed database URL and ensuring proper TLS/HTTPS configuration for web endpoints.
Related MCP Servers
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
shadcn-ui
MCP server for shadcn/ui component references
advanced-homeassistant
An advanced MCP server for Home Assistant. 🔋 Batteries included.
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.
pega-dx
Pega DX MCP Server - Enabling conversational interaction with Pega Infinity™ applications. This MCP Server transforms Pega Infinity™ interactions into intuitive, conversational experiences through the Model Context Protocol.