> For the complete documentation index, see [llms.txt](https://docs.commercelayer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.commercelayer.io/ai/mcp/inspector.md).

# MCP inspector

The [MCP inspector](https://github.com/modelcontextprotocol/inspector) is an interactive developer tool for testing and debugging MCP servers. It lets you browse available tools, inspect their schemas, and fire test calls with custom inputs — without configuring an AI client first.

It is the fastest way to verify a connection, check that a token has the right permissions, explore what a server exposes, or reproduce a failed agent call in isolation.

## Running the inspector

You can run the MCP inspector directly via `npx`, without installing it:

```bash
npx @modelcontextprotocol/inspector
```

This starts a local web interface in your browser where you can connect to any MCP server.

## Connecting to Commerce Layer MCP servers

Choose the server you want to validate, then follow the matching setup. The endpoint and auth requirements vary by server, but the flow stays the same.

{% tabs %}
{% tab title="Core MCP" %}
{% stepper %}
{% step %}

### Set the transport type and connection type

In the inspector UI, set the transport to *Streamable HTTP* and the connection type to *Via Proxy.*
{% endstep %}

{% step %}

### Enter the endpoint URL

Fill the related field with the Core MCP server URL:

```
https://core-mcp.commercelayer.io/mcp
```

{% endstep %}

{% step %}

### Add your access token

In the *Authentication* section, under *Custom Header*, add *Authorization* as the header name and enter your access token as the value:

```
Bearer {{your_access_token}}
```

{% hint style="info" %}
Replace `{{your_access_token}}` with the token you have [generated](/core/authentication.md) from your set of [API credentials](/core/api-credentials.md).
{% endhint %}

Click on the toggle to enable the header.
{% endstep %}

{% step %}

### Connect and explore

Click *Connect*. The Tools tab will list all the available tools. Select any tool to see its full input schema and run a test call with custom inputs.

<figure><img src="/files/xZYvwTskaRTny1r3c8FR" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Metrics MCP" %}
{% stepper %}
{% step %}

### Set the transport type and connection type

In the inspector UI, set the transport to *Streamable HTTP* and the connection type to *Via Proxy.*
{% endstep %}

{% step %}

### Enter the endpoint URL

Fill the related field with the Metrics MCP server URL:

```
https://metrics-mcp.commercelayer.io/mcp
```

{% endstep %}

{% step %}

### Add your access token

In the *Authentication* section, under *Custom Header*, add *Authorization* as the header name and enter your integration access token as the value:

```
Bearer {{your_access_token}}
```

{% hint style="info" %}
Replace `{{your_access_token}}` with the token you have [generated](/core/authentication.md) from your set of [integration](/core/api-credentials.md#integration) API credentials.
{% endhint %}

Click on the toggle to enable the header.
{% endstep %}

{% step %}

### Connect and explore

Click *Connect*. The Tools tab will list all the available tools. Select any tool to see its full input schema and run a test call with custom inputs.

<figure><img src="/files/xHqJrfiswqd5HLFFIcj2" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="Documentation MCP" %}
{% stepper %}
{% step %}

### Set the transport type and connection type

In the inspector UI, set the transport to *Streamable HTTP* and the connection type to *Via Proxy.*
{% endstep %}

{% step %}

### Enter the endpoint URL

Fill the related field with the Documentation MCP server URL:

```
https://docs.commercelayer.io/~gitbook/mcp
```

{% endstep %}

{% step %}

### Connect and explore

Click *Connect*. No authentication is required. The Tools tab will list all available documentation tools. Select any tool to see its full input schema and run a test call with custom inputs.

<figure><img src="/files/CymQDc013g3WSkDDbITv" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
For the full reference, see the [MCP inspector documentation](https://modelcontextprotocol.io/docs/tools/inspector).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/ai/mcp/inspector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
