|
|
2 ヶ月 前 | |
|---|---|---|
| .cursor | 2 ヶ月 前 | |
| mantis_mcp | 2 ヶ月 前 | |
| .cursorignore | 3 ヶ月 前 | |
| .env.example | 3 ヶ月 前 | |
| .gitignore | 3 ヶ月 前 | |
| README.md | 3 ヶ月 前 | |
| pyproject.toml | 3 ヶ月 前 | |
| uv.lock | 3 ヶ月 前 |
Serveur MCP Python pour connecter un agent à MantisBT via l'API REST.
Conforme aux spécifications Intersel (outils de mutation + ressources de lecture).
uv sync
Copiez .env.example vers .env :
BASE_URL=https://your-mantis-server.com/mantis
API_KEY=your_api_token_here
Les anciennes variables MANTIS_BASE_URL / MANTIS_API_TOKEN restent supportées.
uv run mantis-mcp
Fichier .cursor/mcp.json :
{
"mcpServers": {
"mantis": {
"command": "uv",
"args": ["run", "mantis-mcp"]
}
}
}
| Module | Rôle |
|---|---|
config/initialization.py |
Chargement .env, validation, démarrage MCP |
services/rest_client.py |
Client REST synchrone (ClientREST.execute) |
mcp/tools.py |
Outils de mutation |
mcp/resources.py |
Ressources de lecture |
mcp/filters.py |
Whitelist/blacklist pour optimiser le contexte |
| Outil | Méthode REST | Description |
|---|---|---|
create_issue |
POST /api/rest/issues |
Crée un ticket |
modify_issue |
PATCH /api/rest/issues/{id} |
Modifie un ticket |
add_issue_note |
POST /api/rest/issues/{id}/notes |
Ajoute un commentaire |
| URI | Endpoint REST |
|---|---|
mantisbt://issues |
GET /api/rest/issues |
mantisbt://issues/assigned |
GET /api/rest/issues?filter_id=assigned |
mantisbt://issues/{id} |
GET /api/rest/issues/{id} (sans history/notes) |
mantisbt://issues/{id}/notes |
GET avec select=notes |
mantisbt://issues/{id}/history |
GET avec select=history |
mantisbt://projects |
GET /api/rest/projects |
mantisbt://projects/{id} |
GET /api/rest/projects/{id} |
mantisbt://projects/{id}/handlers |
GET /api/rest/projects/{id}/handlers |