feat: add client support for proxy authentication

- Add MCP_PROXY_AUTH_TOKEN configuration field to store session token
- Update useConnection hook to include proxy auth token in all requests
- Add separate proxy auth headers to avoid conflicts with MCP server auth
- Add specific error handling for proxy authentication failures
- Show helpful toast message directing users to Configuration settings
- Update README with instructions for configuring token in UI

The client now properly authenticates with the proxy server using the
session token displayed in the proxy console.
This commit is contained in:
Felix Weinberger 2025-06-10 14:12:54 +01:00
commit 908d0ee36a
No known key found for this signature in database

View file

@ -28,6 +28,10 @@ export const getMCPServerRequestMaxTotalTimeout = (
return config.MCP_REQUEST_MAX_TOTAL_TIMEOUT.value as number;
};
export const getMCPProxyAuthToken = (config: InspectorConfig): string => {
return config.MCP_PROXY_AUTH_TOKEN.value as string;
};
const getSearchParam = (key: string): string | null => {
try {
const url = new URL(window.location.href);