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

# MCP Inspector

> A lightweight web app that connects to MCP servers to browse prompts, tools, resources, history, and notifications for testing and debugging.

The MCP Inspector is a lightweight web application that connects to an MCP (Model Context Protocol) server and provides a visual interface to explore prompts, tools, resources, history, and notifications — so you can test and debug an MCP server without building a client first.

Useful when you need to:

* Browse available prompts and inspect prompt definitions.
* Explore tools and resources registered on the MCP server.
* Review server history, notifications, and execution traces.

Relevant links:

* MCP course: [https://learn.kodekloud.com/user/courses/mcp-for-beginners](https://learn.kodekloud.com/user/courses/mcp-for-beginners)
* Model Context Protocol (MCP) reference: [https://learn.kodekloud.com/user/courses/mcp-for-beginners](https://learn.kodekloud.com/user/courses/mcp-for-beginners)

## Install & run

The inspector is published as an npm package and can be launched directly via `npx`. Depending on the package namespace, use one of these commands:

```bash theme={null}
# If published as an unscoped package:
npx modelcontextprotocol/inspector

# Or, if the package is scoped:
npx @modelcontextprotocol/inspector
```

When started, the inspector launches a local web server and prints the URL to open in your browser. Example output:

```bash theme={null}
$ npx modelcontextprotocol/inspector
MCP Inspector v0.16.1
Starting web server...
HTTP server listening on http://localhost:8080/mcp/
Open the URL above in your browser.
```

## Connect the Inspector to an MCP server

1. Open the URL reported by the inspector in your browser (for example `http://localhost:8080/mcp/`).
2. In the Inspector UI, use the Connect control in the left column to enter the MCP server base URL (for example `http://localhost:8080/mcp/`) and click Connect.
3. Once connected, the UI displays Prompts, Tools, Resources, History, and Notifications. You can click individual entries to view details and run or inspect calls.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/nYh5ESbtPa0_kgi9/images/Crash-Course-MCP-For-Beginners/Model-Context-Protocol-MCP/MCP-Inspector/mcp-inspector-dashboard-prompts-connected.jpg?fit=max&auto=format&n=nYh5ESbtPa0_kgi9&q=85&s=b750314d0d9f11c4321236bc39bdefd9" alt="A dark-themed dashboard titled &#x22;MCP Inspector v0.16.1&#x22; showing connection settings on the left and a central Prompts panel with entries like &#x22;find_best_flight&#x22; and &#x22;handle_disruption,&#x22; plus history and server notifications. The left column shows a streamable HTTP URL (http://localhost:8080/mcp/) and a green &#x22;Connected&#x22; indicator." width="1920" height="1080" data-path="images/Crash-Course-MCP-For-Beginners/Model-Context-Protocol-MCP/MCP-Inspector/mcp-inspector-dashboard-prompts-connected.jpg" />
</Frame>

## Quick reference

| Action | Description | Example |
| - | - | - |
| Start inspector | Launches the local inspector web server | `npx modelcontextprotocol/inspector` |
| Inspector URL | Open this in your browser to access the UI | `http://localhost:8080/mcp/` |
| Connect to server | Enter your MCP server base URL in the Connect control | `http://localhost:8080/mcp/` |
| Inspect items | Browse Prompts, Tools, Resources, History, Notifications | Click any list item in the UI |

## Troubleshooting & tips

<Callout icon="lightbulb" color="#1CB2FE">
  Ensure [Node.js](https://nodejs.org/) and [npx](https://www.npmjs.com/package/npx) are installed locally before running the inspector. If the inspector runs on a remote host, use that host's reachable URL and open any required ports/firewall rules so your browser can access the web UI.
</Callout>

* If the Inspector prints an address like `http://localhost:8080/mcp/` but you are connecting from a different machine, replace `localhost` with the host IP or hostname reachable from your browser (or run the inspector on the workstation directly).
* If the browser shows CORS or network errors, verify the MCP server URL is correct and that any proxies, firewalls, or VPNs allow access.
* For automated testing or CI, you can run the inspector on a headless host and access it via a tunneled port or reverse proxy.

## Further reading

* [MCP course — Learn KodeKloud](https://learn.kodekloud.com/user/courses/mcp-for-beginners)
* Node.js: [https://nodejs.org/](https://nodejs.org/)
* npx package runner: [https://www.npmjs.com/package/npx](https://www.npmjs.com/package/npx)

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/crash-course-mcp-for-beginners/module/f1e44479-23c8-46ec-b1b9-d9e90146921b/lesson/c99ba079-39f3-4275-9ce0-557130444a0d" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.