Skip to content

Configuration

This page details the environment variables required to securely configure the TestRail MCP Server.

VariableDescriptionRequiredDefault
TESTRAIL_INSTANCE_URLYour TestRail instance URL (e.g., https://example.testrail.io)
TESTRAIL_USERNAMEYour TestRail user email address
TESTRAIL_API_KEYYour TestRail API key
TESTRAIL_ENABLE_SHARED_STEPSSet to true to enable Shared Steps management toolsfalse
TESTRAIL_ENABLE_CASE_HISTORYSet to true to enable Case History and revision tracking toolsfalse
TESTRAIL_ALLOW_WRITE_OPERATIONSAllow write operations (e.g. adding/updating test cases)true
TESTRAIL_ALLOW_READ_OPERATIONSAllow read operations (e.g. retrieving projects)true
TESTRAIL_ALLOW_DELETE_OPERATIONSAllow delete operations (e.g. deleting cases). Enabled strictly via true.false
TESTRAIL_ENABLE_DEPRECATED_TOOLSEnable deprecated tools for backward compatibility. Set to false to reduce context token overhead.true

TIP

Token Tip: If you are not using legacy tools, set TESTRAIL_ENABLE_DEPRECATED_TOOLS=false in your environment to eliminate deprecated tool definitions from the LLM prompt and save tokens!