# spring-ai-mcp-test

> MCP Server

This repository demonstrates Spring AI's integration with the Model Context Protocol (MCP) using Spring Boot, showcasing both server and client implementations for services like geocoding and timezone retrieval, enabling LLM interaction.

## Overview

- **Category:** AI
- **Language:** Java
- **Stars:** 2
- **Forks:** 0
- **Owner:** oalles
- **GitHub:** https://github.com/oalles/spring-ai-mcp-test
- **Created:** 2025-03-18T15:12:35+00:00
- **Updated:** 2025-03-25T06:25:43+00:00
- **Source:** https://model-context-protocol.com/servers/spring-ai-mcp-model-context-protocol

## Setup

## Setup
1. **Start Geocoder Service**:
    ```bash
    cd geocoder
    mvn spring-boot:run
    ```

2. **Start Timezone Service**:
    ```bash
    cd timezone
    mvn spring-boot:run
    ```

3. **Start MCP Host**:
    ```bash
    cd mcp-host
    mvn spring-boot:run
    ```

## Tools

## Available Tools

1. Geocoder Service (Provides latitude and longitude for a given city).
2. Timezone Service (Provides timezone information for a given latitude and longitude).
3. MCP Host (Uses the Geocoder and Timezone services via MCP clients and provides a console interface to interact with an LLM).
4. Spring AI MCP (Extends the MCP Java SDK and provides dedicated Spring Boot starters for both clients and servers).
5. ChatClient (Used to interact with the LLM and execute tool calls).
