Redmine MCP Server for Cline

by ilask

Integrations

  • Allows you to interact with your Redmine projects and issues through the Cline VS Code extension, including reading project details and creating new issues.

Cline 的 Redmine MCP 服务器

这是一个与 Redmine 集成的自定义 MCP(模型上下文协议)服务器,允许您通过 Cline VS Code 扩展与您的 Redmine 项目和问题进行交互。

先决条件

  • **Node.js:**您需要在系统上安装 Node.js(版本 18 或更新版本)。
  • **Redmine 实例:**您需要一个正在运行并启用 REST API 的 Redmine 实例。
  • **Redmine API 密钥:**您需要一个用于 Redmine 用户帐户的 API 密钥。您可以在 Redmine 帐户设置中找到它(通常在“我的帐户”->“API 访问密钥”下)。
  • **Cline:**您需要安装并配置 Cline VS Code 扩展。

安装

  1. 克隆存储库:
    git clone https://github.com/ilask/Redmine-MCP.git cd Redmine-MCP
  2. 安装依赖项:
    npm install

配置

  1. **设置环境变量:**在项目目录的根目录中创建一个.env文件并添加以下内容,用实际的 Redmine 主机名和 API 密钥替换占位符:
    REDMINE_HOST=your-redmine-host.com REDMINE_API_KEY=your-redmine-api-key
    **重要提示:**请勿将您的.env文件提交到版本控制!该文件包含敏感信息。此仓库中包含的.gitignore文件应该会阻止其被提交。

添加到 Cline

  1. **打开 Cline 设置:**在 VS Code 中,打开 Cline 扩展并转到 MCP 服务器选项卡。
  2. **编辑 MCP 设置:**单击“编辑 MCP 设置”以打开cline_mcp_settings.json文件。
  3. **添加服务器:**将以下条目添加到mcpServers对象,将args路径替换为系统上server.js文件的绝对路径:
    { "mcpServers": { "redmine-server": { "command": "node", "args": ["C:\\Users\\yourusername\\path\\to\\Redmine-MCP\\server.js"], "disabled": false, "autoApprove": [] } } }
    **重要提示:**请确保在 Windows 上的路径中使用双反斜杠( \\ )。
  4. **保存:**保存cline_mcp_settings.json文件。Cline 会自动检测更改并启动服务器。

可用资源和工具

资源

  • **redmine://projects/{project_id}**此资源代表一个 Redmine 项目。请将{project_id}替换为您 Redmine 实例中项目的实际 ID。您可以使用 Cline 中的access_mcp_resource工具读取项目详情。例如:
    <access_mcp_resource> <server_name>redmine-server</server_name> <uri>redmine://projects/123</uri> </access_mcp_resource>

(将123替换为有效的项目 ID)。这将以 JSON 格式返回项目详细信息。

工具

  • **create_issue**此工具允许您在 Redmine 中创建新问题。它采用以下参数:
    • project_id (字符串,必需):应创建问题的项目的 ID。
    • subject (字符串,必需):问题的主题。
    • description (字符串,必需):问题的描述。

    您可以使用 Cline 中的use_mcp_tool工具来调用此工具。例如:

    <use_mcp_tool> <server_name>redmine-server</server_name> <tool_name>create_issue</tool_name> <arguments> { "project_id": "456", "subject": "My New Issue", "description": "This is a test issue created via Cline." } </arguments> </use_mcp_tool>

    (将456替换为有效的项目 ID)。这将在指定项目中创建一个新问题,并以 JSON 格式返回问题详细信息。

故障排除

  • **连接已关闭错误:**如果您看到类似“MCP 错误 -1:连接已关闭”的错误,请确保您的REDMINE_HOSTREDMINE_API_KEY环境变量已正确设置。此外,请确保您的 Redmine 实例可以从您的计算机访问。
  • **检查服务器日志:**如果遇到问题,请在 VS Code 终端中检查服务器的输出,查看是否有任何错误消息。服务器会将错误记录到控制台中。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

通过 Cline VS Code 扩展实现与 Redmine 项目和问题的交互,支持通过模型上下文协议进行项目管理和问题创建。

  1. 先决条件
    1. 安装
      1. 配置
        1. 添加到 Cline
          1. 可用资源和工具
            1. 资源
            2. 工具
          2. 故障排除

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server for interacting with Redmine using its REST API, enabling the management of tickets, projects, and user data through integration with LLMs.
              Last updated -
              23
              1
              TypeScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              Enables management of development projects with GitHub integration, facilitating project tracking, repository linking, and metadata maintenance within the Model Context Protocol.
              Last updated -
              3
              JavaScript
            • -
              security
              F
              license
              -
              quality
              Facilitates project management with the Linear API via the Model Context Protocol, allowing users to manage initiatives, projects, issues, and their relationships through features like creation, viewing, updating, and prioritization.
              Last updated -
              324
              4
              TypeScript
            • A
              security
              F
              license
              A
              quality
              Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
              Last updated -
              7
              123
              1
              JavaScript
              • Apple

            View all related MCP servers

            ID: ve2y2qagen