MCP Host Project logo

MCP Host Project

by oalles

This project demonstrates the integration of Spring AI's MCP support within Spring Boot applications. It includes both server-side (Geocoder and Timezone services) and client-side (MCP Host) implementations to interact with an LLM.

View on GitHub

Last updated: N/A

What is MCP Host Project?

This project is a demonstration of using Spring AI to build MCP servers (Geocoder and Timezone services) and an MCP client (MCP Host) that interacts with an LLM to retrieve geographical information. It leverages the Model Context Protocol (MCP) to streamline contextual interactions with AI models.

How to use MCP Host Project?

To use this project, first start the Geocoder and Timezone services using mvn spring-boot:run in their respective directories. Then, start the MCP Host application. Once running, you can enter city names in the console, and the system will use the LLM to provide latitude, longitude, and timezone information for the entered city.

Key features of MCP Host Project

  • Integration of Spring AI with MCP

  • Server-side implementation of Geocoder and Timezone services

  • Client-side implementation of MCP Host

  • Interaction with LLMs for geographical information retrieval

  • Use of Llama3.2 via Ollama

  • Uses Spring Boot starters for MCP clients and servers

Use cases of MCP Host Project

  • Demonstrating MCP integration with Spring AI

  • Building AI-powered applications that require contextual information

  • Creating services that provide geographical information

  • Integrating LLMs with external data sources and tools

FAQ from MCP Host Project

What is MCP?

MCP (Model Context Protocol) is a standard that streamlines the management of contextual interactions in AI models.

What is Spring AI MCP?

Spring AI MCP extends the MCP Java SDK and provides dedicated Spring Boot starters for both clients and servers.

What services are included in this project?

This project includes a Geocoder service (provides latitude and longitude), a Timezone service (provides timezone information), and an MCP Host (interacts with the LLM).

What LLM is used in this project?

This project uses Llama3.2 via Ollama.

How do I run the project?

Start the Geocoder and Timezone services, then start the MCP Host application using mvn spring-boot:run in each module's directory.