artemeon / mantis2github
A small CLI tool to create a GitHub issue from a Mantis ticket.
Requires
- php: >=8.2
- composer-runtime-api: ^2.2.2
- ext-json: *
- ahinkle/packagist-latest-version: ^2.0
- artemeon/console: ^0.5.0
- guzzlehttp/guzzle: ^7.3.0
- helgesverre/toon: ^3.1
- mcp/sdk: ^0.6.0
- nunomaduro/termwind: ^1.5|^2.0
- symfony/console: ^5.0|^6.0|^7.0
- symfony/yaml: ^5.0|^6.0|^7.0
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.0
- laravel/pint: ^1.14
- phpstan/phpstan: ^2.1.2
- rector/rector: ^2.0.7
- roave/security-advisories: dev-latest
- dev-dev/3.x
- 3.2.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.0
- 2.3.0
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.5.0
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-code-cleanup
- dev-dev/2.x
- dev-chore/php84
- dev-master
- dev-feat/clean-up
This package is auto-updated.
Last update: 2026-06-05 21:07:35 UTC
README
A small CLI tool to create a GitHub issue out of a Mantis issue. Creates cross-references, so links the GitHub issue to mantis and vice versa.
Installation
composer global require artemeon/mantis2github
Configuration
When you first installed the package, call the configure command. You only need to do this once.
mantis2github configure
The command will direct you through the installation process.
Quick setup
If you have used a previous version of this package and already have a config.yaml file, you can skip the configuration by running:
mantis2github configure path/to/config.yaml
Usage
mantis2github [command]
Available Commands
| Command | Description |
|---|---|
sync |
Create a GitHub issue from a Mantis issue |
read:github |
Read details of a GitHub issue |
read:mantis |
Read details of a Mantis issue |
issues:list |
Get a list of Mantis Tickets with their associated GitHub Issues. |
sync
Create a GitHub issue from a list of Mantis issues.
mantis2github sync <ids>...
Arguments
| Argument | required | Description |
|---|---|---|
ids |
true |
Mantis issue ids |
Examples
Sync a single issue
mantis2github sync 123
Sync multiple issues
mantis2github sync 123 456 789
read:github
Read details of a GitHub issue.
mantis2github read:github <id>
Arguments
| Argument | required | Description |
|---|---|---|
id |
true |
GitHub issue id |
read:mantis
Read details of a Mantis issue.
mantis2github read:mantis <id>
Arguments
| Argument | required | Description |
|---|---|---|
id |
true |
Mantis issue id |
issues:list
Get a list of Mantis Tickets with their associated GitHub Issues.
mantis2github issues:list [--output=html]
Options
| Option | Possible values | Description |
|---|---|---|
output |
html |
Output Format |
MCP Server
This package ships an MCP server (mantis-mcp) that exposes
Mantis ticket details to LLM-powered clients. It reuses the same config.yaml as the CLI, so
running mantis2github configure once is enough to make both available.
The server speaks the stdio transport and exposes three tools:
| Tool | Description | Input |
|---|---|---|
mantis-issue-details |
Read ticket details (incl. attachment metadata) | { "id": <int> } or { "url": "<mantis-view-url>" } |
mantis-issue-attachments |
List attachment metadata (id, filename, size, content type) for a ticket | { "id": <int> } or { "url": "<mantis-view-url>" } |
mantis-attachment |
Fetch the bytes of a single attachment. Images come back as inline image content, text as text, everything else as an embedded resource. Files over 10 MB are rejected. | { "issue_id": <int>, "file_id": <int> } |
Textual responses are encoded as TOON to keep the LLM context compact.
Example host configuration
For Claude Desktop (claude_desktop_config.json) or any other MCP host that supports stdio servers:
{
"mcpServers": {
"mantis": {
"command": "mantis-mcp"
}
}
}
If mantis-mcp is not on your $PATH, point command at the absolute path inside your Composer
vendor/bin/ (or ~/.composer/vendor/bin/ for a global install).
License
This project is open-sourced software licensed under the MIT license.