Merge branch 'main' into add-tests

This commit is contained in:
Ola Hungerford
2025-04-01 06:57:01 -07:00
committed by GitHub
10 changed files with 94 additions and 64 deletions

View File

@@ -15,5 +15,19 @@ const server = http.createServer((request, response) => {
});
});
const port = process.env.PORT || 5173;
server.listen(port, () => {});
const port = process.env.PORT || 6274;
server.on("listening", () => {
console.log(
`🔍 MCP Inspector is up and running at http://127.0.0.1:${port} 🚀`,
);
});
server.on("error", (err) => {
if (err.message.includes(`EADDRINUSE`)) {
console.error(
`❌ MCP Inspector PORT IS IN USE at http://127.0.0.1:${port}`,
);
} else {
throw err;
}
});
server.listen(port);

View File

@@ -18,7 +18,7 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview",
"preview": "vite preview --port 6274",
"test": "jest --config jest.config.cjs",
"test:watch": "jest --config jest.config.cjs --watch"
},

View File

@@ -49,7 +49,7 @@ import { DEFAULT_INSPECTOR_CONFIG } from "./lib/constants";
import { InspectorConfig } from "./lib/configurationTypes";
const params = new URLSearchParams(window.location.search);
const PROXY_PORT = params.get("proxyPort") ?? "3000";
const PROXY_PORT = params.get("proxyPort") ?? "6277";
const PROXY_SERVER_URL = `http://${window.location.hostname}:${PROXY_PORT}`;
const CONFIG_LOCAL_STORAGE_KEY = "inspectorConfig_v1";

View File

@@ -8,6 +8,7 @@ import {
Github,
Eye,
EyeOff,
RotateCcw,
Settings,
} from "lucide-react";
import { Button } from "@/components/ui/button";
@@ -375,8 +376,17 @@ const Sidebar = ({
<div className="space-y-2">
<Button className="w-full" onClick={onConnect}>
<Play className="w-4 h-4 mr-2" />
Connect
{connectionStatus === "connected" ? (
<>
<RotateCcw className="w-4 h-4 mr-2" />
{transportType === "stdio" ? "Restart" : "Reconnect"}
</>
) : (
<>
<Play className="w-4 h-4 mr-2" />
Connect
</>
)}
</Button>
<div className="flex items-center justify-center space-x-2 mb-4">

View File

@@ -226,7 +226,11 @@ const ToolsTab = ({
</div>
) : (
<Input
type={prop.type === "number" ? "number" : "text"}
type={
prop.type === "number" || prop.type === "integer"
? "number"
: "text"
}
id={key}
name={key}
placeholder={prop.description}
@@ -235,7 +239,8 @@ const ToolsTab = ({
setParams({
...params,
[key]:
prop.type === "number"
prop.type === "number" ||
prop.type === "integer"
? Number(e.target.value)
: e.target.value,
})