简易 MCP 服务器 (Simple MCP Server)

by beilingai

318 downloads
Not rated
GitHub

Description

# 简易 MCP 服务器 (Simple MCP Server) [English](README_EN.md) | 中文 ## 项目介绍 这是一个基于 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) -…

About

# 简易 MCP 服务器 (Simple MCP Server) [English](README_EN.md) | 中文 ## 项目介绍 这是一个基于 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的客户端(如大语言模型)进行交互 ##…

Details

Author
beilingai
Downloads
318
Categories
Other

- Generates 1–10 sets of double-color ball numbers
- Each set includes 6 red balls (1–33) and 1 blue ball (1–16)
- Serves via MCP protocol for AI assistant integration
- Built with Java 17 and Spring Boot 3.4.4

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 简易 MCP 服务器 (Simple MCP Server)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, compile with mvn clean package, and run with java -jar target/mcp-server-1.0-SNAPSHOT.jar. The service starts on port 8080 and exposes an SSE endpoint at http://localhost:8080/sse. Clients (e.g., Cursor editor) can add the server URL in their MCP configuration to invoke the double-color ball tool.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\u7b80\u6613 mcp \u670d\u52a1\u5668 (simple mcp server)": {
            "double-color-ball-mcp-server": {
                "type": "http",
                "url": "http://localhost:8080/sse"
            }
        }
    }
}

McpServers

{
    "double-color-ball-mcp-server": {
        "type": "http",
        "url": "http://localhost:8080/sse"
    }
}

简易 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

3. 编译项目:

mvn clean package

4. 运行项目:

java -jar target/mcp-server-1.0-SNAPSHOT.jar

5. 服务将在默认端口8080启动

如何使用

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

调用示例:

Cursor中调用示例

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

1. 在设置中添加本地MCP服务器地址

{
"mcpServers": {
"double-color-ball-mcp-server": {
"url": "http://localhost:8080/sse"
}
}
}

2. 在聊天窗口中请求生成双色球号码:
   请帮我生成3组双色球号码

3. 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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.