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

# API Keys & MCP Integration

> Manage your TestSprite API keys in the Web Portal and view test results from MCP Server executions.

## Generating API Keys

Generate API keys for MCP Server integration and other third-party tools.

<Steps>
  <Step title="Navigate to Settings">
    Go to <kbd>Settings > API Keys</kbd> and click <kbd>New API Key</kbd>.

    <Frame>
      <img src="https://mintcdn.com/testspriteinc/3tFsKENc_ol65zBe/images/api-key.png?fit=max&auto=format&n=3tFsKENc_ol65zBe&q=85&s=dd320eb057f5a51049e597f319fab0e7" alt="API Key" width="3460" height="1790" data-path="images/api-key.png" />
    </Frame>
  </Step>

  <Step title="Configure and Save">
    Provide a **descriptive name** (e.g., "MCP Integration"), click <kbd>Create</kbd>, then use the copy icon to copy the generated API key immediately.

    <Warning>
      Store it securely. It won't be shown again
    </Warning>

    <Frame>
      <img src="https://mintcdn.com/testspriteinc/3tFsKENc_ol65zBe/images/created-api-key.png?fit=max&auto=format&n=3tFsKENc_ol65zBe&q=85&s=ecbe1b1674e82fd332fde3751e7f97ff" alt="API Key" width="3284" height="1508" data-path="images/created-api-key.png" />
    </Frame>
  </Step>
</Steps>

## Managing API Keys

<Frame>
  <img src="https://mintcdn.com/testspriteinc/3tFsKENc_ol65zBe/images/api-key-info.png?fit=max&auto=format&n=3tFsKENc_ol65zBe&q=85&s=0c1e299973a064d51a12071a475450a2" alt="API Key" width="3284" height="522" data-path="images/api-key-info.png" />
</Frame>

<Tabs>
  <Tab title="Each API Key Shows">
    Each API key displays key information fields that help you identify, track, and manage your keys effectively.

    | Field                 | Description                                        |
    | :-------------------- | :------------------------------------------------- |
    | <kbd>Name</kbd>       | Descriptive identifier                             |
    | <kbd>API Key</kbd>    | Partially hidden (e.g., `sk_test_****...****abcd`) |
    | <kbd>Created At</kbd> | When generated                                     |
  </Tab>

  <Tab title="Available Actions">
    Manage your API keys with these actions to control access, monitor usage, and maintain security.

    | Action            | Description                                                          |
    | :---------------- | :------------------------------------------------------------------- |
    | <kbd>Revoke</kbd> | Immediately disable the key — API requests using it will be rejected |
  </Tab>
</Tabs>

## Viewing MCP Test Results

When you run tests through MCP Server in your IDE, view the results in your Web Portal dashboard.

Go to <kbd>All Tests > MCP Tests</kbd> and view all tests executed through MCP Server

<Frame>
  <img src="https://mintcdn.com/testspriteinc/ReL5WaX10_vGG0UW/images/mcp-result.png?fit=max&auto=format&n=ReL5WaX10_vGG0UW&q=85&s=1006d62023acc693dd974893d2e08313" alt="API Key" width="3284" height="1484" data-path="images/mcp-result.png" />
</Frame>

Test Information Displayed:

| Field                     | Description                      |
| :------------------------ | :------------------------------- |
| <kbd>Test Name</kbd>      | Description of the executed test |
| <kbd>Execution Time</kbd> | When the test was run            |
| <kbd>Duration</kbd>       | Test execution time              |
| <kbd>Status</kbd>         | Passed, Failed, or In Progress   |
| <kbd>Test Type</kbd>      | Frontend, Backend, or Mixed      |

### Test Reports

Click on any test result to view **detailed test execution logs**, **individual test case results**, **error messages and debugging information**, and **performance metrics**.

<Frame>
  <img src="https://mintcdn.com/testspriteinc/ReL5WaX10_vGG0UW/images/report.png?fit=max&auto=format&n=ReL5WaX10_vGG0UW&q=85&s=6f41d1c8052954278de3bd5814e7a736" alt="Report" width="3460" height="1790" data-path="images/report.png" />
</Frame>

<br />

<Card title="View Example Test Report" icon="file" href="../../learn/mcp-demo#test-report-example">
  Click to see a detailed example of TestSprite test reports with execution logs and performance metrics.
</Card>

## Next Steps

<Info>Your API key is used in the MCP Server configuration to authenticate with TestSprite's testing engine.</Info>

<CardGroup cols={2}>
  <Card title="Start Your First Test" href="../../mcp/getting-started/first-test">
    Get hands-on experience with TestSprite MCP
  </Card>

  <Card title="MCP Server Documentation" href="../../mcp/getting-started/overview">
    Complete TestSprite MCP Server guide
  </Card>

  <Card title="Installation Guide" href="../../mcp/getting-started/installation">
    Step-by-step setup instructions
  </Card>

  <Card title="Workflow Examples" href="../../mcp/concepts/test-type-lifecycle">
    Learn TestSprite MCP Server workflows
  </Card>
</CardGroup>
