mcpField
简
简易 MCP 服务器 (Simple MCP Server)

简易 MCP 服务器 (Simple MCP Server)

Remote
github.com/beilingaiGames & Entertainment0Updated 79w ago
Repository

About 简易 MCP 服务器 (Simple MCP Server)

Simple MCP Server is a Spring Boot example project for clients that call tools through MCP. It generates a requested number of random Double Color Ball lottery combinations, each with red and blue balls.

Key features

  1. 01Generate 1–10 lottery combinations
  2. 02Six red balls and one blue ball per set
  3. 03Built with Spring Boot and Java 17

Use cases

  1. 01Request several Double Color Ball combinations
  2. 02Call the number-generation tool from an MCP client

MCP support

The server exposes a Double Color Ball number-generation tool for MCP clients.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttp://localhost:8080/sse
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

Details

From the project README

简易 MCP 服务器 (Simple MCP Server)

English | 中文

项目介绍

这是一个基于 Model Context Protocol (MCP) 的简单示例项目。项目实现了一个双色球号码生成工具,可以随机生成指定数量的双色球号码。

技术栈

  • Spring Boot 3.4.4
  • Java 17
  • MCP SDK 0.9.0
  • Lombok
  • Maven

功能特性

  • 支持生成1-10组双色球号码
  • 每组号码包含6个红球(1-33)和1个蓝球(1-16)
  • 通过MCP协议提供服务,可以与支持MCP的客户端(如大语言模型)进行交互

项目运行

本地运行
  1. 确保你已安装以下环境:

    • JDK 17+
    • Maven 3.6+
  2. 克隆项目:

git clone https://github.com/beilingai/simple-mcp-server.git
cd simple-mcp-server
  1. 编译项目:
mvn clean package
  1. 运行项目:
java -jar target/mcp-server-1.0-SNAPSHOT.jar
  1. 服务将在默认端口8080启动

如何使用

本服务通过MCP协议提供工具,可以被支持MCP的客户端调用。

调用示例:

Cursor中调用示例

在Cursor编辑器中,可以通过以下方式调用本服务:

  1. 在设置中添加本地MCP服务器地址
{
   "mcpServers": {
      "double-color-ball-mcp-server": {
         "url": "http://localhost:8080/sse"
      }
   }
}
  1. 在聊天窗口中请求生成双色球号码:
    请帮我生成3组双色球号码
    
  2. AI助手会调用本MCP服务并返回生成的结果,例如:
    生成的双色球号码如下:
    
    第1组: 05 11 16 22 30 33 + 08
    第2组: 03 06 14 20 25 31 + 12
    第3组: 02 09 17 25 29 32 + 06
    

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.