### Build the MCP server Source: https://github.com/1977-code/freeloader/blob/main/docs/install.md Installs dependencies and compiles the MCP server from src/ to build/index.js. ```bash cd mcp-server npm install npm run build # compiles src/ -> build/index.js ``` -------------------------------- ### macOS launchd: Install freellmapi LaunchAgent Source: https://github.com/1977-code/freeloader/blob/main/docs/autostart.md Fills in three template values (node path, freellmapi checkout path, user id) and installs the LaunchAgent plist, then boots and enables it. Requires the template at examples/launchd/freellmapi.plist.template. ```bash NODE=$(command -v node) # absolute node path FREELLMAPI=/absolute/path/to/freellmapi # your freellmapi checkout UID_NUM=$(id -u) sed -e "s#__NODE__#$NODE#g" \ -e "s#__FREELLMAPI__#$FREELLMAPI#g" \ examples/launchd/freellmapi.plist.template \ > ~/Library/LaunchAgents/com.freeloader.freellmapi.plist launchctl bootstrap gui/$UID_NUM ~/Library/LaunchAgents/com.freeloader.freellmapi.plist launchctl enable gui/$UID_NUM/com.freeloader.freellmapi ``` -------------------------------- ### Build the MCP server Source: https://github.com/1977-code/freeloader/blob/main/README.md Installs dependencies and builds the server from the mcp-server directory. Requires Node.js 18+ and a running freellmapi backend. ```bash cd mcp-server && npm install && npm run build ``` -------------------------------- ### Install the freeloader skill Source: https://github.com/1977-code/freeloader/blob/main/docs/install.md Copies the skill directory to Claude Code's skills folder so it is discovered. ```bash cp -r skill/freeloader ~/.claude/skills/freeloader ``` -------------------------------- ### Install auto-improve script and prompt Source: https://github.com/1977-code/freeloader/blob/main/docs/auto-improve.md Copy the auto-improve script and prompt into the freeloader directory, then make the script executable. Edit the paths at the top of auto-improve.sh before scheduling. ```bash cp examples/auto-improve/auto-improve.sh /absolute/path/to/freeloader/ cp examples/auto-improve/auto-improve-prompt.md /absolute/path/to/freeloader/ chmod +x /absolute/path/to/freeloader/auto-improve.sh ``` -------------------------------- ### Install the freeloader skill Source: https://github.com/1977-code/freeloader/blob/main/README.md Copies the skill directory into Claude's user skills folder so Claude can use the delegate_task and list_models tools. ```bash cp -r ../skill/freeloader ~/.claude/skills/freeloader ``` -------------------------------- ### Test server with MCP inspector Source: https://github.com/1977-code/freeloader/blob/main/docs/install.md Runs the MCP inspector against the built server with the freellmapi API key set as an environment variable. ```bash FREELLMAPI_API_KEY=freellmapi-YOUR-TOKEN \ npx @modelcontextprotocol/inspector node /absolute/path/to/mcp-server/build/index.js ``` -------------------------------- ### Check MCP connection Source: https://github.com/1977-code/freeloader/blob/main/docs/install.md Lists registered MCP servers; freeloader should show 'Connected'. ```bash claude mcp list # freeloader should show "Connected" ``` -------------------------------- ### Confirm freellmapi is running Source: https://github.com/1977-code/freeloader/blob/main/docs/install.md Checks that the freellmapi server responds on the default port 3001. ```bash curl -s http://localhost:3001/v1/models | head ``` -------------------------------- ### Linux systemd: Enable and start freellmapi user service Source: https://github.com/1977-code/freeloader/blob/main/docs/autostart.md Reloads the systemd user daemon and enables/starts the freellmapi service. Run after creating the unit file above. ```bash systemctl --user daemon-reload systemctl --user enable --now freellmapi ``` -------------------------------- ### Read unified API key from freellmapi settings Source: https://github.com/1977-code/freeloader/blob/main/docs/install.md Retrieves the unified API key from freellmapi's SQLite settings table. Requires the freellmapi server to be set up first. ```bash sqlite3 path/to/freellmapi/server/data/freeapi.db \ "SELECT value FROM settings WHERE key='unified_api_key'" ``` -------------------------------- ### Add delegation rule to CLAUDE.md Source: https://github.com/1977-code/freeloader/blob/main/docs/install.md Adds an always-in-context rule to ~/.claude/CLAUDE.md that instructs Claude to prefer the freeloader delegate_task tool for bulk or low-stakes subtasks. This is recommended because a skill alone may not reliably trigger. ```markdown ## Delegating cheap subtasks When the `freeloader` MCP is available, prefer its `delegate_task` tool for bulk or low-stakes subtasks — summarizing, classifying, extracting, translating, drafting boilerplate, code stubs — instead of spending my own budget. Trigger on volume and repetition: a list, a file of records, "each/every", counts like 30/500, "in bulk", or the same transform repeated per item — even if the user never says "delegate". Delegate each item, keep the loop and final assembly for myself. If delegate_task errors, do the task myself; delegation is an optimization, not a dependency. Don't delegate work needing conversation context, high accuracy, or real reasoning. ``` -------------------------------- ### macOS launchd: Verify freellmapi is running and bound to loopback Source: https://github.com/1977-code/freeloader/blob/main/docs/autostart.md Checks the ping endpoint and confirms the listener is on 127.0.0.1, not 0.0.0.0. The lsof output should show 127.0.0.1, not *. ```bash curl -s http://localhost:3001/api/ping lsof -nP -iTCP -sTCP:LISTEN | grep 3001 # expect 127.0.0.1, not * ``` -------------------------------- ### Trigger dry run and view log Source: https://github.com/1977-code/freeloader/blob/main/docs/auto-improve.md Run the auto-improve script manually and display the log to see what it did. ```bash bash /absolute/path/to/freeloader/auto-improve.sh cat /absolute/path/to/freeloader/logs/auto-improve.log ``` -------------------------------- ### macOS launchd: Restart or stop freellmapi Source: https://github.com/1977-code/freeloader/blob/main/docs/autostart.md Use kickstart -k to restart the service and bootout to stop and unload it. Both commands target the user's GUI domain. ```bash launchctl kickstart -k gui/$(id -u)/com.freeloader.freellmapi # restart launchctl bootout gui/$(id -u)/com.freeloader.freellmapi # stop + unload ``` -------------------------------- ### Commit command for changed repositories Source: https://github.com/1977-code/freeloader/blob/main/examples/auto-improve/auto-improve-prompt.md Used in step 5 to commit changes in each modified repository. Replace