mcp-server-routine-bot
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-routine-bottrigger a Jenkins build on my-project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Routine Bot
一个基于模型上下文协议(MCP)的服务器,旨在通过智能任务自动化来简化日常操作并提高工作效率。
⚠️ 注意:此项目正在积极开发中。功能可能会发生变化,某些功能可能不完整或不稳定。
概述
MCP-Server-Routine-Bot 基于模型上下文协议(MCP)框架构建,是我个人用于学习 MCP 的项目,内置的工具旨在为我处理日常工作中重复的操作,例如代码合并、版本发布等。
主要特性
任务自动化:自动处理重复的日常操作
工具集成:原生支持 Jenkins 和 GitLab 操作
智能工作流:为各种场景提供可定制的自动化流程
网络代理支持:内置企业级代理配置功能
实时监控:跟踪和管理自动化进程
热重载:支持 HRM 的开发友好架构
Related MCP server: Ares DevOps MCP Server
可用工具
Jenkins 工具
工具名称 | 描述 | 参数 |
| 获取 Jenkins 中的所有作业列表 | 无 |
| 触发指定 Jenkins 作业的构建 |
|
GitLab 工具
工具名称 | 描述 | 参数 |
| 在 GitLab 中创建合并请求 |
|
| 在 GitLab 中合并指定的合并请求 |
|
使用示例
Jenkins 操作
# 获取作业列表
jenkins_job_list
# 构建指定作业
jenkins_job_build({"jobName": "my-project"})GitLab 操作
# 创建合并请求
gitlab_create_merge_request({
"projectName": "my-project",
"sourceBranch": "feature-branch",
"targetBranch": "main"
})
# 合并指定的合并请求(使用创建时返回的 IID)
gitlab_merge_merge_request({
"projectId": 123,
"mergeRequestIid": 456
})快速开始
配置
使用您的平台凭证配置服务器:
{
"mcpServers": {
"mcp-server-routine-bot": {
"command": "npx",
"args": ["-y", "@code-sugar/mcp-server-routine-bot@latest"],
"env": {
"JENKINS_BASE_URL": "jenkins_base_url",
"JENKINS_USERNAME": "jenkins_username",
"JENKINS_ACCESS_TOKEN": "jenkins_access_token",
"GITLAB_BASE_URL": "gitlab_base_url",
"GITLAB_ACCESS_TOKEN": "gitlab_access_token",
"HTTP_PROXY": "http://proxy.example.com:8080",
"HTTPS_PROXY": "https://proxy.example.com:8080"
}
}
}
}环境变量
变量名 | 必需 | 默认值 | 说明 |
| ✅ | - | Jenkins 服务器基础地址 |
| ✅ | - | Jenkins 用户名 |
| ✅ | - | Jenkins API 访问令牌 |
| ✅ | - | GitLab API 基础地址 |
| ✅ | - | GitLab API 访问令牌 |
| ❌ | - | HTTP 代理服务器地址 |
| ❌ | - | HTTPS 代理服务器地址 |
代理配置说明
# 基本代理配置
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=https://proxy.company.com:8080
# 带认证的代理配置
export HTTP_PROXY=http://username:password@proxy.company.com:8080
export HTTPS_PROXY=https://username:password@proxy.company.com:8080代理优先级:HTTPS_PROXY > https_proxy > HTTP_PROXY > http_proxy
开发指南
环境要求
Node.js >= 18
npm 或 yarn
安装设置
克隆仓库:
git clone https://github.com/PassionZale/mcp-server-routine-bot.git cd mcp-server-routine-bot安装依赖:
npm install创建环境配置:
cp .env.example .env # 编辑 .env 文件填入凭证信息
开发模式
方式 1:MCP Inspector(无热重载)
用于调试和检查:
启动开发服务器:
npm run inspector配置 MCP 客户端:
{ "mcpServers": { "local-mcp-server-routine-bot": { "command": "node", "args": ["/path/to/your/mcp-server-routine-bot/dist/index.js"], "env": { "JENKINS_BASE_URL": "jenkins_base_url", "JENKINS_USERNAME": "jenkins_username", "JENKINS_ACCESS_TOKEN": "jenkins_access_token", "GITLAB_BASE_URL": "gitlab_base_url", "GITLAB_ACCESS_TOKEN": "gitlab_access_token", "HTTP_PROXY": "http://proxy.example.com:8080", "HTTPS_PROXY": "https://proxy.example.com:8080" } } } }
注意:
inspector 命令会自动从
.env文件读取环境变量修改
src/index.ts和src/server.ts需要手动重启服务器修改其他文件需要重新运行 inspector 命令
方式 2:Reloaderoo(支持热重载)
用于支持热重载的开发:
全局安装 reloaderoo:
npm install -g reloaderoo启动开发服务器:
npm run build:watch配置 MCP 客户端:
{ "mcpServers": { "dev-mcp-server-routine-bot": { "command": "reloaderoo", "args": [ "proxy", "log-level", "debug", "--", "node", "/path/to/your/mcp-server-routine-bot/dist/index.js" ], "env": { "JENKINS_BASE_URL": "jenkins_base_url", "JENKINS_USERNAME": "jenkins_username", "JENKINS_ACCESS_TOKEN": "jenkins_access_token", "GITLAB_BASE_URL": "gitlab_base_url", "GITLAB_ACCESS_TOKEN": "gitlab_access_token", "HTTP_PROXY": "http://proxy.example.com:8080", "HTTPS_PROXY": "https://proxy.example.com:8080" } } } }
生产构建
npm run build编译后的文件将在 dist/ 目录中。
故障排除
常见问题
服务器无响应:确保所有必需的环境变量都已设置
认证错误:验证访问令牌是否有效且具有适当权限
连接超时:检查到配置服务的网络连接
代理连接失败:验证代理 URL 格式正确且代理服务可访问
调试
通过设置日志级别启用调试日志:
# 使用 reloaderoo 时
reloaderoo proxy log-level debug -- node dist/index.js贡献
Fork 仓库
创建功能分支 (
git checkout -b feature/AmazingFeature)提交更改 (
git commit -m 'Add some AmazingFeature')推送到分支 (
git push origin feature/AmazingFeature)打开 Pull Request
许可证
本项目基于 MIT 许可证 - 查看 LICENSE 文件了解详情。
作者
Lei Zhang - @PassionZale
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PassionZale/mcp-server-routine-bot'
If you have feedback or need assistance with the MCP directory API, please join our Discord server