C:\Users\there\OneDrive\Documents\Scripts\- LM Studio\terminal-mcp-server>lms dev
Starting the development server for local/terminal-mcp-server...
[esbuild] build finished, watching for changes...
Error: [stderr] C:\Users\there\OneDrive\Documents\Scripts\- LM Studio\terminal-mcp-server\.lmstudio\entry.ts:1
import { LMStudioClient, type PluginContext } from "@lmstudio/sdk";
^
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and 'C:\Users\there\OneDrive\Documents\Scripts\- LM Studio\terminal-mcp-server\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at <anonymous> (C:\Users\there\OneDrive\Documents\Scripts\- LM Studio\terminal-mcp-server\.lmstudio\entry.ts:1:52)
at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:655:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
Node.js v25.5.0
I'm not sure if this is even the right repo to report this in. But I can't get MCP's to work in LMStudio and I think it's because this generates .lmstudo/dev.js that uses require.
I'm not sure if this is even the right repo to report this in. But I can't get MCP's to work in LMStudio and I think it's because this generates
.lmstudo/dev.jsthat uses require.