Skip to content

Commit 67f7674

Browse files
committed
Add documentation for CLI header support
- Document --header flag usage with examples - Explain header format requirements - Clarify transport support (HTTP, SSE, not STDIO) - Add authentication examples with API keys and bearer tokens
1 parent da5595f commit 67f7674

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,14 @@ npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com
389389
# Connect to a remote MCP server (with Streamable HTTP transport)
390390
npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --transport http --method tools/list
391391

392+
# Connect with custom headers for authentication
393+
npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --transport http --method tools/list --header "Authorization: Bearer your-token" --header "X-API-Key: your-api-key"
394+
392395
# Call a tool on a remote server
393396
npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --method tools/call --tool-name remotetool --tool-arg param=value
394397

395398
# List resources from a remote server
396399
npx @modelcontextprotocol/inspector --cli https://my-mcp-server.example.com --method resources/list
397-
```
398400

399401
### UI Mode vs CLI Mode: When to Use Each
400402

0 commit comments

Comments
 (0)