Spring AI demos: OpenAI & Ollama chat, RAG with pgvector, image generation, text-to-speech, MCP server/client (Java 25, Spring Boot 4, Spring AI 2)
A collection of hands-on demo applications built with Spring AI, Spring Boot 4 and Java 25, showing how to integrate LLMs (OpenAI and Ollama), build a RAG pipeline, generate images and audio, and wire models to external tools through MCP (Model Context Protocol).
Each app is an independent Spring Boot project with its own Maven wrapper, so you can run any of them on its own.
Technology Version ------ Java 25 Spring Boot 4.1.x Spring AI 2.0.x Models OpenAI (gpt-4o-mini), Ollama (qwen3:4b) Embeddings Ollama nomic-embed-text Vector Store PostgreSQL + pgvector MCP Streamable HTTP (@McpTool)
1. springai-openai — OpenAI Chat Playground Free chat, expert personas, code generation/explanation, and structured (typed) outputs with Spring AI's ChatClient.
Key endpoints (AiController): - GET /greeting — one-line hello - POST /chat, POST /chat-expert — free chat, Java/Spring expert persona - POST /generate-code, POST /explain-code — code generation and explanation - POST /chat-format, POST /analyze — structured summaries and analysis - GET /city-info?city=, POST /classify-typed — typed records (CityInfo, TicketClassification) - POST /generate-code-json, POST /explain-code-json, POST /expert-architect-json — typed JSON outputs - GET /chat-metadata?prompt= — answer plus raw ChatResponse metadata
Requires: OPENAIAPIKEY (see spring.config.import=optional:file:.env[.properties]).
2. springai-ollama — Ollama Chat Playground (local, no cloud) The same feature set as the OpenAI app, backed by a local Ollama server with qwen3:4b. No API keys, fully offline.
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/GabsDev--spring-ai-demos.html)
AI-driven knowledge training platform with pluggable schedulers, Codex Skill integration, and optional Anki/FSRS support.
2005selene2005-a11y/susu-phone-agentAndroid device bridge for Claude Code via MCP + Shizuku. No root, no model polling.
ghorbelhamdi/buddy-androidA floating chat bubble that lets Claude Code, Codex or OpenCode use your Android phone. Runs inside the app on your own subscription or free models. No adb, no PC, no root.
jackandjac/token-saver-mcp-javaMCP server that delegates simple Claude Code / Codex / Wibey tasks to a local LLM via langchain4j and langgraph4j.
Cherobin/speclokspec-as-annotation for Java: your spec lives in the code as @Spec/@AC Lombok annotations and the compiler enforces it. Generates docs, blocks out-of-scope edits, and refuses to finish until each crite
0xdad0/jadx-mcpMCP (Model Context Protocol) server as a jadx-gui plugin. Lets an AI client (Claude Code, Claude Desktop, or any MCP client) analyze the app currently loaded in jadx-gui.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.