xdmrll1314/mcp-student-server
3.2
If you are the rightful owner of mcp-student-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This is an MCP (Model Control Protocol) server implemented in Go using the mark3labs/mcp-go library, communicating via HTTP SSE (Server-Sent Events).
Tools
2
Resources
0
Prompts
0
MCP 学生信息服务器
这是一个使用Go语言和mark3labs/mcp-go库实现的MCP(Model Control Protocol)服务器,通过HTTP SSE(Server-Sent Events)进行通信。
功能
该服务器提供以下功能:
- 获取学生列表(可选按班级筛选)
- 根据学生ID获取单个学生的详细信息
技术栈
- Go语言
- mark3labs/mcp-go库
- HTTP SSE通信
安装和运行
前提条件
- Go 1.16或更高版本
安装依赖
go mod tidy
运行服务器
go run main.go
服务器将在8080端口启动。
API端点
/mcp
- MCP服务器的SSE端点/health
- 健康检查端点
工具说明
1. get_student_list
获取学生列表,可选择按班级筛选。
参数:
section
(可选): 班级名称,如果提供,则只返回该班级的学生
示例:
{
"section": "A班"
}
2. get_student_info
根据学生ID获取单个学生的详细信息。
参数:
student_id
(必填): 学生的唯一标识ID
示例:
{
"student_id": "1"
}
示例数据
服务器内置了5名学生的示例数据:
- 张三 - 高三A班
- 李四 - 高二B班
- 王五 - 高一C班
- 赵六 - 高二A班
- 孙七 - 高一B班