Redmine模型上下文协议服务器

Redmine MCP Server是一个为Redmine服务器提供模型上下文协议服务的工具,支持多种API操作和工具管理。

  • by 9506hqwy
  • Go
  • 本地部署
  • 更新于
在 GitHub 查看 9506hqwy/redmine-mcp-server

使用说明

Redmine MCP服务器

该存储库为Redmine服务器提供模型上下文协议服务器。

构建

构建二进制文件。

go build -o bin/redmine-mcp-server ./cmd/redmine-mcp-server/main.go

或者构建容器映像。

docker build -t redmine-mcp-server .

添加 Z 中绑定装载操作时的选项 Dockerfile 如果将podman与SELinux结合使用。

用法

运行应用程序。

指定API密钥或用户名和密码。

$ ./bin/redmine-mcp-server -h
Redmine MCP Server

Usage:
  redmine-mcp-server [flags]

Flags:
      --apikey string     Redmine server API key.
  -h, --help              help for redmine-mcp-server
      --password string   Redmine server password.
      --readonly          HTTP GET method only. (default true)
      --url string        Redmine server URL. (default "http://127.0.0.1:3000")
      --user string       Redmine server username.
  -v, --version           version for redmine-mcp-server

设置环境变量而不是参数。

参数 环境变量
--URL 红色URL
--用户 REDMINE_user
--密码 REDMINE_password
--apikey REDMINE_apikey
--只读 REDMINE_readonly

或者运行容器。

docker run --rm -i -e REDMINE_URL=<URL> -e REDMINE_APIKEY=<API Key> redmine-mcp-server

使用VS代码

添加 redmine-mcp-server 二进制到 PATH 环境变量和配置VS代码。

{
    "servers": {
        "redmine": {
            "type": "stdio",
            "command": "redmine-mcp-server",
            "env": {
                "REDMINE_URL": "${input:redmine_url}",
                "REDMINE_APIKEY": "${input:redmine_apikey}",
            }
        }
    },
    "inputs": [
        {
            "type": "promptString",
            "id": "redmine_url",
            "description": "Redmine Server URL",
            "password": false
        },
        {
            "type": "promptString",
            "id": "redmine_apikey",
            "description": "Redmine Server API key",
            "password": true
        }
    ]
}

工具

工具 说明
attachments_download 使用指定的ID下载附件
attachments_thumbnail 下载具有指定ID的附件缩略图
attachments_thumbnail_size 下载具有指定ID的附件缩略图
attachments_destroy 删除具有指定ID的附件
attachments_update_patch 使用指定的ID更新附件
attachments_show 返回具有指定ID的附件
attachments_download_all 下载具有指定ID的附件
custom_fields_index 返回所有自定义字段定义。
枚举_index_document_category 返回文档类别列表。
enumerations_index_issue_priority 返回问题优先级列表。
枚举_index_time_entry_activity 返回时间输入活动的列表。
groups_create 创建新组。
groups_index 返回所有组的列表。
groups_destroy 删除具有指定ID的组
groups_update_patch 使用指定的ID更新组
groups_show 返回具有指定ID的组
groups_add_users 将现有用户添加到组中。
groups_remove_user 从组中删除用户。
issues_index_csv 返回分页的问题列表。默认情况下,它只返回未解决的问题。
issues_create 创建新问题。
issues_index 返回分页的问题列表。默认情况下,它只返回未解决的问题。
issues_index_pdf 返回分页的问题列表。默认情况下,它只返回未解决的问题。
gantts_show_pdf 下载甘特图。
gantts_show_png 下载甘特图。
issues_destroy 删除具有指定ID的问题
issues_update_patch 使用指定的ID更新问题
issues_show 返回具有指定ID的问题
issues_show_pdf 返回具有指定ID的问题
issue_relations_create 为指定的问题ID创建关系
issue_relations_index 返回指定问题ID的关系
timelog_create_issue 为指定问题创建新的时间条目。
watchers_create_issue 为指定问题创建新的观察程序。
watchers_destroy_issue 从问题中删除具有指定ID的观察者。
issue_classies_destroy 删除具有指定ID的问题类别
issue_classies_update_patch 使用指定的ID更新问题类别
issue_classies_show 返回具有指定ID的问题类别
issue_statuses_index 返回所有问题状态的列表。
journals_update_patch 使用指定的ID更新日志
members_destroy 删除具有指定ID的成员资格
members_update_patch 使用指定的ID更新成员资格
members_show 返回具有指定ID的成员资格
my_account 返回当前用户的帐户信息。
news_create 创建新的新闻项。
news_index 返回所有项目中所有带分页的新闻项。
news_destroy 删除具有指定ID的新闻
news_update_patch 使用指定的ID更新新闻
news_show 返回具有指定ID的新闻项
projects_index_csv 返回所有项目(包括用户有权访问的所有公共项目和私有项目)。
projects_create 创建新项目。
projects_index 返回所有项目(包括用户有权访问的所有公共项目和私有项目)。
projects_destroy 删除具有指定ID或标识符的项目。
projects_update_patch 使用指定的ID或标识符更新项目。
projects_show 返回具有指定ID或标识符的项目。
projects_archive_post 使用指定的ID或标识符存档项目。
files_create 创建新文件。
files_index 返回所有文件的列表。
projects_unarchive_post 使用指定的ID或标识符对项目进行解压缩。
issues_index_project_csv 返回一个分页的问题列表。默认情况下,它只返回未解决的问题。
issues_create_project 创建新问题。
issues_index_project 返回分页的问题列表。默认情况下,它只返回未解决的问题。
issues_index_project_pdf 返回一个分页的问题列表。默认情况下,它只返回未解决的问题。
issue_classies_create 使用指定的项目ID或标识符创建问题类别。
issue_classies_index 按ID或标识符返回指定项目可用的问题类别。
gantts_show_project_pdf 下载指定项目的甘特图。
gantts_show_project_png 下载指定项目的甘特图。
members_create 向项目添加新成员。
members_index 返回项目成员资格的分页列表。
news_create_project 创建新的新闻项。
news_index_project 返回所有项目中所有带分页的新闻项。
repositories_add_lated_issue 将相关问题添加到指定的修订版中。
repositories_remove_lated_issue 从指定版本中删除相关问题。
search_index_project 根据指定的查询参数返回搜索结果。
timelog_index_project_csv 以csv格式返回指定项目的时间条目列表。
timelog_create_project 创建新的时间条目。
timelog_index_project 返回指定项目的时间条目列表。
versions_create 使用指定的ID或标识符(:project_ID)为项目创建新版本。
versions_index 返回具有指定ID或标识符(:project_ID)的项目可用的版本。响应可能包括来自其他项目的共享版本。
wiki_show_root 返回根wiki页面的详细信息。
wiki_index 返回项目wiki中所有页面的列表。
wiki_destroy 删除具有指定ID的wiki页面、其附件和历史记录。如果删除的页面是父页面,则其子页面不会被删除,而是作为根页面更改。
wiki_update_patch 使用指定的ID创建或更新wiki页面
wiki_show 返回具有指定ID的wiki页面的详细信息
wiki_show_pdf 返回具有指定ID的wiki页面的详细信息
wiki_show_txt 返回具有指定ID的wiki页面的详细信息
wiki_show_version 返回具有指定ID的旧版本wiki页面的详细信息
wiki_show_version_pdf 返回具有指定ID的旧版本wiki页面的详细信息
wiki_show_version_txt 返回具有指定ID的旧版本wiki页面的详细信息
queries_index 返回所有查询的列表。
issue_conrelations_destroy 删除具有指定ID的关系
issue_relations_show 返回具有指定ID的关系
roles_index 返回所有角色的列表。
roles_show 返回具有指定ID的角色
search_index 根据指定的查询参数返回搜索结果。
timelog_index_csv 返回时间条目的列表。
timelog_create 创建新的时间条目。
timelog_index 返回时间条目的列表。
timelog_destroy 删除具有指定ID的时间条目
timelog_update_patch 使用指定的ID更新时间条目
timelog_show 返回具有指定ID的时间条目
trackers_index 返回所有跟踪器的列表。
users_index_csv 以csv格式返回所有用户的列表。
users_create 创建新用户。
users_index 返回所有用户的列表。
users_story 删除具有指定ID的用户
users_update_patch 使用指定的ID更新用户。使用/users/current.json更新其凭据用于访问API的用户。
users_show 返回具有指定ID的用户。使用/users/current.json检索其凭据用于访问API的用户。
watchers_destroy 删除具有指定ID的监视器
watchers_create 创建一个新的观察者。
versions_show_txt 返回具有指定ID的版本
versions_design 删除具有指定ID的版本
versions_update_patch 使用指定的ID更新版本
versions_show 返回具有指定ID的版本

测试

检查此MCP服务器是否正确使用 mcpcurl.

列出此MCP服务器中的工具。

mcpcurl tools --pretty=false --stdio-server-cmd ./bin/redmine-mcp-server

显示工具的帮助。

mcpcurl tools --pretty=false --stdio-server-cmd ./bin/redmine-mcp-server <tool> --help

例如,获取我的账户。

mcpcurl tools \
    --pretty=false \
    --stdio-server-cmd "./bin/redmine-mcp-server --url=<URL> --apikey=<TOKEN>" \
    my_account

例如,获取维基列表。

mcpcurl tools \
    --pretty=false \
    --stdio-server-cmd "./bin/redmine-mcp-server --url=<URL> --apikey=<TOKEN>" \
    wiki_index --project_id 1

检查架构。

mcpcurl schema --pretty=false --stdio-server-cmd ./bin/redmine-mcp-server

检查此MCP服务器是否正确使用 @模型上下文协议/检查器.

npx @modelcontextprotocol/inspector ./bin/redmine-mcp-server --url=<URL> --apikey=<TOKEN>

待办事项

  • 添加二进制操作支持。
    • 附件#download_all
    • 附件#上传
    • 甘特图#展示项目pdf
    • 问题索引pdf
    • 问题#show pdf
    • 问题#索引项目pdf
    • 维基#显示pdf
    • 维基#显示版本pdf

备注

  • 在GitHub Copilot Chat面板的[工具图标]处检查未使用的工具,因为vscode限制了最多128个工具。