Changes the default ports used by the MCP Inspector client UI and the MCP Proxy server to avoid conflicts with common development ports and provide a memorable mnemonic based on T9 mapping.
20 lines
526 B
JavaScript
Executable File
20 lines
526 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
import { join, dirname } from "path";
|
|
import { fileURLToPath } from "url";
|
|
import handler from "serve-handler";
|
|
import http from "http";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const distPath = join(__dirname, "../dist");
|
|
|
|
const server = http.createServer((request, response) => {
|
|
return handler(request, response, {
|
|
public: distPath,
|
|
rewrites: [{ source: "/**", destination: "/index.html" }],
|
|
});
|
|
});
|
|
|
|
const port = process.env.PORT || 6274;
|
|
server.listen(port, () => {});
|