
此寄存器包含一个Spring Boot应用程序,用于执行提供课程信息的"模型控制协议"服务器.
概览
此寄存器包含一个Spring Boot应用程序,用于执行提供课程信息的"模型控制协议"服务器. 该应用程序创建了轻量级服务器,可以通过Spring AI MCP框架来曝光课程数据,允许AI模型使用标准化工具与您自定义的数据服务交互. 服务器曝光了两个主要工具: - 检索所有可用课程的工具 - 按标题搜索特定课程的工具 这一实施是建立你自己的"模型控制协议"服务器或通过"Spring AI"将外部数据源与AI模型相融合的极好起点. -Java 24 - 马文 3.8+ - Spring Boot 3.4.4 - Spring AI 1.0.
概述(AI 翻译)
□ 概览
此寄存器包含一个Spring Boot应用程序,用于执行提供课程信息的"模型控制协议"服务器. 该应用程序创建了轻量级服务器,可以通过Spring AI MCP框架来曝光课程数据,允许AI模型使用标准化工具与您自定义的数据服务交互.
服务器暴露出两个主要工具:
- 检索所有可用课程的工具
- 按标题搜索具体课程的工具
这一实施是建立你自己的"模型控制协议"服务器或通过"Spring AI"将外部数据源与AI模型相融合的极好起点.
□ 项目要求
- 爪哇24号
- 马文 3.8+
- 春靴 3.4.4号
- 春季AI 1.0.0-M6号
□ 依赖性
该项目依赖以下关键依存:
-
** 春季AI MCP服务器**: 为创建兼容 MCP 服务器提供基础
-
** 春季靴子测试**:用于测试应用程序
∮开始∮
· 先决条件
在运行应用程序之前,请确定您有 :
- Java 24安装在您的系统中
- 为扶养管理安装马文
- 对 " 春季靴 " 应用的基本理解
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Spring AI MCP Server for Course Information
Overview
This repository contains a Spring Boot application that implements the Model Control Protocol (MCP) server for providing course information. The application creates a lightweight server that can expose course data through the Spring AI MCP framework, allowing AI models to interact with your custom data services using standardized tooling.
The server exposes two main tools:
- A tool to retrieve all available courses
- A tool to search for specific courses by title
This implementation serves as an excellent starting point for creating your own Model Control Protocol servers or for integrating external data sources with AI models through Spring AI.
Project Requirements
- Java 24
- Maven 3.8+
- Spring Boot 3.4.4
- Spring AI 1.0.0-M6
Dependencies
The project relies on the following key dependencies:
-
Spring AI MCP Server: Provides the foundation for creating MCP-compatible servers
org.springframework.ai spring-ai-mcp-server-spring-boot-starter -
Spring Boot Test: For testing the application
org.springframework.boot spring-boot-starter-test test
Getting Started
Prerequisites
Before running the application, make sure you have:
- Java 24 installed on your system
- Maven installed for dependency management
- Basic understanding of Spring Boot applications
Setting Up the Project
-
Review the project structure to understand the components:
Course.java: A simple record representing course dataCourseService.java: Service with MCP tool annotationsCoursesApplication.java: Main application class with tool registrationapplication.properties: Configuration for the MCP server
-
The application is configured to run as a non-web application using STDIO transport for MCP communication:
spring.main.web-application-type=none spring.ai.mcp.server.name=dan-vega-mcp spring.ai.mcp.server.version=0.0.1 # These settings are critical for STDIO transport spring.main.banner-mode=off logging.pattern.console=
How to Run the Application
Running the application is straightforward with Maven:
mvn spring-boot:run
The application will start as a Model Control Protocol server accessible via standard input/output. It doesn’t open any network ports or provide a web interface, as indicated by the spring.main.web-application-type=none configuration.
When running, the server registers two tools with the MCP:
dv_get_courses: Returns all available coursesdv_get_course: Returns a specific course by title
Understanding the Code
Defining Data Models
The application uses a simple record to represent course data:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →