io.github.jztan/redmine-mcp-server

平台与服务

by jztan

面向 Redmine 的生产级 MCP server,支持安全控制、pagination,以及适合企业场景的高级功能。

什么是 io.github.jztan/redmine-mcp-server

面向 Redmine 的生产级 MCP server,支持安全控制、pagination,以及适合企业场景的高级功能。

README

Redmine MCP Server

PyPI Version License Python Version GitHub Issues CI Coverage Downloads

A Model Context Protocol (MCP) server that integrates with Redmine project management systems. This server provides seamless access to Redmine data through MCP tools, enabling AI assistants to interact with your Redmine instance.

mcp-name: io.github.jztan/redmine-mcp-server

Tool reference | Changelog | Contributing | Troubleshooting

Features

  • Redmine Integration: List projects, view/create/update issues, download attachments
  • HTTP File Serving: Secure file access via UUID-based URLs with automatic expiry
  • MCP Compliant: Full Model Context Protocol support with FastMCP and HTTP transport
  • Flexible Authentication: API key, username/password, or OAuth2 per-user tokens
  • File Management: Automatic cleanup of expired files with storage statistics
  • Docker Ready: Complete containerization support
  • Pagination Support: Efficiently handle large issue lists with configurable limits
  • Read-Only Mode: Restrict to read-only operations via REDMINE_MCP_READ_ONLY environment variable
  • Prompt Injection Protection: User-controlled content wrapped in boundary tags for safe LLM consumption

Quick Start

  1. Install the package
    bash
    pip install redmine-mcp-server
    
  2. Create a .env file with your Redmine credentials (see Installation for template)
  3. Start the server
    bash
    redmine-mcp-server
    
  4. Add the server to your MCP client using one of the guides in MCP Client Configuration.

Once running, the server listens on http://localhost:8000 with the MCP endpoint at /mcp, health check at /health, and file serving at /files/{file_id}.

Installation

Prerequisites

  • Python 3.10+ (for local installation)
  • Docker (alternative deployment, uses Python 3.13)
  • Access to a Redmine instance

Install from PyPI (Recommended)

bash
# Install the package
pip install redmine-mcp-server

# Create configuration file .env
cat > .env << 'EOF'
# Redmine connection (required)
REDMINE_URL=https://your-redmine-server.com

# Authentication - Use either API key (recommended) or username/password
REDMINE_API_KEY=your_api_key
# OR use username/password:
# REDMINE_USERNAME=your_username
# REDMINE_PASSWORD=your_password

# Server configuration (optional, defaults shown)
SERVER_HOST=0.0.0.0
SERVER_PORT=8000

# Public URL for file serving (optional)
PUBLIC_HOST=localhost
PUBLIC_PORT=8000

# File management (optional)
ATTACHMENTS_DIR=./attachments
AUTO_CLEANUP_ENABLED=true
CLEANUP_INTERVAL_MINUTES=10
ATTACHMENT_EXPIRES_MINUTES=60
EOF

# Edit .env with your actual Redmine settings
nano .env  # or use your preferred editor

# Run the server
redmine-mcp-server
# Or alternatively:
python -m redmine_mcp_server.main

The server runs on http://localhost:8000 with the MCP endpoint at /mcp, health check at /health, and file serving at /files/{file_id}.

Environment Variables Configuration

<details> <summary><strong>Environment Variables</strong></summary>
VariableRequiredDefaultDescription
REDMINE_URLYesBase URL of your Redmine instance
REDMINE_AUTH_MODENolegacyAuthentication mode: legacy or oauth (see Authentication)
REDMINE_API_KEYYes†API key (legacy mode only)
REDMINE_USERNAMEYes†Username for basic auth (legacy mode only)
REDMINE_PASSWORDYes†Password for basic auth (legacy mode only)
REDMINE_MCP_BASE_URLYes‡http://localhost:3040Public base URL of this server, no trailing slash (OAuth mode only)
SERVER_HOSTNo0.0.0.0Host/IP the MCP server binds to
SERVER_PORTNo8000Port the MCP server listens on
PUBLIC_HOSTNolocalhostHostname used when generating download URLs
PUBLIC_PORTNo8000Public port used for download URLs
ATTACHMENTS_DIRNo./attachmentsDirectory for downloaded attachments
AUTO_CLEANUP_ENABLEDNotrueToggle automatic cleanup of expired attachments
CLEANUP_INTERVAL_MINUTESNo10Interval for cleanup task
ATTACHMENT_EXPIRES_MINUTESNo60Expiry window for generated download URLs
REDMINE_SSL_VERIFYNotrueEnable/disable SSL certificate verification
REDMINE_SSL_CERTNoPath to custom CA certificate file
REDMINE_SSL_CLIENT_CERTNoPath to client certificate for mutual TLS
REDMINE_MCP_READ_ONLYNofalseBlock all write operations (create/update/delete) when set to true
REDMINE_AUTOFILL_REQUIRED_CUSTOM_FIELDSNofalseEnable one retry for issue creation by filling missing required custom fields
REDMINE_REQUIRED_CUSTOM_FIELD_DEFAULTSNo{}JSON object mapping required custom field names to fallback values used when creating issues

