- Install the Kotlin Notebooks plugin in IntelliJ
- You need an OpenAI API key in your environment:
OPENAI_API_KEY=<your-key>
- Provide the OpenAI key
OPENAI_API_KEYin the environment - Run application: LangChain4JDemoApplication.kt
- Run Samples in the notebook: langchain4j-demo.ipynb
- Run Samples in the notebook: langchain4j-similarity.ipynb
- Start docker-compose:
docker-compose up - Open the notebook: langchain4j-ingest.ipynb
- Run code snippets to ingest data
- Provide the OpenAI key
OPENAI_API_KEYin the environment - Run application: Application.kt
- Run Samples in the notebook: /langchain4j/langchain4j-demo.ipynb
- Provide the OpenAI key
OPENAI_API_KEYin the environment - Start docker-compose:
docker-compose up - Run application: SpringAIDemoApplication.kt
- The first time it takes a while since the vector db is ingested using the spring-ai way
- Run Samples in the notebook: spring-ai-demo.ipynb
-
Run KMP Chat Client
mainin Main.kt in thechatclient-kmpmodule -
Chat Feature:
-
Voice Feature:
-
MCP Server that exposes:
- prompt: similar to system prompt in Spring-AI but tailored for MCP capabilities (resources and tools)
- resource: the menu as MCP resource
- tools: tools to classify, find dishes via vector search and ordering dish, all forwarding to the Spring-AI rest endpoints
-
Build the MCP Server with:
./gradlew jar -
Open the Claude Desktop application -> Settings -> Developer and press
Edit Configto locate theclaude_desktop_config.jsonfile.
-
Add the following configuration in
claude_desktop_config.json:{ "mcpServers": { "mcp-italian-delaight": { "command": "java", "args": ["-jar", "<project-path>/kotlin-mcp-server/build/libs/mcp-kt-jar-0.1.0.jar"] } } } -
Restart Claude Desktop and manually select the
italian-meal-agentprompt that the MCP server exposes: -
-
Now you can order your favorite dish. Buon Appetito 🍕🇮🇹🍝!