Avoid double negative

This commit is contained in:
KAWAKAMI Moeki
2025-04-17 18:13:58 +09:00
parent d2dc959307
commit 014acecf77
5 changed files with 15 additions and 15 deletions

View File

@@ -56,7 +56,7 @@ The MCP Inspector supports the following configuration settings. To change them,
| `MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS` | Reset timeout on progress notifications | true | | `MCP_REQUEST_TIMEOUT_RESET_ON_PROGRESS` | Reset timeout on progress notifications | true |
| `MCP_REQUEST_MAX_TOTAL_TIMEOUT` | Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications) | 60000 | | `MCP_REQUEST_MAX_TOTAL_TIMEOUT` | Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications) | 60000 |
| `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 | "" | | `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 | "" |
| `MCP_AUTO_OPEN_DISABLED` | Disable automatic browser opening when inspector starts | false | | `MCP_AUTO_OPEN_ENABLED` | Enable automatic browser opening when inspector starts | true |
The inspector also supports configuration files to store settings for different MCP servers. This is useful when working with multiple servers or complex configurations: The inspector also supports configuration files to store settings for different MCP servers. This is useful when working with multiple servers or complex configurations:

View File

@@ -100,7 +100,7 @@ async function main() {
if (serverOk) { if (serverOk) {
try { try {
if (process.env.MCP_AUTO_OPEN_DISABLED !== "true") { if (process.env.MCP_AUTO_OPEN_ENABLED !== "false") {
open(`http://127.0.0.1:${CLIENT_PORT}`); open(`http://127.0.0.1:${CLIENT_PORT}`);
} }
await spawnPromise("node", [inspectorClientPath], { await spawnPromise("node", [inspectorClientPath], {

View File

@@ -583,21 +583,21 @@ describe("Sidebar Environment Variables", () => {
openConfigSection(); openConfigSection();
const autoOpenDisabledInput = screen.getByTestId( const autoOpenDisabledInput = screen.getByTestId(
"MCP_AUTO_OPEN_DISABLED-input", "MCP_AUTO_OPEN_ENABLED-input",
); );
fireEvent.click(autoOpenDisabledInput); fireEvent.click(autoOpenDisabledInput);
const trueOption = screen.getByTestId( const falseOption = screen.getByTestId(
"MCP_AUTO_OPEN_DISABLED-input-true", "MCP_AUTO_OPEN_ENABLED-input-false",
); );
fireEvent.click(trueOption); fireEvent.click(falseOption);
expect(setConfig).toHaveBeenCalledWith( expect(setConfig).toHaveBeenCalledWith(
expect.objectContaining({ expect.objectContaining({
MCP_AUTO_OPEN_DISABLED: { MCP_AUTO_OPEN_ENABLED: {
label: "Auto Browser Open Disabled", label: "Auto Browser Open Enabled",
description: description:
"Disable automatic browser opening when inspector starts", "Enable automatic browser opening when inspector starts",
value: true, value: false,
}, },
}), }),
); );

View File

@@ -37,5 +37,5 @@ export type InspectorConfig = {
/** /**
* Disable automatic browser opening when inspector starts. * Disable automatic browser opening when inspector starts.
*/ */
MCP_AUTO_OPEN_DISABLED: ConfigItem; MCP_AUTO_OPEN_ENABLED: ConfigItem;
}; };

View File

@@ -52,9 +52,9 @@ export const DEFAULT_INSPECTOR_CONFIG: InspectorConfig = {
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577", "Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
value: "", value: "",
}, },
MCP_AUTO_OPEN_DISABLED: { MCP_AUTO_OPEN_ENABLED: {
label: "Auto Browser Open Disabled", label: "Auto Browser Open Enabled",
description: "Disable automatic browser opening when inspector starts", description: "Enable automatic browser opening when inspector starts",
value: false, value: true,
}, },
} as const; } as const;