The project is TypeScript compiled withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/XxYouDeaDPunKxX/chatgpt-local-agent-mcp/llms.txt
Use this file to discover all available pages before exploring further.
tsc. The development workflow uses tsx for watch mode so you get hot-reloading without a separate compile step. The runtime target is Node.js running the compiled output from dist/index.js; the source lives in src/index.ts and the supporting modules under src/.
Prerequisites
- Windows (the server uses Windows-specific APIs for process inspection, desktop automation, and PowerShell tooling)
- Node.js and npm — required for both development and the installer’s build step
- PowerShell or Windows PowerShell — required for the installer and control scripts
- Git — recommended; the server exposes Git tools that expect a working Git installation
Use
npm ci rather than npm install for reproducible builds. The installer’s Install Dependencies + Build step runs npm ci explicitly. Using npm install in a development or CI context can silently update package-lock.json and produce builds that differ from what was tested.npm Scripts
All scripts are defined inpackage.json and run from the install folder (or the source root during local development).
npm run dev — Hot-reloading development server
Starts the server in watch mode using tsx. Any change to a TypeScript source file restarts the server automatically.
npm run build — Compile TypeScript to dist/
Compiles all TypeScript sources using the project’s tsconfig.json and writes output to dist/.
dist/index.js. This is what npm start and the control scripts run in production.
npm start — Run the built server
Starts the compiled server from dist/index.js using Node.js.
npm run type-check — Type-check without emitting
Runs the TypeScript compiler in check-only mode. No output files are written.
npm run build and leaves the dist/ folder untouched.
npm test — Run tests
Runs the test suite using tsx with Node’s built-in test runner.
tests/ directory. The tsx runner handles TypeScript without a separate compile step, so tests run against the source directly.
npm run audit:publish-safe — Check for files that should not be shared
Runs scripts/pack-safe.mjs to check the source folder for files and directories that should not appear in a shareable archive.
Development Mode and AUTH_REQUIRED
AUTH_REQUIRED=false is allowed only when NODE_ENV is unset or set to development and the server is bound to 127.0.0.1 with no tunnel enabled. This combination is intended for the Path A local smoke test — confirming the server starts, the dashboard opens, and the health endpoint responds — before OAuth is configured.
Safe local-only development values:
AUTH_REQUIRED must be true regardless of NODE_ENV.
What the Installer Does During “Install Dependencies + Build”
The installer’s Install Dependencies + Build step runs these two commands in sequence inside the runtime install folder:node_modules/ already exists, npm ci will still verify the lockfile and reinstall cleanly. If dist/ exists, it will be overwritten.
Install Folder vs Source Folder
The extracted source folder (where you unzipped or cloned the project) is not the runtime folder. The installer copies the public app files into the runtime install folder and builds there.| Location | Purpose |
|---|---|
| Source folder (extracted zip or repo clone) | Read-only source package. Run the installer from here. |
%LOCALAPPDATA%\chatgpt-local-agent-mcp | Runtime install folder. Contains .env, node_modules/, dist/, data/, logs, screenshots, backups, and the journal. |
.env, logs, data/, dependencies, build output, browser artifacts, journals, backups, and screenshots all belong in the install folder — never in the extracted source folder.
If you need to override the runtime root, set CHATGPT_LOCAL_AGENT_MCP_RUNTIME_ROOT in your environment before launching the fallback dashboard or control scripts.
Publish-safe Check
Before sharing the source folder — as a zip, archive, pull request, or any other form — run the publish-safe audit:scripts/pack-safe.mjs) checks that the source folder does not contain any of the following:
.env— private configuration and secretsdata/— journals, backups, screenshotsnode_modules/— installed dependenciesdist/— compiled build output*.log— server logs- Runtime screenshots
- Browser artifacts (Playwright browser cache, CDP profiles)
- Journals (
*.jsonl) - Backups
.gitignore excludes the main runtime directories and log files, but the publish-safe audit is the final check. The ignore file alone is not sufficient — run the audit before publishing.
If you encounter build errors, see Troubleshooting for common fixes including missing Playwright binaries,
npm ci failures, and TypeScript version issues.