You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MCP Inspector consists of two main components that work together:
10
+
11
+
-**MCP Inspector Client (MCPI)**: A React-based web UI that provides an interactive interface for testing and debugging MCP servers
12
+
-**MCP Proxy (MCPP)**: A Node.js server that acts as a protocol bridge, connecting the web UI to MCP servers via various transport methods (stdio, SSE, streamable-http)
13
+
14
+
Note that the proxy is not a network proxy for intercepting traffic. Instead, it functions as both an MCP client (connecting to your MCP server) and an HTTP server (serving the web UI), enabling browser-based interaction with MCP servers that use different transport protocols.
15
+
7
16
## Running the Inspector
8
17
9
18
### Requirements
10
19
11
20
- Node.js: ^22.7.5
12
21
22
+
### Quick Start (UI mode)
23
+
24
+
To get up and running right away with the UI, just execute the following:
25
+
26
+
```bash
27
+
npx @modelcontextprotocol/inspector
28
+
```
29
+
30
+
The server will start up and the UI will be accessible at `http://localhost:6274`.
31
+
13
32
### From an MCP server repository
14
33
15
34
To inspect an MCP server implementation, there's no need to clone this repo. Instead, use `npx`. For example, if your server is built at `build/index.js`:
For more details on ways to use the inspector, see the [Inspector section of the MCP docs site](https://modelcontextprotocol.io/docs/tools/inspector). For help with debugging, see the [Debugging guide](https://modelcontextprotocol.io/docs/tools/debugging).
44
63
64
+
### Servers File Export
65
+
66
+
The MCP Inspector provides convenient buttons to export server launch configurations for use in clients such as Cursor, Claude Code, or the Inspector's CLI. The file is usually called `mcp.json`.
67
+
68
+
-**Server Entry** - Copies a single server configuration entry to your clipboard. This can be added to your `mcp.json` file inside the `mcpServers` object with your preferred server name.
69
+
70
+
**STDIO transport example:**
71
+
72
+
```json
73
+
{
74
+
"command": "node",
75
+
"args": ["build/index.js", "--debug"],
76
+
"env": {
77
+
"API_KEY": "your-api-key",
78
+
"DEBUG": "true"
79
+
}
80
+
}
81
+
```
82
+
83
+
**SSE transport example:**
84
+
85
+
```json
86
+
{
87
+
"type": "sse",
88
+
"url": "http://localhost:3000/events",
89
+
"note": "For SSE connections, add this URL directly in Client"
90
+
}
91
+
```
92
+
93
+
-**Servers File** - Copies a complete MCP configuration file structure to your clipboard, with your current server configuration added as `default-server`. This can be saved directly as `mcp.json`.
94
+
95
+
**STDIO transport example:**
96
+
97
+
```json
98
+
{
99
+
"mcpServers": {
100
+
"default-server": {
101
+
"command": "node",
102
+
"args": ["build/index.js", "--debug"],
103
+
"env": {
104
+
"API_KEY": "your-api-key",
105
+
"DEBUG": "true"
106
+
}
107
+
}
108
+
}
109
+
}
110
+
```
111
+
112
+
**SSE transport example:**
113
+
114
+
```json
115
+
{
116
+
"mcpServers": {
117
+
"default-server": {
118
+
"type": "sse",
119
+
"url": "http://localhost:3000/events",
120
+
"note": "For SSE connections, add this URL directly in Client"
121
+
}
122
+
}
123
+
}
124
+
```
125
+
126
+
These buttons appear in the Inspector UI after you've configured your server settings, making it easy to save and reuse your configurations.
127
+
128
+
For SSE transport connections, the Inspector provides similar functionality for both buttons. The "Server Entry" button copies the SSE URL configuration that can be added to your existing configuration file, while the "Servers File" button creates a complete configuration file containing the SSE URL for direct use in clients.
129
+
130
+
You can paste the Server Entry into your existing `mcp.json` file under your chosen server name, or use the complete Servers File payload to create a new configuration file.
131
+
45
132
### Authentication
46
133
47
134
The inspector supports bearer token authentication for SSE connections. Enter your token in the UI when connecting to an MCP server, and it will be sent in the Authorization header. You can override the header name using the input field in the sidebar.
@@ -94,6 +181,8 @@ Example server configuration file:
94
181
}
95
182
```
96
183
184
+
> **Tip:** You can easily generate this configuration format using the **Server Entry** and **Servers File** buttons in the Inspector UI, as described in the Servers File Export section above.
185
+
97
186
You can also set the initial `transport` type, `serverUrl`, `serverCommand`, and `serverArgs` via query params, for example:
0 commit comments