Anyone who has scripted against TestRail knows the failure mode: a case that looks right and is rejected because a custom field wants an ID, not a label. Exposing templates, fields, statuses, priorities and configurations as tools — with resolve_case_field to translate a name — moves that problem out of the prompt and into data. Two switches worth setting deliberately: writes are on by default and can be turned off entirely, and shared steps and case history stay unregistered unless you enable them, which keeps the tool surface smaller.
A TypeScript server covering the TestRail API: projects and suites, test cases with custom fields, runs and results, attachments, and the metadata a model needs to produce valid records.
- Discovery: query_project, query_suite, get_sections and mutate_suite or mutate_section for structure changes
- Cases: get_case, get_cases, add_case, update_case and update_cases for bulk edits
- Execution: query_run and mutate_run for runs, get_tests for what is in one, and get_results, add_results and add_results_for_cases for outcomes
- Metadata exposed to the model so it generates valid data: get_case_fields, get_templates, get_statuses, get_priorities, get_configurations and get_users
- resolve_case_field — a field name turned into the identifier TestRail expects
- Attachments: add_attachment, add_attachment_to_run and query_attachment for pulling one back
- Optional shared steps management — get_shared_steps, add_shared_step, update_shared_step and their history
- Optional case history, so you can see what changed after a given revision or timestamp
- delete_entity for removals, kept as a separate explicit tool
Three values from your TestRail instance: TESTRAIL_INSTANCE_URL, TESTRAIL_USERNAME and an API key from My Settings → API Keys in TESTRAIL_API_KEY. Run with npx from @uarlouski/testrail-mcp-server. Writes can be switched off with TESTRAIL_ALLOW_WRITE_OPERATIONS, and shared steps and case history are opt-in through their own flags. Validated against TestRail 10.6.2 on API v2, with backward compatibility for older instances.
One command plus a key — npx -y @uarlouski/testrail-mcp-server@latest, then supply credentials
