MCP工具集

MCP Server是一个基于Go语言的MCP工具集,提供IP地址处理、时间服务和海报生成等功能,适用于个人学习和开发测试环境。

  • by samuelj1519
  • Go
  • 本地部署
  • 更新于
在 GitHub 查看 luffy050596/mcp-server

使用说明

MCP服务器

MCP Server是一个基于Go的MCP工具项目,它提供了一系列MCP实用程序。 这是一个个人学习项目,请不要在生产环境中使用。 使用 github.com/ThinkInAIXYZ/go-mcp 作为MCP的核心框架。

特性

  • IP地址处理服务
  • 时间服务
  • 海报生成服务
  • 更多功能即将推出。..

系统要求

  • 达到1.23.0或更高
  • 支持Linux、macOS和Windows

快速开始

安装

# Clone the project
git clone https://github.com/luffy050596/mcp-server.git
cd mcp-server

# Install dependencies
go mod download

构建

构建单一服务:

make build dir=<service_directory>

构建所有服务:

make build-all

测试

运行所有测试:

make test

跑

运行单个服务:

./bin/mcp-ip -mode=stdio -addr=:59001

参数

  • -mode 运行模式,可用值为 stdio 或 sse默认值为 stdio
  • -addr 服务地址,需要时 -mode=sse
  • -key 百联API密钥,海报服务需要

项目结构

.
├── bin/           # Compiled binary files
├── ip/            # IP geolocation info, using https://ip.rpcx.io API
├── time/          # Time query and timestamp conversion
├── poster/        # Poster generation service, using Bailian Creative Poster Generation API(https://help.aliyun.com/zh/model-studio/creative-poster-generation)
└── pkg/           # Shared packages

开发工具

该项目使用以下开发工具来确保代码质量:

  • .golangci.yaml -golangci皮棉配置
  • .pre-commit-config.yaml -Git预提交钩子
  • .gitleaks.toml -Gitleaks敏感信息检测配置

依赖管理

主要依赖关系:

  • github/ThinkInAIXYZ/go-mcp-mcp核心库

贡献

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/AmazingFeature)
  3. 提交您的更改(git commit -m 'Add some AmazingFeature')
  4. 推到分支(git push origin feature/AmazingFeature)
  5. 打开拉取请求

许可证

此项目根据LICENSE文件的条款获得许可-请参阅 许可证 文件以获取详细信息。

联系

致谢

感谢所有为这个项目做出贡献的开发人员。