DD

danvega/dv-courses-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

16 stars 28 forks 品質 40 トレンド 21

This repository contains a Spring Boot application that implements the Model Control Protocol (MCP) server for providing course information.

概要

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. - Java 24 - Maven 3.8+ - Spring Boot 3.4.4 - Spring AI 1.0.

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

  1. Review the project structure to understand the components:

    • Course.java: A simple record representing course data
    • CourseService.java: Service with MCP tool annotations
    • CoursesApplication.java: Main application class with tool registration
    • application.properties: Configuration for the MCP server
  2. 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 courses
  • dv_get_course: Returns a specific course by title

Understanding the Code

Defining Data Models

The application uses a simple record to represent course data:

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →