Application for building AI capable applications on the fly with UI, models and mcp servers.
Spawn is a Spring Boot application that enables you to configure, build, and deploy new AI applications built on the Spring Boot / Spring AI framework. The application provides a web-based UI with server-side rendered HTML pages to manage applications, AI models, and MCP (Model Context Protocol) servers.
- Browse available models - View the list of AI models loaded from CSV (e.g., OpenAI, Anthropic Claude, Azure OpenAI)
- Browse available MCP servers - View the list of MCP servers loaded from CSV (e.g., GitHub, Notion, Stripe)
- Create a new application with a name and select a model provider
- Add MCP servers to your application from the available list
- Build and deploy a new application based on the configuration
- Java 17
- Spring Boot 3.2.0
- Spring Data JPA
- H2 Database (in-memory)
- J2HTML 1.6.0 (server-side HTML rendering)
- Maven
- Java 17 or higher
- Maven 3.6 or higher
-
Clone the repository
-
Build the application:
mvn clean install
-
Run the application:
mvn spring-boot:run
The application will start on http://localhost:8080
Access the H2 database console at: http://localhost:8080/h2-console
- JDBC URL:
jdbc:h2:mem:spawndb - Username:
sa - Password: (empty)
The application provides a web-based user interface with the following pages:
- Read-only list of AI model providers loaded from
src/main/resources/models/models.csv - Displays model capabilities: multimodality, tools/functions, streaming, retry, observability, etc.
- No create, edit, or delete operations - models are configuration-only
- Read-only list of MCP servers loaded from
src/main/resources/mcp/mcp_servers.csv - Displays server icons and descriptions
- Includes 48+ servers from the GitHub MCP registry (GitHub, Notion, Stripe, etc.)
- No create, edit, or delete operations - servers are configuration-only
- View configuration templates for MCP servers that have templates available
MCP server configuration templates are JSON files stored in src/main/resources/mcp/templates/. Templates provide pre-configured server definitions with input placeholders that can be customized for deployment. The template system supports multiple naming strategies for matching templates to servers:
- Exact match: Template filename matches the server name exactly (e.g.,
GitHub.jsonfor "GitHub" server) - Case-insensitive match: Template is found regardless of case differences
- Normalized match: Spaces and special characters are normalized to hyphens (e.g.,
azure-mcp-server.jsonmatches "Azure MCP Server")
Templates include:
- Server configuration with placeholders using
${input:id}syntax - Input definitions specifying required configuration values, types, and defaults
- Preview capability showing templates with placeholders replaced (password fields masked with
*****)
Access templates via the "View Template" button on the MCP Servers list page for servers with available templates.
- Full CRUD operations for AI applications
- Create applications with a name and model provider
- View, edit, and delete applications
- Add/remove MCP servers from applications
- Each application stores:
- Name
- Model provider (reference to CSV)
- Set of MCP server names (references to CSV)
- Creation timestamp
- New domain: Agents represent tailored expertise for specific tasks.
- Each Agent stores:
name(required)description(optional)systemPrompt(long text, stored as CLOB)createdAttimestamp- A per-agent persisted list of MCP server names (free-form strings) stored in
agent_mcp_serverstable
- Endpoints (server-rendered HTML):
GET /agents— List all agentsGET /agents/new— Show creation form (dropdown of known MCP servers + "Other" free-form add)POST /agents— Create agent (redirect on success)GET /agents/{id}— Detail page showing full system prompt and attached MCP names (unknown names highlighted with a warning badge)GET /agents/{id}/edit— Edit form (pre-filled)POST /agents/{id}— Update agentPOST /agents/{id}/delete— Delete agentPOST /agents/{id}/mcp-servers/add— Attach an MCP name to an agentPOST /agents/{id}/mcp-servers/{mcpName}/remove— Remove an MCP name from an agent
- MCP servers list used for dropdown is loaded from CSV (read-only). Agents accept free-form MCP names; UI highlights names that don't match any known MCP server.
Models and MCP Servers are loaded from CSV files at application startup:
-
Models CSV (
src/main/resources/models/models.csv):- Columns: Provider, Multimodality, Tools/Functions, Streaming, Retry, Observability, Built-in JSON, Local, OpenAI API Compatible
- Example:
OpenAI,"In: text, image, audio Out: text, audio",yes,yes,yes,yes,yes,no,yes
-
MCP Servers CSV (
src/main/resources/mcp/mcp_servers.csv):- Columns: Name, Icon, Description
- Example:
GitHub,https://avatars.githubusercontent.com/u/9919?v=4,"Official GitHub MCP Server..."
Applications are stored in the H2 database:
- Application name
- Model provider name (validated against CSV)
- Collection of MCP server names (validated against CSV)
- Creation timestamp
Agents are stored in the H2 database:
- Agent name
- Description
- System prompt
- Creation timestamp
- Collection of MCP server names (free-form, validated against CSV)
Using the web UI:
-
View Available Models
- Navigate to
http://localhost:8080/models - Browse the list of available AI model providers
- Navigate to
-
View Available MCP Servers
- Navigate to
http://localhost:8080/mcp-servers - Browse the list of available MCP servers with descriptions
- Navigate to
-
Create an Application
- Navigate to
http://localhost:8080/applications - Click "Create New Application"
- Enter application name: "My AI Assistant"
- Select model provider: "OpenAI"
- Click "Save"
- Navigate to
-
Add MCP Servers
- Click "View" on your application
- Select an MCP server from the dropdown (e.g., "GitHub")
- Click "Add Server"
- Repeat to add more servers
-
View Application Configuration
- The application detail page shows:
- Application details (ID, name, model provider, created date)
- Associated MCP servers with icons and descriptions
- Option to add/remove servers
- The application detail page shows:
-
Create an Agent
- Navigate to
http://localhost:8080/agents - Click "Create New Agent"
- Enter agent name: "Code Reviewer"
- Optionally, enter a description
- Enter the system prompt
- Select MCP servers from the dropdown
- Click "Save"
- Navigate to
-
View Agent Details
- Click "View" on your agent
- See the full system prompt and attached MCP servers
- Option to edit or delete the agent
Run the tests:
mvn testThe test suite includes:
- Controller integration tests for all domains
- Service tests for CSV loading
- End-to-end workflow test demonstrating the full application lifecycle
- All tests use MockMvc for controller testing
src/
├── main/
│ ├── java/dev/rebelcraft/ai/spawn/
│ │ ├── SpawnApplication.java # Main application class
│ │ ├── apps/ # Applications domain
│ │ │ ├── Application.java # JPA entity
│ │ │ ├── ApplicationController.java # Web controller
│ │ │ ├── ApplicationService.java # Business logic
│ │ │ ├── ApplicationRepository.java # Spring Data repository
│ │ │ ├── ApplicationRequest.java # DTO
│ │ │ ├── ApplicationResponse.java # DTO
│ │ │ ├── ApplicationFormPage.java # J2HTML view
│ │ │ ├── ApplicationDetailPage.java # J2HTML view
│ │ │ └── ApplicationsListPage.java # J2HTML view
│ │ ├── models/ # Models domain (read-only CSV)
│ │ │ ├── Model.java # Plain POJO
│ │ │ ├── ModelController.java # Web controller
│ │ │ ├── ModelService.java # CSV loader
│ │ │ ├── ModelResponse.java # DTO
│ │ │ └── ModelsListPage.java # J2HTML view
│ │ ├── mcp/ # MCP Servers domain (read-only CSV)
│ │ │ ├── McpServer.java # Plain POJO
│ │ │ ├── McpServerController.java # Web controller
│ │ │ ├── McpServerService.java # CSV loader
│ │ │ ├── McpServerResponse.java # DTO
│ │ │ ├── McpServersListPage.java # J2HTML view
│ │ │ ├── McpTemplate.java # Template POJO
│ │ │ ├── McpTemplateService.java # Template loader
│ │ │ ├── McpTemplateController.java # Template controller
│ │ │ └── McpServerTemplatePage.java # J2HTML view
│ │ ├── agents/ # Agents domain
│ │ │ ├── Agent.java # JPA entity
│ │ │ ├── AgentController.java # Web controller
│ │ │ ├── AgentService.java # Business logic
│ │ │ ├── AgentRepository.java # Spring Data repository
│ │ │ ├── AgentRequest.java # DTO
│ │ │ ├── AgentResponse.java # DTO
│ │ │ ├── AgentFormPage.java # J2HTML view
│ │ │ ├── AgentDetailPage.java # J2HTML view
│ │ │ └── AgentsListPage.java # J2HTML view
│ │ ├── web/ # Cross-cutting web concerns
│ │ │ ├── IndexController.java # Home page
│ │ │ └── view/ # Shared view components
│ │ ├── utils/ # Utilities
│ │ │ └── ResourceNotFoundException.java
│ │ └── config/ # Configuration
│ └── resources/
│ ├── application.properties # Application configuration
│ ├── models/
│ │ └── models.csv # AI model providers
│ └── mcp/
│ ├── mcp_servers.csv # MCP servers
│ └── templates/ # MCP configuration templates
│ ├── GitHub.json # GitHub MCP template
│ └── azure-mcp-server.json # Azure MCP template
└── test/
└── java/dev/rebelcraft/ai/spawn/ # Test classes
The application uses an in-memory H2 database with the following schema:
- applications: Stores AI application configurations
- id, name, model_provider, created_at
- application_mcp_servers: Stores MCP server names for each application
- application_id, mcp_server_name
- agents: Stores agent configurations
- id, name, description, system_prompt, created_at
- agent_mcp_servers: Stores MCP server names for each agent
- agent_id, mcp_server_name
Note: Models and MCP servers are NOT stored in the database. They are loaded from CSV files at startup.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.