Skip to content

MCP - Connect with a Config File

In this tutorial, you will learn how you can connect Claude, Cursor, or OpenCode to your Testomat.io project through the MCP Server. After that, your assistant reads your tests, searches them, and manages runs for you, without you opening the app.

This tutorial sets up a config file with a project token, which is what Cursor, OpenCode, and Claude Desktop need. If you use Claude or ChatGPT in the browser, MCP - Connect Claude and MCP - Connect ChatGPT are quicker — you sign in with your account, with nothing to configure.

Copy your token, add the config, restart the assistant, then ask it to list your suites

Before you start:

  • Node.js 18+ installed on your computer
  • A project in Testomat.io
  • Claude Desktop, Cursor, or OpenCode installed

Your assistant needs two values from your project.

  1. Open your project in Testomat.io.
  2. Go to Settings.
  3. Open the API Key page.
  4. Copy the project token. It starts with tstmt_.
  5. Copy the project ID from the same page.

Use a project token, not a general one. A general token opens every project you have access to. See API Access.

The Agents tab of the Connect Testomat.io MCP Server window with the CLI command and the JSON config

Follow the section for the assistant you use, and skip the other two.

  1. Open the file .cursor/mcp.json in your project. Create it if it isn’t there.
  2. Paste this config:
{
"mcpServers": {
"testomatio": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@testomatio/mcp@latest", "--token", "<TOKEN>", "--project", "<PROJECT_ID>"],
"env": { "TESTOMATIO_BASE_URL": "https://app.testomat.io" }
}
}
}
  1. Replace <TOKEN> and <PROJECT_ID> with the values you copied.
  2. Save the file.
  3. Restart Cursor.

To use the same connection in all your projects, edit ~/.cursor/mcp.json instead.

  1. Open your Claude config file. Create it if it isn’t there.
    • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Paste this config:
{
"mcpServers": {
"testomatio": {
"command": "npx",
"args": ["-y", "@testomatio/mcp@latest", "--token", "<TOKEN>", "--project", "<PROJECT_ID>"],
"env": { "TESTOMATIO_BASE_URL": "https://app.testomat.io" }
}
}
}
  1. Replace <TOKEN> and <PROJECT_ID> with the values you copied.
  2. Save the file.
  3. Restart Claude Desktop.
  1. Open the file opencode.json in your project root. Create it if it isn’t there.
  2. Paste this config:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"testomat": {
"type": "local",
"command": ["npx", "-y", "@testomatio/mcp@latest", "--token", "<TOKEN>", "--project", "<PROJECT_ID>"],
"enabled": true,
"environment": { "TESTOMATIO_BASE_URL": "https://app.testomat.io" }
}
}
}
  1. Replace <TOKEN> and <PROJECT_ID> with the values you copied.
  2. Save the file.
  3. Restart OpenCode.

To use the same connection in all your projects, edit ~/.config/opencode/opencode.json instead.

Ask the assistant to list your suites, it answers with your real suite names, and the connection is live

Ask your assistant: list my test suites. If it answers with the real suite names from your project, the connection is live.

Once connected, your assistant works with your project through Public API v2. It can:

  • Create, read, update, and delete tests, suites, plans, and runs.
  • Read your tags and milestones.
  • Manage issues and link them to tests, suites, or runs.
  • Upload attachments and requirements in tests, suites, or runs.
  • Search tests and runs with TQL
  • Launch, finish, and rerun a run.
  • The assistant answers from general knowledge instead of your project data - the config did not load. Check that the file path and the file name are correct, then restart the assistant.
  • You get an access or “denied” error - the token or project ID is wrong, or the token was revoked. Copy both again from the API Key page.
  • You get an HTTPS or certificate error on a company network - if your Node.js version supports it, add "NODE_OPTIONS": "--use-system-ca" to the env block. Otherwise, export your company root certificate as a PEM file and add "NODE_EXTRA_CA_CERTS": "/path/to/company-root-certificate.pem" instead. Save the config and restart the assistant.
  • Still not connected - write to support@testomat.io and include the name of your assistant and the error text.