Integrates with Xray Cloud (an Atlassian Jira add-on) to provide comprehensive test management capabilities including creating and managing test cases, test executions, test plans, and test sets through GraphQL and REST APIs
Xray MCP Server
Model Context Protocol (MCP) server per integrare le API di Xray Cloud con Claude Code e altri client MCP.
Funzionalità
Questo server MCP espone strumenti per gestire test cases e test executions in Xray Cloud usando l'API GraphQL ufficiale:
Test Cases (Test Management)
create_test_case: Crea un nuovo test case (usa GraphQL mutation
createTest)get_test_case: Recupera i dettagli di un test case specifico (usa GraphQL query
getTests)delete_test_case: Elimina un test case (usa GraphQL mutation
deleteTest)search_test_cases: Cerca test cases usando JQL (Jira Query Language)
get_project_test_cases: Recupera tutti i test cases di un progetto
update_test_case: ⚠️ Non supportato direttamente - usa Jira REST API per aggiornare campi standard
Test Executions (Test Automation & CI/CD)
create_test_execution: Crea una nuova test execution per eseguire test
get_test_execution: Recupera dettagli di una test execution con tutti i test runs
search_test_executions: Cerca test executions usando JQL
get_project_test_executions: Recupera tutte le test executions di un progetto
update_test_run_status: Aggiorna lo stato di un test run (PASS, FAIL, ecc.)
Test Plans (Test Organization)
create_test_plan: Crea un nuovo test plan per organizzare test
get_test_plan: Recupera dettagli di un test plan specifico con tutti i test
search_test_plans: Cerca test plans usando JQL
get_project_test_plans: Recupera tutti i test plans di un progetto
add_tests_to_test_plan: Aggiungi test a un test plan esistente
remove_tests_from_test_plan: Rimuovi test da un test plan
Test Sets (Test Grouping)
create_test_set: Crea un nuovo test set per raggruppare test
get_test_set: Recupera dettagli di un test set specifico con tutti i test
search_test_sets: Cerca test sets usando JQL
get_project_test_sets: Recupera tutti i test sets di un progetto
add_tests_to_test_set: Aggiungi test a un test set esistente
remove_tests_from_test_set: Rimuovi test da un test set
Prerequisiti
Node.js 18 o superiore
Credenziali API di Xray Cloud (Client ID e Client Secret)
Testing
This project includes comprehensive test coverage:
Unit Tests: Fast tests with mocked API responses (no credentials needed)
Integration Tests: End-to-end tests with real Xray Cloud API
For detailed testing documentation, see TESTING.md
Installazione
Clona o scarica questo repository
Installa le dipendenze:
Compila il progetto:
Come ottenere le credenziali API
Naviga in Settings → API Keys
Clicca su Create API Key
Copia il Client ID e il Client Secret generati
Utilizzo
Configurazione in Claude Code
Per usare questo server MCP con Claude Code, aggiungi la seguente configurazione al tuo file di configurazione MCP (solitamente ~/Library/Application Support/Claude/claude_desktop_config.json su macOS):
Importante: Sostituisci:
/path/to/xray-mcpcon il percorso assoluto del progetto (es./Users/manuel/repositories/xray-mcp)your_client_ideyour_client_secretcon le tue credenziali Xray Cloud
Test locale
Per testare il server in modalità di sviluppo:
Esempi di utilizzo
Test Cases
Creare un test case
Cercare test cases
Recuperare test cases di un progetto
Test Executions
Creare una test execution
Recuperare una test execution
Aggiornare lo stato di un test run
Cercare test executions recenti
Struttura del progetto
API Xray Cloud
Questo server utilizza le seguenti API di Xray Cloud:
Authentication:
POST /api/v1/authenticate(token valido 24 ore)GraphQL Endpoint:
POST /api/v2/graphqlTest Queries:
getTests- Recupera test usando JQLTest Mutations:
createTest,deleteTest- Crea/elimina testTest Execution Queries:
getTestExecutions- Recupera executions usando JQLTest Execution Mutations:
createTestExecution,updateTestRunStatus- Gestisce executions e risultatiTest Plan Queries:
getTestPlans- Recupera test plans usando JQLTest Plan Mutations:
createTestPlan,addTestsToTestPlan,removeTestsFromTestPlan- Gestisce test plansTest Set Queries:
getTestSets- Recupera test sets usando JQLTest Set Mutations:
createTestSet,addTestsToTestSet,removeTestsFromTestSet- Gestisce test sets
Per la documentazione completa delle API, visita:
GraphQL API: https://docs.getxray.app/display/XRAYCLOUD/GraphQL+API
Schema GraphQL: https://us.xray.cloud.getxray.app/doc/graphql/
REST API: https://docs.getxray.app/display/XRAYCLOUD/REST+API
Sviluppo futuro
Funzionalità pianificate per future versioni:
Gestione Test Executions ✅ (implementato)
Gestione Test Plans e Test Sets ✅ (implementato)
Gestione Test Steps (add/update/remove)
Gestione Pre-conditions
Integrazione con Test Repositories (folder management)
Gestione Requirements e coverage tracking
Bulk import/export di test results
Use Cases
Integrazione CI/CD
Usa questo server MCP per:
Creare test executions automaticamente nelle pipeline CI/CD
Aggiornare stati dei test runs in base ai risultati dei test automatici
Tracciare l'esecuzione dei test attraverso diversi ambienti
Generare report di test execution per sprint reviews
Test Management
Usa questo server MCP per:
Creare e organizzare test cases
Cercare test usando query JQL complesse
Gestire test executions manuali
Tracciare lo stato dei test nel tempo
Licenza
ISC
Supporto
Per problemi o domande sulle API di Xray Cloud, consulta la documentazione ufficiale:
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
Enables integration with Xray Cloud APIs for comprehensive test management including creating and managing test cases, test executions, test plans, and test sets. Supports CI/CD automation and test result tracking through GraphQL APIs.