† Required when REDMINE_AUTH_MODE=legacy. Either REDMINE_API_KEY or REDMINE_USERNAME+REDMINE_PASSWORD must be set. API key is recommended. ‡ Required when REDMINE_AUTH_MODE=oauth.

When REDMINE_AUTOFILL_REQUIRED_CUSTOM_FIELDS=true, create_redmine_issue retries once on relevant custom-field validation errors (for example <Field Name> cannot be blank or <Field Name> is not included in the list) and fills values only from:

  • the Redmine custom field default_value, or
  • REDMINE_REQUIRED_CUSTOM_FIELD_DEFAULTS

Example:

bash
REDMINE_AUTOFILL_REQUIRED_CUSTOM_FIELDS=true
REDMINE_REQUIRED_CUSTOM_FIELD_DEFAULTS='{"Required Field A":"Value A","Required Field B":"Value B"}'
</details>

SSL Certificate Configuration

Configure SSL certificate handling for Redmine servers with self-signed certificates or internal CA infrastructure.

<details> <summary><strong>Self-Signed Certificates</strong></summary>

If your Redmine server uses a self-signed certificate or internal CA:

bash
# In .env file
REDMINE_URL=https://redmine.company.com
REDMINE_API_KEY=your_api_key
REDMINE_SSL_CERT=/path/to/ca-certificate.crt

Supported certificate formats: .pem, .crt, .cer

</details> <details> <summary><strong>Mutual TLS (Client Certificates)</strong></summary>

For environments requiring client certificate authentication:

bash
# In .env file
REDMINE_URL=https://secure.redmine.com
REDMINE_API_KEY=your_api_key
REDMINE_SSL_CERT=/path/to/ca-bundle.pem
REDMINE_SSL_CLIENT_CERT=/path/to/cert.pem,/path/to/key.pem

Note: Private keys must be unencrypted (Python requests library requirement).

</details> <details> <summary><strong>Disable SSL Verification (Development Only)</strong></summary>

⚠️ WARNING: Only use in development/testing environments!

bash
# In .env file
REDMINE_SSL_VERIFY=false

Disabling SSL verification makes your connection vulnerable to man-in-the-middle attacks.

</details>

For SSL troubleshooting, see the Troubleshooting Guide.

Authentication

The server supports two authentication modes, selected via REDMINE_AUTH_MODE.

Backward compatibility: REDMINE_AUTH_MODE defaults to legacy, so all existing deployments continue to work without any configuration changes. OAuth2 support is purely additive — nothing breaks if you never set the variable.

Legacy mode (default)

Uses a single shared credential — either an API key or a username/password pair — configured once in .env. Every request to Redmine uses the same identity.

bash
REDMINE_AUTH_MODE=legacy        # or omit entirely — this is the default
REDMINE_URL=https://redmine.example.com
REDMINE_API_KEY=your_api_key
# OR:
# REDMINE_USERNAME=your_username
# REDMINE_PASSWORD=your_password

OAuth2 mode

Requires Redmine 6.1 or newer. OAuth2 support (via the Doorkeeper gem) was introduced in Redmine 6.1.

Each MCP request carries its own Authorization: Bearer <token> header. The server validates the token against GET /users/current.json on Redmine before forwarding it. This enables multi-user deployments where each user authenticates with their own Redmine account.

bash
REDMINE_AUTH_MODE=oauth
REDMINE_URL=https://redmine.example.com
REDMINE_MCP_BASE_URL=https://redmine-mcp.example.com   # public URL of this server

In OAuth mode the server also exposes OAuth2 discovery and token management endpoints:

