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
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`:
You can also pass arguments along which will get passed as arguments to your MCP server:
21
+
You can pass both arguments and environment variables to your MCP server. Arguments are passed directly to your server, while environment variables can be set using the `-e` flag:
The inspector runs both an MCP Inspector (MCPI) client UI (default port 6274) and an MCP Proxy (MCPP) server (default port 6277). Open the MCPI client UI in your browser to use the inspector. (These ports are derived from the T9 dialpad mapping of MCPI and MCPP respectively, as a mnemonic). You can customize the ports if needed:
The inspector runs both a client UI (default port 5173) and an MCP proxy server (default port 3000). Open the client UI in your browser to use the inspector. You can customize the ports if needed:
43
+
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
+
45
+
### Servers File Export
46
+
47
+
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`.
48
+
49
+
-**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.
50
+
51
+
**STDIO transport example:**
52
+
53
+
```json
54
+
{
55
+
"command": "node",
56
+
"args": ["build/index.js", "--debug"],
57
+
"env": {
58
+
"API_KEY": "your-api-key",
59
+
"DEBUG": "true"
60
+
}
61
+
}
62
+
```
63
+
64
+
**SSE transport example:**
65
+
66
+
```json
67
+
{
68
+
"type": "sse",
69
+
"url": "http://localhost:3000/events",
70
+
"note": "For SSE connections, add this URL directly in Client"
71
+
}
72
+
```
73
+
74
+
-**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`.
75
+
76
+
**STDIO transport example:**
77
+
78
+
```json
79
+
{
80
+
"mcpServers": {
81
+
"default-server": {
82
+
"command": "node",
83
+
"args": ["build/index.js", "--debug"],
84
+
"env": {
85
+
"API_KEY": "your-api-key",
86
+
"DEBUG": "true"
87
+
}
88
+
}
89
+
}
90
+
}
91
+
```
92
+
93
+
**SSE transport example:**
94
+
95
+
```json
96
+
{
97
+
"mcpServers": {
98
+
"default-server": {
99
+
"type": "sse",
100
+
"url": "http://localhost:3000/events",
101
+
"note": "For SSE connections, add this URL directly in Client"
102
+
}
103
+
}
104
+
}
105
+
```
106
+
107
+
These buttons appear in the Inspector UI after you've configured your server settings, making it easy to save and reuse your configurations.
108
+
109
+
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.
110
+
111
+
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.
112
+
113
+
### Authentication
114
+
115
+
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.
116
+
117
+
### Security Considerations
118
+
119
+
The MCP Inspector includes a proxy server that can run and communicate with local MCP processes. The proxy server should not be exposed to untrusted networks as it has permissions to spawn local processes and can connect to any specified MCP server.
120
+
121
+
### Configuration
122
+
123
+
The MCP Inspector supports the following configuration settings. To change them, click on the `Configuration` button in the MCP Inspector UI:
|`MCP_SERVER_REQUEST_TIMEOUT`| Timeout for requests to the MCP server (ms) | 10000 |
128
+
|`MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS`| Reset timeout on progress notifications | true |
129
+
|`MCP_REQUEST_MAX_TOTAL_TIMEOUT`| Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications) | 60000 |
130
+
|`MCP_PROXY_FULL_ADDRESS`| Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577| "" |
131
+
|`MCP_AUTO_OPEN_ENABLED`| Enable automatic browser opening when inspector starts. Only as environment var, not configurable in browser. | true |
132
+
133
+
These settings can be adjusted in real-time through the UI and will persist across sessions.
134
+
135
+
The inspector also supports configuration files to store settings for different MCP servers. This is useful when working with multiple servers or complex configurations:
> **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.
166
+
167
+
You can also set the initial `transport` type, `serverUrl`, `serverCommand`, and `serverArgs` via query params, for example:
Note that if both the query param and the corresponding localStorage item are set, the query param will take precedence.
30
182
31
183
### From this repository
32
184
@@ -38,13 +190,71 @@ Development mode:
38
190
npm run dev
39
191
```
40
192
193
+
> **Note for Windows users:**
194
+
> On Windows, use the following command instead:
195
+
>
196
+
> ```bash
197
+
> npm run dev:windows
198
+
>```
199
+
41
200
Production mode:
42
201
43
202
```bash
44
203
npm run build
45
204
npm start
46
205
```
47
206
207
+
### CLI Mode
208
+
209
+
CLI mode enables programmatic interaction with MCP servers from the command line, ideal for scripting, automation, and integration with coding assistants. This creates an efficient feedback loop for MCP server development.
|**Server Development**| Visual interface for interactive testing and debugging during development | Scriptable commands for quick testing and continuous integration; creates feedback loops with AI coding assistants like Cursor for rapid development |
251
+
|**Resource Exploration**| Interactive browser with hierarchical navigation and JSON visualization | Programmatic listing and reading for automation and scripting |
252
+
|**Tool Testing**| Form-based parameter input with real-time response visualization | Command-line tool execution with JSON output for scripting |
253
+
|**Prompt Engineering**| Interactive sampling with streaming responses and visual comparison | Batch processing of prompts with machine-readable output |
254
+
|**Debugging**| Request history, visualized errors, and real-time notifications | Direct JSON output for log analysis and integration with other tools |
255
+
|**Automation**| N/A | Ideal for CI/CD pipelines, batch processing, and integration with coding assistants |
256
+
|**Learning MCP**| Rich visual interface helps new users understand server capabilities | Simplified commands for focused learning of specific endpoints |
257
+
48
258
## License
49
259
50
260
This project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.
0 commit comments