> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testdino.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Local MCP Server

> Bring TestDino into Claude Code, Cursor, or Claude Desktop. Query test runs and manual cases in chat.

export const HowToSchema = ({name, description, steps = []}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "HowTo",
    name,
    ...description ? {
      description
    } : {},
    step: steps.map(({name: stepName, text}, i) => ({
      "@type": "HowToStep",
      position: i + 1,
      name: stepName,
      text
    }))
  };
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

export const VideoSchema = ({name, description, thumbnailUrl, uploadDate, duration, contentUrl, embedUrl}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    name,
    description,
    thumbnailUrl,
    uploadDate,
    ...duration ? {
      duration
    } : {},
    ...contentUrl ? {
      contentUrl
    } : {},
    ...embedUrl ? {
      embedUrl
    } : {},
    publisher: {
      "@type": "Organization",
      name: "TestDino",
      logo: {
        "@type": "ImageObject",
        url: "https://docs.testdino.com/logo/light.svg"
      }
    }
  };
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<HowToSchema
  name="Set up the TestDino local MCP server"
  description="Create a Personal Access Token, install testdino-mcp, configure your MCP client, and validate the connection."
  steps={[
{ name: "Create a Personal Access Token", text: "Create a PAT in User Settings → Personal Access Tokens. Grant access to at least one project. Copy it once. Pass it as TESTDINO_PAT." },
{ name: "Install via AI prompt or manually", text: "Paste the install prompt into an assistant with terminal access, or edit the client config yourself for Claude Code, Cursor, or Claude Desktop." },
{ name: "Validate the connection", text: "Ask the assistant to run health and confirm it lists your organizations and projects." },
]}
/>

<VideoSchema name="TestDino MCP Server Overview" description="Overview of the TestDino MCP server for connecting AI assistants like Claude Code, Cursor, and Claude Desktop to Playwright test data." thumbnailUrl="https://i.ytimg.com/vi/Zoo3aAic6Tk/maxresdefault.jpg" uploadDate="2025-12-16T00:00:00+00:00" contentUrl="https://www.youtube.com/watch?v=Zoo3aAic6Tk" embedUrl="https://www.youtube.com/embed/Zoo3aAic6Tk" />

Run the TestDino MCP server as a local process over stdio. Your AI assistant starts `testdino-mcp` and authenticates with a Personal Access Token.

<Note>
  Using Claude on the web or ChatGPT? Skip the install and use [Remote MCP Server](/mcp/remote).
</Note>

<iframe className="w-full rounded-lg h-[500px]" src="https://www.youtube.com/embed/Zoo3aAic6Tk" title="Set up the TestDino local MCP server" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; embedding" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />

## Prerequisites

* Sign in to [TestDino](https://app.testdino.com)
* Node.js installed (`npx` available)
* An MCP client: Claude Code, Cursor, or Claude Desktop

## Create a Personal Access Token

The server reads the token from `TESTDINO_PAT`. Create a PAT under **User Settings → Personal Access Tokens**, grant at least one project, and copy it once. Steps and screenshots: [Generate API Keys → Personal Access Token](/guides/generate-api-keys#create-a-personal-access-token).

<img src="https://tdstorageus.blob.core.windows.net/public/docs/ai-and-automation/testdino-mcp/local/generate-token.webp" alt="Generate new token form with name and expiration fields" />

<Warning>
  The token is shown once. Store it in a password manager. Never commit it to Git. Revoke tokens you no longer use.
</Warning>

## Choose an install method

| Method                                              | Best for                                              |
| :-------------------------------------------------- | :---------------------------------------------------- |
| [Set up with an AI agent](#set-up-with-an-ai-agent) | Assistants with terminal access (Claude Code, Cursor) |
| [Manual setup](#manual-setup)                       | Editing the client config yourself, or Claude Desktop |

## Set up with an AI agent

<Prompt description="Install and validate the TestDino MCP server." actions={["copy", "cursor"]}>
  Install the TestDino MCP server (npm package "testdino-mcp") for this project.
  Run it with: npx -y testdino-mcp\@latest
  Pass my token through the TESTDINO\_PAT environment variable, not a CLI flag.
  My token is: your-token
  Then run the health tool and show me my projects.
</Prompt>

The assistant adds the server to the client config, restarts if needed, then calls `health`.

<Warning>
  The assistant writes your token into the client config. Use a scoped token and never paste it into a shared or logged session.
</Warning>

## Manual setup

<Steps>
  <Step title="Install the MCP server">
    ```bash theme={null}
    npx -y testdino-mcp@latest
    ```

    Or install globally: `npm install -g testdino-mcp`.
  </Step>

  <Step title="Configure your MCP client">
    <Tabs>
      <Tab title="Claude Code">
        ```bash theme={null}
        claude mcp add testdino --env TESTDINO_PAT=your-token -- npx -y testdino-mcp@latest
        ```

        Verify with `claude mcp list`. You should see `testdino` connected.
      </Tab>

      <Tab title="Cursor">
        1. Open **Cursor settings → Tools & MCP → Add MCP server**
        2. Edit the config (project: `.cursor/mcp.json`, or user: `~/.cursor/mcp.json`):

        ```json .cursor/mcp.json theme={null}
        {
          "mcpServers": {
            "TestDino": {
              "command": "npx",
              "args": ["-y", "testdino-mcp@latest"],
              "env": {
                "TESTDINO_PAT": "td_pat_your_token_here"
              }
            }
          }
        }
        ```

        3. Quit and reopen Cursor
        4. Confirm **TestDino** appears under **Settings → MCP**
      </Tab>

      <Tab title="Claude Desktop">
        Edit the config file:

        * macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
        * Windows: `%APPDATA%\Claude\claude_desktop_config.json`
        * Linux: `~/.config/Claude/claude_desktop_config.json`

        ```json claude_desktop_config.json theme={null}
        {
          "mcpServers": {
            "TestDino": {
              "command": "npx",
              "args": ["-y", "testdino-mcp@latest"],
              "env": {
                "TESTDINO_PAT": "td_pat_your_token_here"
              }
            }
          }
        }
        ```

        Restart Claude Desktop.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Validate the connection">
    Ask your assistant to run `health` and confirm it lists your organizations and projects. A successful response includes account, orgs, and `projectId` values. Most query tools need a `projectId`.

    If `health` fails, see [Troubleshooting](/mcp/troubleshooting).
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="Tools Reference" icon="wrench" href="/mcp/tools-reference">
    Parameters and examples for every tool
  </Card>

  <Card title="Troubleshooting" icon="screwdriver-wrench" href="/mcp/troubleshooting">
    Connection and auth errors
  </Card>

  <Card title="OpenClaw" icon="comments" href="/integrations/communication/openclaw">
    Wrap the local server as a chat bot
  </Card>

  <Card title="Remote MCP Server" icon="cloud" href="/mcp/remote">
    Hosted MCP for ChatGPT and Claude on the web
  </Card>
</CardGroup>
