Files
mcp-use__mcp-use/docs/inspector/url-parameters.mdx
2026-07-28 10:23:24 -07:00

98 lines
3.1 KiB
Plaintext

---
title: "URL parameters"
description: "Open the Inspector with a selected server, tab, or embedded layout."
icon: "link"
---
{/* TODO: Add Inspector media when a screenshot or short clip would clarify the workflow. */}
Use URL parameters when you need a link that opens the Inspector on a specific server, starts a connection automatically, or restores a tab.
## Parameters
| Parameter | Purpose | Values |
| --- | --- | --- |
| `server` | Select an existing connection by server ID or URL. If no saved connection matches and the value is an HTTP(S) URL, connect to it. | Connection ID or URL string |
| `autoConnect` | Connect to a server when the Inspector loads. | URL string or URL-encoded JSON config |
| `tab` | Open a specific server tab. | `tools`, `prompts`, `resources`, `chat`, `sampling`, `elicitation`, `notifications`, `playground` |
| `tunnelUrl` | Preserve a tunnel URL while navigating. Usually set by the CLI. | URL string |
| `embedded` | Use embedded mode with reduced page chrome. | `true` |
| `embeddedConfig` | Configure embedded styling. | URL-encoded JSON config |
## Select or connect to a server
Use `server` when the Inspector should select a saved server by URL:
```text
/?server=https://mcp.example.com/mcp
```
If the server is not saved yet, the Inspector treats the HTTP(S) value like `autoConnect` and connects to it.
## Auto-connect on load
Use `autoConnect` when a link should create the connection immediately:
```text
/?autoConnect=https://mcp.example.com/mcp
```
For advanced connection options, pass a URL-encoded JSON object. The `url` field is required.
```json
{
"url": "https://mcp.example.com/mcp",
"name": "Example server",
"transportType": "http",
"connectionMode": "auto",
"connectionType": "Direct"
}
```
Supported JSON fields are `url` (required), `name`, `transportType` (`"http"` or `"sse"`), `connectionMode` (`"auto"`, `"direct"`, or `"proxy"`), `autoProxyFallback`, `connectionType` (`"Direct"` or `"Via Proxy"` for older links), `customHeaders`, `auth`, `requestTimeout`, `resetTimeoutOnProgress`, and `maxTotalTimeout`.
<Tip>
When passing a JSON object for **autoConnect**, URL-encode the value so special characters are valid in the query string.
</Tip>
## Open a tab
Use `tab` by itself to restore a view, or combine it with `server` or `autoConnect`.
```text
/?server=https://mcp.example.com/mcp&tab=tools
```
The Inspector also updates `tab` as you move between server tabs, so refreshes keep the current view.
## Embedded mode
Use `embedded=true` when the Inspector is hosted inside another UI, such as an iframe.
```text
/?embedded=true
```
Use `embeddedConfig` with a URL-encoded JSON object when the embedded host needs styling overrides.
```json
{
"backgroundColor": "#f5f5f5",
"padding": "16px"
}
```
## Example links
Open the hosted Inspector and connect to a server:
```text
https://inspector.mcp-use.com/inspect?autoConnect=https://your-server.com/mcp
```
Open the hosted Inspector, connect to a server, and show Tools:
```text
https://inspector.mcp-use.com/inspect?server=https://your-server.com/mcp&tab=tools
```