Redmine MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Redmine's REST API to provide ticket and project information to LLMs. Supports managing issues, projects, users, and time entries through the Redmine REST API.

Redmine MCP 服务器

这是 Redmine 的模型上下文协议 (MCP) 服务器实现。它与 Redmine 的 REST API 集成,为 LLM 提供工单和项目信息。

特征

支持来自 Redmine REST API 的稳定资源:

  • 问题(1.0~)
  • 项目(1.0~)
  • 用户(1.1~)
  • 时间条目(1.1~)

工具

问题

  • 搜索问题
    • 按项目、状态、受让人等进行过滤。
    • 关键词搜索
    • 自定义字段支持
  • 创建/更新问题
    • 设置跟踪器、状态、优先级
    • 配置自定义字段
    • 添加评论
  • 删除问题

项目

  • 搜索项目
    • 按活动/存档/关闭状态过滤
    • 关键词搜索
  • 获取项目详细信息
    • 包括追踪器、类别信息
  • 创建/更新项目
    • 配置模块和跟踪器
    • 设置成员继承
  • 存档/取消存档项目
  • 删除项目

时间条目

  • 搜索时间条目
    • 按项目、用户、日期范围过滤
  • 获取时间输入详细信息
  • 创建/更新时间条目
    • 针对项目或问题进行记录
    • 指定活动
    • 自定义字段支持
  • 删除时间条目

与 Claude 一起使用

要将此服务器与 Claude 一起使用,请按如下方式配置它:

{ "mcp-server-redmine": { "command": "npx", "args": [ "-y", "--prefix", "/path/to/mcp-server-redmine", "mcp-server-redmine" ], "env": { "REDMINE_HOST": "https://your-redmine.example.com", "REDMINE_API_KEY": "your-api-key-here" } } }

配置选项

  • command :执行 npm 包的命令
  • args
    • -y :对提示自动回复“是”
    • --prefix :指定安装目录
    • 最后一个参数指定包名称
  • env :环境变量
    • REDMINE_HOST :Redmine 服务器 URL
    • REDMINE_API_KEY :您的 Redmine API 密钥

设置

获取 API 密钥

  1. 在 Redmine 管理设置中启用 REST API
  2. 从用户设置页面获取 API 密钥

环境变量

设置以下环境变量:

  • REDMINE_API_KEY :从 Redmine 用户设置中获取的 API 密钥
  • REDMINE_HOST :Redmine 服务器 URL(例如, https://redmine.example.com

测试

单元测试

# Run tests npm test

为了数据安全,测试中只包含GET操作。

检查员测试

使用MCP Inspector验证功能:

# Build npm run build # Set execute permission (important) chmod +x dist/index.js # Launch inspector npx @modelcontextprotocol/inspector dist/index.js

权限

某些功能需要管理员权限:

用户相关操作

  • list_users :需要管理员
  • create_user :需要管理员
  • update_user :需要管理员
  • delete_user :需要管理员

可用信息因用户权限级别而异。有关详情,请参阅Redmine API 文档

发展

要求

  • Node.js 18 或更高版本
  • npm 9 或更高版本

图书馆

  • @modelcontextprotocol/sdk : MCP SDK
  • zod :模式验证
  • typescript :类型系统

目录结构

. ├── src/ │ ├── tools/ # Tool definitions │ │ ├── issues.ts │ │ ├── projects.ts │ │ ├── time_entries.ts │ │ └── index.ts │ ├── formatters/ # Formatters │ │ ├── issues.ts │ │ ├── projects.ts │ │ ├── time_entries.ts │ │ └── index.ts │ ├── lib/ # Common libraries │ │ ├── client.ts # Redmine API client │ │ ├── config.ts # Configuration management │ │ └── types.ts # Type definitions │ ├── handlers.ts # Request handlers │ └── index.ts # Entry point ├── docs/ │ └── adr/ # Architecture Decision Records ├── package.json # Project configuration ├── tsconfig.json # TypeScript configuration └── README.md # Documentation

建筑

# Install dependencies npm install # Build npm run build # Start development server npm run dev

架构决策记录

主要设计决策记录在docs/adr中。添加或修改功能时请参考这些文档。

执照

麻省理工学院

相关项目

ID: 55eg9u36cg