The per-client config writers in src/client-config.ts could be useful as a library for embedding install instructions in a landing page. However, package.json currently only exports bin as a CLI to actually do the installation.
Proposed: expose a library entry point that returns "instructions for installing" rather than actually installing:
import { renderInstallInstructions } from 'install-mcp';
renderInstallInstructions({
server: { url: 'https://mcp.example.com/mcp' },
client: 'claude-desktop',
});
// -> { configJson, configFilePath, steps }
src/detect-transport.ts is already browser-compatible and src/client-config.ts has most of the logic — mainly needs the render/write split.
The per-client config writers in
src/client-config.tscould be useful as a library for embedding install instructions in a landing page. However,package.jsoncurrently only exportsbinas a CLI to actually do the installation.Proposed: expose a library entry point that returns "instructions for installing" rather than actually installing:
src/detect-transport.tsis already browser-compatible andsrc/client-config.tshas most of the logic — mainly needs the render/write split.