EndpointStandardPurpose
/.well-known/oauth-protected-resourceRFC 8707Tells clients where to find the authorization server
/.well-known/oauth-authorization-serverRFC 8414Advertises Redmine's Doorkeeper OAuth endpoints
POST /revokeRFC 7009Revokes an OAuth2 token (proxies to Redmine's /oauth/revoke)

Redmine uses the Doorkeeper gem for OAuth2 but does not serve the RFC 8414 discovery document itself. This server serves it on Redmine's behalf, pointing to Redmine's real /oauth/authorize, /oauth/token, and /oauth/revoke endpoints.

Prerequisites for OAuth mode:

  • An OAuth application registered in Redmine admin → Applications with the callback URL of your client
  • A client that handles the authorization code flow, stores the resulting token per user, and sends it as Authorization: Bearer <token> on every MCP request
  • No Dynamic Client Registration (DCR) is required — register the application manually in Redmine admin

For step-by-step setup instructions, see the OAuth2 Setup Guide.

MCP Client Configuration

The server exposes an HTTP endpoint at http://127.0.0.1:8000/mcp. Register it with your preferred MCP-compatible agent using the instructions below.

<details> <summary><strong>Visual Studio Code (Native MCP Support)</strong></summary>

VS Code has built-in MCP support via GitHub Copilot (requires VS Code 1.102+).

Using CLI (Quickest):

bash
code --add-mcp '{"name":"redmine","type":"http","url":"http://127.0.0.1:8000/mcp"}'

Using Command Palette:

  1. Open Command Palette (Cmd/Ctrl+Shift+P)
  2. Run MCP: Open User Configuration (for global) or MCP: Open Workspace Folder Configuration (for project-specific)
  3. Add the configuration:
    json
    {
      "servers": {
        "redmine": {
          "type": "http",
          "url": "http://127.0.0.1:8000/mcp"
        }
      }
    }
    
  4. Save the file. VS Code will automatically load the MCP server.

Manual Configuration: Create .vscode/mcp.json in your workspace (or mcp.json in your user profile directory):

json
{
  "servers": {
    "redmine": {
      "type": "http",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}
</details> <details> <summary><strong>Claude Code</strong></summary>

Add to Claude Code using the CLI command:

bash
claude mcp add --transport http redmine http://127.0.0.1:8000/mcp

Or configure manually in your Claude Code settings file (~/.claude.json):

json
{
  "mcpServers": {
    "redmine": {
      "type": "http",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}
</details> <details> <summary><strong>Claude Desktop (macOS & Windows)</strong></summary>

Claude Desktop's config file supports stdio transport only. Use FastMCP's proxy via uv to bridge to this HTTP server.

Setup:

  1. Open Claude Desktop
  2. Click the Claude menu (macOS menu bar / Windows title bar) > Settings...
  3. Click the Developer tab > Edit Config
  4. Add the following configuration:
json
{
  "mcpServers": {
    "redmine": {
      "command": "uv",
      "args": [
        "run",
        "--with", "fastmcp",
        "fastmcp",
        "run",
        "http://127.0.0.1:8000/mcp"
      ]
    }
  }
}
  1. Save the file, then fully quit and restart Claude Desktop
  2. Look for the tools icon in the input area to verify the connection

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Note: The Redmine MCP server must be running before starting Claude Desktop.

</details> <details> <summary><strong>Codex CLI</strong></summary>

Add to Codex CLI using the command:

bash
codex mcp add redmine -- npx -y mcp-client-http http://127.0.0.1:8000/mcp

Or configure manually in ~/.codex/config.toml:

toml
[mcp_servers.redmine]
command = "npx"
args = ["-y", "mcp-client-http", "http://127.0.0.1:8000/mcp"]

Note: Codex CLI primarily supports stdio-based MCP servers. The above uses mcp-client-http as a bridge for HTTP transport.

</details> <details> <summary><strong>Kiro</strong></summary>

Kiro primarily supports stdio-based MCP servers. For HTTP servers, use an HTTP-to-stdio bridge:

  1. Create or edit .kiro/settings/mcp.json in your workspace:
    json
    {
      "mcpServers": {
        "redmine": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-client-http",
            "http://127.0.0.1:8000/mcp"
          ],
          "disabled": false
        }
      }
    }
    
  2. Save the file and restart Kiro. The Redmine tools will appear in the MCP panel.

Note: Direct HTTP transport support in Kiro is limited. The above configuration uses mcp-client-http as a bridge to connect to HTTP MCP servers.

</details> <details> <summary><strong>Generic MCP Clients</strong></summary>

Most MCP clients use a standard configuration format. For HTTP servers:

json
{
  "mcpServers": {
    "redmine": {
      "type": "http",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

For clients that require a command-based approach with HTTP bridge:

json
{
  "mcpServers": {
    "redmine": {
      "command": "npx",
      "args": ["-y", "mcp-client-http", "http://127.0.0.1:8000/mcp"]
    }
  }
}
</details>

Testing Your Setup

bash
# Test connection by checking health endpoint
curl http://localhost:8000/health

Available Tools

This MCP server provides 21 tools for interacting with Redmine. For detailed documentation, see Tool Reference.

Docker Deployment

Quick Start with Docker

bash
# Configure environment
cp .env.example .env.docker
# Edit .env.docker with your Redmine settings

# Run with docker-compose
docker-compose up --build

# Or run directly
docker build -t redmine-mcp-server .
docker run -p 8000:8000 --env-file .env.docker redmine-mcp-server

Production Deployment

Use the automated deployment script:

bash
chmod +x deploy.sh
./deploy.sh

Troubleshooting

If you run into any issues, checkout our troubleshooting guide.

Contributing

Contributions are welcome! Please see our contributing guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Additional Resources

常见问题

io.github.jztan/redmine-mcp-server 是什么?

面向 Redmine 的生产级 MCP server,支持安全控制、pagination,以及适合企业场景的高级功能。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描111.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描111.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描9.6k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.0k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.8k

评论