Lets agents create and search Xray Cloud test cases, test executions and test plans through the Xray GraphQL API, and update test run status.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add xray --env XRAY_CLIENT_ID='<XRAY_CLIENT_ID>' --env XRAY_CLIENT_SECRET='<XRAY_CLIENT_SECRET>' -- node /path/to/xray-mcp/dist/index.js~/.codex/config.toml
[mcp_servers.xray]
command = "node"
args = ["/path/to/xray-mcp/dist/index.js"]
env = { XRAY_CLIENT_ID = "<XRAY_CLIENT_ID>", XRAY_CLIENT_SECRET = "<XRAY_CLIENT_SECRET>" }
# codex mcp add xray --env XRAY_CLIENT_ID='<XRAY_CLIENT_ID>' --env XRAY_CLIENT_SECRET='<XRAY_CLIENT_SECRET>' -- node /path/to/xray-mcp/dist/index.js~/.cursor/mcp.json
{
"mcpServers": {
"xray": {
"command": "node",
"args": [
"/path/to/xray-mcp/dist/index.js"
],
"env": {
"XRAY_CLIENT_ID": "<XRAY_CLIENT_ID>",
"XRAY_CLIENT_SECRET": "<XRAY_CLIENT_SECRET>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"xray": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/xray-mcp/dist/index.js"
],
"env": {
"XRAY_CLIENT_ID": "<XRAY_CLIENT_ID>",
"XRAY_CLIENT_SECRET": "<XRAY_CLIENT_SECRET>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"xray": {
"command": "node",
"args": [
"/path/to/xray-mcp/dist/index.js"
],
"env": {
"XRAY_CLIENT_ID": "<XRAY_CLIENT_ID>",
"XRAY_CLIENT_SECRET": "<XRAY_CLIENT_SECRET>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"xray": {
"command": "node",
"args": [
"/path/to/xray-mcp/dist/index.js"
],
"env": {
"XRAY_CLIENT_ID": "<XRAY_CLIENT_ID>",
"XRAY_CLIENT_SECRET": "<XRAY_CLIENT_SECRET>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"xray": {
"command": "node",
"args": [
"/path/to/xray-mcp/dist/index.js"
],
"env": {
"XRAY_CLIENT_ID": "<XRAY_CLIENT_ID>",
"XRAY_CLIENT_SECRET": "<XRAY_CLIENT_SECRET>"
}
}
}
}Environment variables
XRAY_CLIENT_IDXRAY_CLIENT_SECRET
Replace the placeholders with your own credentials and keep them out of version control.