Control Nocturnal from an agent
Everything the dashboard can do, a model can do. There is no second-class path: the Nocturnal UI, the phone app, the noc CLI, the MCP server and a plain HTTP request all send the same thing — a command to the engine on your machine.
That means you can hand this page to ChatGPT, Claude, or anything else that can call a tool or make a web request, and it can run your workspace: start an agent on a project, reply to it, set up a loop, run a script, restart a server, commit and push, open an issue, cut a release.
There are three ways in. Pick by where the model lives.
| The model is… | Use | Setup |
|---|---|---|
| A coding agent or assistant (Claude, ChatGPT, Claude Code, Codex, Cursor) | MCP | Add https://nocturnal.sh/mcp and sign in — see MCP |
| A shell, a script, a cron job, or CI | CLI | noc is installed with the app |
| A hosted assistant that can call HTTP (a custom GPT, a webhook) | HTTP | Give it http://127.0.0.1:17410/api-docs/openapi.json |
MCP
Every command is an MCP tool, named with an underscore instead of the dot: agent.new is the tool agent_new, proc.restart is proc_restart. Each one carries its own parameters and description, so a model picks the right tool without being told about Nocturnal first.
Add https://nocturnal.sh/mcp to your client and sign in with your Nocturnal account (MCP). It reaches every computer on your account; pass device to say which.
CLI
noc has short verbs for the things people type daily, and a generic one for everything else.
noc commands # every command, grouped, with its parameters
noc commands agent # just the ones matching "agent"
noc commands --markdown # the full reference, as markdown to paste into a prompt
noc cmd agent.new projectId=my-app prompt="fix the header spacing"
noc cmd proc.restart id=my-app-web
noc cmd settings.set key=agentDefaultModel value=claude-opus-5
noc cmd <command> key=value … reaches every command, including ones added after this page was written. Values are converted using the command's own types — times=3 is a number, weekdays=yes is a boolean, labels=bug,ui is a list — and a missing required parameter is caught before anything is sent.
Read state with noc topics:
noc topics # everything the dashboard renders
noc topics projects
noc topics agentsIndex
Full verb list: CLI.
HTTP
The engine listens on 127.0.0.1:17410. Two endpoints do everything:
GET /api/topics # all state — projects, sessions, processes, git, CI, issues
POST /cmd/<command> # run a command, payload as the JSON body
curl -s http://127.0.0.1:17410/api/topics/projects
curl -s http://127.0.0.1:17410/cmd/agent.new \
-H 'Content-Type: application/json' \
-d '{"projectId":"my-app","prompt":"fix the header spacing"}'
Every command replies with the same envelope: { "ok": true, "data": … } or { "ok": false, "error": "…" }.
GET /api/commands returns the whole catalog as JSON — type, group, summary, parameters, and whether the command is read-only. A model that starts there needs no other documentation.
Give it to a custom GPT
The engine publishes its own OpenAPI document at /api-docs/openapi.json, with one operation per command. Import that into a GPT Action, an SDK generator, or Swagger UI at /api-docs.
Assistant builders cap how many operations they will import, so you can ask for a slice:
http://127.0.0.1:17410/api-docs/openapi.json?group=Agents,Projects,Processes
Groups are Agents, Plans, Projects, Processes, Scripts, Ports, Git, GitHub, Issues, Versions, Settings, System.
Reaching it from outside this machine
127.0.0.1 is deliberate: the engine binds to loopback and has no password, because anything that can reach it can run commands on your computer. A hosted assistant is not on your machine, so it cannot call that URL directly. To drive Nocturnal from somewhere else, sign in and use the dashboard, the phone app, or the MCP server, which all relay commands through your account. If you want a hosted model to reach the engine, put it behind a tunnel you authenticate — do not expose port 17410 to a network.
What to tell the model
Three sentences are usually enough:
Nocturnal runs my projects. Read state fromGET /api/topicsand change things withPOST /cmd/<command>onhttp://127.0.0.1:17410. CallGET /api/commandsfirst to see what exists.
Two habits worth adding: commands marked read-only in the catalog are safe to call while exploring, and Nocturnal never commits or branches on its own — if you want a commit, the model has to ask for git.commit.
Every command
Commands marked read-only change nothing. * marks a required parameter.
Agents
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
agent.new | agent_new | Launch a new agent session on a project. Queues behind a running agent unless runNow is true. | projectId, prompt, cwd, planId, runMode, planScope, model, personalityId, runNow, ideaIds, brainPin, traceId, parentEventId |
agent.continue | agent_continue | Continue an existing agent session with a follow-up prompt. Queues behind a running agent unless runNow is true. | sessionId, prompt, runMode, planScope, model, personalityId, runNow, reply, handoff, traceId, parentEventId |
agent.loop | agent_loop | Send a prompt after each finish or on a schedule (every + unit). at / atHour / atMinute align to the clock (hourly :15, daily 09:00) and wait for the next slot. forever:true is schedule-only. stop:true cancels remaining repeats without killing the live run. sendNow:true sends a scheduled message now. Arming a clock-aligned schedule on a session replaces its current one (edit or re-time it; keepAttachments keeps its files). | sessionId, projectId, planId, prompt, times, mode, every, unit, weekdays, at, atHour, atMinute, forever, cwd, runMode, model, personalityId, stop, sendNow, keepAttachments |
agent.compact | agent_compact | Compact an agent session context window via /compact. Queues behind a running agent unless the session is idle. | sessionId* |
agent.stop | agent_stop | Stop a running agent session. | sessionId* |
agent.runNow | agent_runNow | Start a queued agent immediately, even if another agent is already running on the project. | sessionId* |
agent.queuePause | agent_queuePause | Hold or resume a project queue without discarding the work waiting in it. | projectId*, paused |
agent.queueReorder | agent_queueReorder | Set the running order of everything waiting in one project queue. | projectId, itemIds |
agent.queueMove | agent_queueMove | Move one queued item up or down within its chat, or move its whole chat. | itemId, delta, projectId |
agent.archive | agent_archive | Archive or unarchive an agent session so it leaves the default sidebar list. | sessionId*, archived |
agent.archiveFrom | agent_archiveFrom | Archive an agent session plus every older one in the same project (pinned, running, and queued rows are kept). | sessionId* |
agent.fork | agent_fork | Copy a chat into a new session with the same transcript, model, and personality. With a prompt, the new chat answers it at once (usually on another model) with the whole earlier conversation attached as a file; the original chat is left as it was. | sessionId*, prompt, model, runMode, personalityId |
agent.pin | agent_pin | Pin or unpin an agent session (up to 15 pinned per project). A new pin goes to the top. | sessionId*, pinned |
agent.pinReorder | agent_pinReorder | Set a custom order for pinned agent sessions in one project. | sessionIds* |
agent.appearance | agent_appearance | Set or clear a custom icon and colour for an agent tab. | sessionId*, icon, color |
agent.rename | agent_rename | Set or clear the display name of an agent session. | sessionId*, title |
agent.pending | agent_pending | Edit or cancel a follow-up waiting in a session inbox. | sessionId, at, prompt, remove |
agent.seen | agent_seen | Mark an agent session as read so it loses the unread dot, or with unread: true mark it unread again. | sessionId*, at, unread |
agent.dismissWaiting | agent_dismissWaiting | Clear the "waiting for you" flag on a session without answering the question, so it stops showing as blocked. | sessionId* |
agent.setCloud | agent_setCloud | Keep a session on this Mac (cloud:false) or mirror it so a phone or collaborator can continue it. | sessionId, cloud |
agent.preview | agent_preview | Deploy this chat's branch to a temporary preview URL using the project's preview channel. Never touches production; the link lands in the chat. | sessionId* |
agent.resumeCommand | agent_resumeCommand | The terminal command that continues this chat in its own CLI. Picks the CLI that answered last (claude --resume or codex resume), since a chat can move between Claude and Codex. | sessionId* |
agent.history | agent_history | What has been worked on, across every project or one: each chat newest first with what was asked, the latest ask, where it got to, its status and how much it changed, plus a per-project roll-up. Over MCP it still answers while the computer is asleep, from its last sync. | projectId, range, since, until, query, includeArchived, limit, before |
job.create | job_create | Schedule a recurring agent job on a project, separately from any plan. | projectId, name, prompt, every, unit*, mode, branch, atHour, atMinute, weekdays, timezone, model, effort, maxRuntimeMinutes, maxRuns, maxSpendUsd, traceId, parentEventId |
job.update | job_update | Change a scheduled job, or turn it off without deleting it. | jobId*, name, prompt, mode, branch, enabled, every, unit, atHour, atMinute, weekdays, maxRuns, maxSpendUsd |
job.remove | job_remove | Delete a scheduled job and stop it running again. | jobId* |
job.runNow | job_runNow | Start a scheduled job immediately without waiting for its next time. | jobId* |
job.list | job_list | Read the scheduled jobs, their recent runs, and what each one costs. | projectId |
persona.generate | persona_generate | Start a brief ask-mode session that drafts a persona name and instructions from a role description. Returns the sessionId; the draft appears in the transcript when the session finishes. | projectId, role, model |
template.summarise | template_summarise | Ask a chat to distil itself into a draft agent template for review. | sessionId*, name |
template.save | template_save | Save a reviewed draft as a reusable agent template, or update one. | name*, instructions, objective, decisions, context, id, model, personalityId, force |
template.remove | template_remove | Delete a saved agent template. The original conversation is untouched. | id* |
template.start | template_start | Start a fresh agent from a saved template with a new request. | id, projectId, prompt*, cwd, runNow |
Plans
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
plan.create | plan_create | Add a plan to the project roadmap. By default an agent is started to write the plan body; pass start:false to store the text as-is. Nothing is built yet: building is a separate step, plan_build, where you choose one agent for every stage or a new agent per stage. | projectId*, prompt, title, issue, start, parentPlanId, projectPath, traceId, parentEventId |
plan.start | plan_start | Start (or restart) the planning agent that writes a plan body. | planId*, projectId, projectPath, traceId, parentEventId |
plan.build | plan_build | Hand a ready plan to agents to execute. This is the "run the plan" action. Choose how it is built, because it changes how long it takes: (1) one agent, one chat, every stage in turn (sessionMode "continue", the default): each stage is its own request but what stage 2 learned carries into stage 3; (2) one agent per stage (sessionMode "fresh"): each stage starts a new agent with a clean context, its own model and effort, reading the plan and what earlier stages did; (3) the whole plan in one run (stages:false): one agent, one prompt, no stage checkpoints. Stages run one after another either way and the next starts only when the last reports done; a blocked stage parks the rest. Stage-by-stage needs stages: read them with planbrief, or detect them with planstagesInfer { apply: true }. | planId*, projectId, runMode, model, effort, personalityId, runNow, stages, fromStageId, sessionMode, traceId, parentEventId |
plan.update | plan_update | Edit a plan title, body, status, narrative summary, or structured overview. | planId*, title, body, status, narrativeSummary, overview, overviewAuthor, projectId |
plan.refreshOverview | plan_refreshOverview | Re-extract the structured overview from the plan body without launching an agent. | planId*, projectId |
plan.revise | plan_revise | Update plan content with revision tracking and conflict detection. Planning agents use this to publish drafts without writing implementation files. | planId, body, baseRev, sessionId, title, summary |
plan.archive | plan_archive | Archive or restore a plan. | planId*, archived, projectId |
plan.move | plan_move | Move a plan up or down the roadmap by one position. | planId, delta, projectId |
plan.reorder | plan_reorder | Set the full roadmap order for a project. | planIds*, projectId |
plan.remove | plan_remove | Delete a plan from the roadmap. | planId*, projectId |
plan.ensureFile | plan_ensureFile | Write the plan body to a markdown file in the project so an agent can read it from disk. | planId*, projectId |
plan.stagesInfer | plan_stagesInfer | Detect the executable stages in a plan, previewing the change before writing it. | planId*, apply |
plan.stageAdd | plan_stageAdd | Add a stage to a plan, or split an existing one by hand. | planId, title, afterStageId, prompt, criteria |
plan.stageUpdate | plan_stageUpdate | Change one stage: its title, instructions, checks, agent, or whether it runs. | planId, stageId, title, prompt, criteria, model, effort, personalityId, runMode, include, completionNote |
plan.stageRemove | plan_stageRemove | Delete a stage from a plan, along with its place in the running order. | planId, stageId |
plan.stageMove | plan_stageMove | Move one stage earlier or later in a plan running order. | planId, stageId, delta* |
plan.stageStatus | plan_stageStatus | Mark a stage done, blocked, or skipped by hand, and optionally carry on. | planId, stageId, status*, advance, note |
plan.stageComplete | plan_stageComplete | Submit a validated structured result for a stage run, replacing marker inference. | runId, planId, stageId, sessionId, planRev, outcome, evidence, reason, checkResults |
plan.stageRetry | plan_stageRetry | Re-dispatch a blocked, failed, or stopped stage as a fresh run. | planId, stageId, runNow |
plan.stageBulkUpdate | plan_stageBulkUpdate | Apply the same change to several stages at once. | planId, stageIds, model, effort, personalityId, include |
plan.runs | plan_runs | List stage execution runs for a plan. | planId* |
plan.ideaAdd | plan_ideaAdd | Capture an idea for a project without committing to build it. | projectId, title, notes, status, source, accepted, sources, nodeId, kind, triage |
plan.ideaUpdate | plan_ideaUpdate | Change an idea title, notes, status, or whether it has been accepted. | projectId, ideaId, title, notes, status, accepted, nodeId, kind, dismissReason, addSource, promotedTo |
plan.ideaRemove | plan_ideaRemove | Delete an idea from a project planning list entirely. | projectId, ideaId |
plan.ideaPromote | plan_ideaPromote | Turn an idea into a roadmap item, keeping the original idea as its source. | projectId, ideaId, title, outcome, horizon |
plan.roadmapAdd | plan_roadmapAdd | Add a desired outcome to a project roadmap with a rough time horizon. | projectId, title, outcome, horizon, targetDate, dateIsCommitment, source |
plan.roadmapUpdate | plan_roadmapUpdate | Change a roadmap item outcome, horizon, date, or completion. | projectId, itemId, title, outcome, horizon, targetDate, dateIsCommitment, done, planIds |
plan.roadmapRemove | plan_roadmapRemove | Delete a roadmap item from a project planning list. | projectId, itemId |
plan.roadmapMove | plan_roadmapMove | Move a roadmap item up or down the project priority order. | projectId, itemId, delta* |
plan.challengeAdd | plan_challengeAdd | Record an unresolved question or constraint that needs investigation. | projectId, question, status, affects, candidateApproaches, dependencies, planId, stageId, source |
plan.challengeUpdate | plan_challengeUpdate | Change a challenge, or resolve it by recording the decision that was made. | projectId, challengeId, question, status, decision, dependencies, affects, candidateApproaches |
plan.challengeRemove | plan_challengeRemove | Delete a recorded challenge from a project planning list. | projectId, challengeId |
plan.queueRefine | plan_queueRefine | Queue a planning pass against a plan. The pass runs in plan mode with the latest plan body. Multiple passes with different personas refine the same plan in order. | planId, action, model, effort, personalityId, instructions, projectId |
plan.refineUpdate | plan_refineUpdate | Edit the model, effort, persona, or action on a pending refine queue entry. | planId, entryId, action, model, effort, personalityId |
plan.refineRun | plan_refineRun | Resume the next pending refinement pass for a plan. | planId* |
plan.refineRemove | plan_refineRemove | Remove a pending refine queue entry from a plan. | planId, entryId |
plan.refineReorder | plan_refineReorder | Set the order of the refine queue entries for a plan. | planId, entryIds |
plan.refresh | plan_refresh | Re-read every project planning file and republish the planning topic. | — |
plan.focus | plan_focus | Point the dashboard's Preview pane at something — a plan, the Inbox, the roadmap, the open questions, a pending proposal, the product map or one node on it. Showing a plan's execution view is how an agent offers to build: it opens the phases and the run button for the user to press. It starts nothing. | projectId, subject, planId, nodeId, viewId, factId, launchId, proposalId, view, sessionId |
plan.list | plan_list | List this project's plans — id, title, status and stage counts. The read behind "what plans do I have?", and where a planId for plan.brief or plan.focus comes from. | projectId*, includeArchived |
plan.suggestImprovements | plan_suggestImprovements | Ask an agent to survey the project and propose work as unaccepted ideas. | projectId*, count |
plan.planSelected | plan_planSelected | Turn selected ideas and roadmap items into one coherent implementation plan. | projectId*, ideaIds, itemIds |
plan.checkAdd | plan_checkAdd | Add a verification requirement to one stage of a plan. | planId, stageId, coverage, description, tool, manual, required |
plan.checkRemove | plan_checkRemove | Remove a verification requirement from a stage of a plan. | planId, stageId, checkId* |
plan.checkRecord | plan_checkRecord | Record what a verification check actually did, with its evidence. | planId, checkId, outcome*, stageId, evidence, buildRev, tool |
plan.review | plan_review | Read what was built, what was checked, and what is still outstanding. | planId* |
plan.brief | plan_brief | The one-minute brief for a plan: what it is, its stages, what could go wrong, and what the brief cannot tell you. | planId*, outline |
plan.setEnvironment | plan_setEnvironment | Record the revision of a plan that reached staging or production. | planId, environment, rev* |
plan.morningSummary | plan_morningSummary | Assemble what moved overnight, grouped by what it means for the plan. | projectId |
plan.clientSummary | plan_clientSummary | Draft a client-readable summary of what reached staging or live. | projectId*, environment, whereToTry |
plan.documentAdd | plan_documentAdd | Add a document to a plan bundle (note, reference, link or asset list). | planId, title, summary, content, role, format, url |
plan.documentUpdate | plan_documentUpdate | Update a document in a plan bundle. | planId, docId, title, summary, content, role, format, url |
plan.documentRemove | plan_documentRemove | Remove a document from a plan bundle. | planId, docId |
plan.importFile | plan_importFile | Turn a markdown file in the project into a plan: its first heading is the name, its sections the overview, its "### Phase N" headings the phases. Nothing starts. Converting the same file again returns the plan it already made. | projectId, file |
plan.images | plan_images | List a plan's images with their status, file path and comments. Read a file path to look at the image. | planId* |
plan.imageGenerate | plan_imageGenerate | Generate images for a plan with ChatGPT's image model, through the Codex CLI on this Mac's ChatGPT login. Runs in the background (about 30–120 s per image); returns the new image ids at once — check them with plan.images. Uses the ChatGPT plan's usage limits. | planId, prompt, title, count, aspect, docId, referenceImageIds |
plan.imageUpdate | plan_imageUpdate | Rename an image or attach it to a plan document. | planId, imageId, title, docId |
plan.imageRemove | plan_imageRemove | Delete an image from a plan, file and all. | planId, imageId |
plan.imageComment | plan_imageComment | Comment on a plan image — what to keep, what to change. | planId, imageId, text* |
plan.imageCommentRemove | plan_imageCommentRemove | Delete a comment on a plan image. | planId, imageId, commentId* |
plan.cloudRead | plan_cloudRead | Read a plan from the shared record, even when the linked Mac is offline. | projectId, planId |
plan.cloudList | plan_cloudList | List plan IDs in the shared record for a project. | projectId* |
sync.status | sync_status | Read how each shared artifact stands: synced, pending, offline, or conflicted. | — |
sync.push | sync_push | Offer this project plan content to the shared record straight away. | projectId* |
sync.resolve | sync_resolve | Settle a conflicted artifact by choosing which side becomes the new revision. | projectId, kind, artifactId, keep |
sync.deletePlan | sync_deletePlan | Delete a plan artifact from the shared record when the plan is removed locally. | projectId, planId |
planRequest.create | planRequest_create | Create a scoped planning conversation to share with a client. Planning only: it cannot change the project. | projectId, title, objective, background, constraints, questions, sources, model, personalityId |
planRequest.update | planRequest_update | Change the brief on a plan request before or during the conversation. | requestId, projectId, title, objective, background, constraints, questions, sources, model, personalityId |
planRequest.share | planRequest_share | Give a client access to one plan request. Grants the narrowest role there is: that conversation and nothing else on this machine. | requestId, projectId, clientUid* |
planRequest.revoke | planRequest_revoke | Withdraw a client's access to a plan request. The record and its history stay. | requestId, projectId |
planRequest.clarify | planRequest_clarify | Send questions back to the client on a submitted scope. | requestId, projectId, questions* |
planRequest.accept | planRequest_accept | Accept a submitted scope and turn it into a draft plan. This does not start any work — building the plan is a separate action. | requestId, projectId |
planRequest.list | planRequest_list | List plan requests on a project. A client sees only their own, and only its brief. | projectId* |
planRequest.open | planRequest_open | Start or rejoin the planning conversation on a plan request. Read-only: it cannot edit files, run commands or deploy. | requestId, projectId |
planRequest.say | planRequest_say | Send a message into a plan request conversation. | requestId, projectId, prompt* |
planRequest.revise | planRequest_revise | Add a revision of the scope. Revisions append — an already submitted one is never rewritten underneath the developer. | requestId, projectId, body*, author |
planRequest.submit | planRequest_submit | Mark the newest revision as the scope the client agrees to. Agreement is not approval, and nothing starts. | requestId, projectId |
planRequest.claim | planRequest_claim | Record something the scope asserts, and whether the client stated it or the agent inferred it. | requestId, projectId, text, origin, sourceQuote |
proposal.list | proposal_list | List pending roadmap change proposals for a project. | projectId |
proposal.accept | proposal_accept | Accept a roadmap change proposal, applying its approved changes. Requires the confirmation ID. | proposalId, confirmationId, changeIds, projectId |
proposal.reject | proposal_reject | Reject a roadmap change proposal or specific items within it. | proposalId*, changeIds, projectId |
proposal.edit | proposal_edit | Edit the data on a pending proposed change before accepting it. | proposalId, changeId, data* |
proposal.retry | proposal_retry | Retry only the failed changes from a partially applied proposal. | proposalId, confirmationId |
Brain
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
plan.ideaTriage | plan_ideaTriage | Record what an idea is: whether it already exists (with the files or change as evidence), what would have to be added, how big it is for an agent, and one sentence a client could read. The reading stays the agent's until a person acts on it. | projectId, ideaId, exists, complexity, summary*, existsScope, existsNote, gap, complexityNote, kind, evidence, nodeId |
drop.add | drop_add | Paste anything into a project — a thought, a meeting transcript, an email, a message. The text is kept verbatim on this computer, and a read-only Claude run sorts it onto the product map as separate ideas, saying whether each already exists. Returns duplicateOf instead when the same text was pasted in the last 24 hours. | projectId, text, source, sort, model, force |
drop.read | drop_read | Read the verbatim text of one pasted drop. | projectId, dropId |
drop.remove | drop_remove | Delete a drop's text. The record stays, reading "original removed", and every idea keeps its excerpt. Owner only. | projectId, dropId |
drop.sort | drop_sort | Sort now: start the sort run for the project's waiting drops at once, or re-read particular ideas. Refused while a sort run is already going, with its sessionId. | projectId*, dropIds, ideaIds, model |
map.list | map_list | Read the product map: its areas (the sections of the product) and capabilities (what a user can do there), each with whether it is built and the evidence, plus the ideas attached to each node. | projectId*, includeArchived, includeIdeas |
map.scan | map_scan | Map the product: a read-only Claude run reads the codebase, the Changes log and the plans and writes the map's areas and capabilities. Rescan is the same command; it never renames a node a person confirmed and never archives anything. | projectId*, model |
map.nodeAdd | map_nodeAdd | Add an area or a capability to the product map. | projectId, name, kind*, parentId, summary, standing, standingScope, standingNote, evidence, changeAreas |
map.nodeUpdate | map_nodeUpdate | Change a product-map node — its name, summary, standing, evidence or parent. Only a person can confirm a standing. | projectId, nodeId, name, summary, parentId, standing, standingScope, standingNote, evidence, changeAreas, confirmed, restore |
map.nodeRemove | map_nodeRemove | Archive a product-map node. Its ideas move to Unsorted; nothing is deleted. Owner only. | projectId, nodeId |
map.nodeMove | map_nodeMove | Move a product-map node under another area, or up and down among its siblings. | projectId, nodeId, parentId, delta |
brain.read | brain_read | Read the project's Brain: remembered facts with their evidence and scope (this checkout, another branch, live on a target, or unknown), directions, decisions, saved views, the note index (titles only), launch sets, the last refresh with what it covered and missed, how fresh it is, and each plan's ship state. Facts are agents' readings until a person confirms them. | projectId*, include, nodeId, kinds, includeHistory |
brain.noteRead | brain_noteRead | Read one of the Brain's notes. The text lives on the computer that has the project and never syncs, so from a phone or the hosted dashboard it needs that computer online. | projectId, noteId |
brain.branches | brain_branches | What sits on other branches: each branch against the default branch (ahead, behind, changed paths, merged), its last commit, worktree and open pull request, and a one-line summary when Claude is available. Says when the remote or pull requests could not be read, rather than listing none. refresh re-reads git and may write one-line summaries (a small Haiku call, shown as Included or Cash). | projectId*, refresh, name |
brain.factAdd | brain_factAdd | Remember a fact about the project, with its evidence and where it holds. Who wrote it is set by the engine, never by you. Pass supersedes to replace an older reading instead of adding a duplicate. Only a person can confirm a fact. | projectId, kind, statement*, scope, target, branch, evidence, nodeId, planIds, supersedes |
brain.factUpdate | brain_factUpdate | Amend a remembered fact. A new statement or kind from an agent clears a person's confirmation, because a new reading is a reading again. confirmed and archive are a person's acts (owner or full access). | projectId, factId, statement, kind, scope, target, branch, evidence, nodeId, planIds, confirmed, archive |
brain.directionAdd | brain_directionAdd | Record a direction the project follows ("Every export is CSV first, PDF later"). From a chat it lands unconfirmed with a short Undo; only a person confirms it. | projectId, title, statement*, why, appliesTo |
brain.directionUpdate | brain_directionUpdate | Amend or retire a direction. confirmed is a person's act (owner or full access). | projectId, directionId, title, statement, why, appliesTo, status, confirmed |
brain.decide | brain_decide | Record a decision: not doing something, a choice between options, or deferring. A not-doing decision also dismisses the related ideas that are still open, with the reason. A later similar request is flagged for review, never silently dropped. | projectId, kind, title, reason, statement, relatedIdeaIds, relatedNodeIds, relatedPlanIds, revisitWhen |
brain.decisionUpdate | brain_decisionUpdate | Amend a decision. confirmed and archive are a person's acts (owner or full access). | projectId, decisionId, title, reason, statement, revisitWhen, confirmed, archive |
brain.noteWrite | brain_noteWrite | Write one of the Brain's notes: long prose kept as a markdown file on the computer that has the project. The text never syncs; only the title and size do. | projectId, title, content*, noteId, summary |
brain.noteRemove | brain_noteRemove | Delete a note's text. The index row stays, reading "original removed". A person's act, owner or full access only. | projectId, noteId |
brain.setRefreshPolicy | brain_setRefreshPolicy | Choose when the Brain refreshes its memory: manual, after-build, or daily at an hour. A person's choice; a chat may suggest it. | projectId, policy, atHour, timezone |
brain.refresh | brain_refresh | Refresh the Brain's memory now: a visible, read-only Claude chat reads the project's docs, map, plans, Changes log, releases, issues and branches, and records facts with evidence. It decides nothing and cannot change code. Refused while one is running (returns its sessionId). A run that records nothing is a failure, not a refresh. | projectId*, model |
brain.undo | brain_undo | Undo a fact, direction or decision a chat just recorded, within its one-minute window. Refused once it was edited, confirmed or acted upon (a dismissed idea changed since), so Undo never erases someone's later work. A person's act. | projectId, kind, id* |
brain.launchSet | brain_launchSet | Prepare a launch set: several plans of one project to build in order, each with its model, strength and session mode. Nothing starts — a person presses Start all (or Start first only). Every plan must have plan text and must not be archived, running, live or done. | projectId, planIds, perPlan, note |
brain.launchStart | brain_launchStart | Start a launch set: the first plan that has not started (or failed) builds through the ordinary queue, and with Start all each next plan follows when the one before it finishes, phases included. Safe to press twice: nothing in flight is started again. Resumes after a partial start. A person's act. | projectId, launchId, only |
brain.launchCancel | brain_launchCancel | Cancel what a launch set has not started yet. A build already running keeps running; stop it with agent.stop. | projectId, launchId |
brain.docProposeEdit | brain_docProposeEdit | Propose a change to one of the project's own docs (AGENTS.md, the brain folder, README, docs). Nothing is written: it becomes a proposal with a unified diff, and a person applies it. Apply writes exactly the approved diff, and only if the file has not changed since. Never .nocturnal/ (the Brain writes its own folder directly); AGENTS.md only when editing it is allowed on this computer. | projectId, path, edit, why |
Projects
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
project.stopAll | project_stopAll | Stop every process-manager row for a project and kill its attributed ports (skips 17410/17411). | projectId* |
project.rescan | project_rescan | Rescan the projects directory for new or changed projects. | — |
project.create | project_create | Create a new project under the projects folder. Writes .nocturnal/ and AGENTS.md. Does not run adoption. | name*, id, traceId, parentEventId |
project.import | project_import | Register an existing folder with Nocturnal. Does not create .nocturnal until the project is onboarded. Omit path to open the native folder picker. | path |
project.chooseBase | project_chooseBase | Open a native folder picker and save the choice as this computer's projects directory. | — |
project.adopt | project_adopt | Run the deep scan on a folder: writes .nocturnal/project.json with services, scripts, processes and the intelligence section, and appends the Nocturnal block to AGENTS.md. This is the "Rescan" / onboarding action and it runs an agent. | path* |
project.readme | project_readme | Read the local README file for a project (from disk, not GitHub). | path, projectId, file |
project.activity | project_activity | Record a human opening a project plan, chat or version. | projectId, view, planId, sessionId, version |
project.docs | project_docs | List markdown files in a project (skips node_modules and other vendor trees). | path, projectId |
project.doc | project_doc | Read one markdown file from a project (path must stay inside the project). | file*, path, projectId |
project.searchFiles | project_searchFiles | Search project files by name for composer @ mentions (skips vendor trees). | query, path, projectId, limit |
project.rename | project_rename | Set or clear a display-name override for a project (shown instead of the project.json name). | projectId*, name |
project.addLink | project_addLink | Append a named URL to the project.json links list used by the dashboard bookmarks sidebar. | projectId, name, url* |
project.reveal | project_reveal | Reveal a project folder, or one file in it, in Finder on the machine running the engine. | projectId*, file |
project.archive | project_archive | Archive or unarchive a project so it leaves the default rail list. | projectId*, archived |
sidebar.set | sidebar_set | Replace the project rail folder layout and custom order. | layout* |
sidebar.folder.create | sidebar_folder_create | Create a folder in the project rail. | name, icon |
sidebar.folder.delete | sidebar_folder_delete | Delete a project rail folder. Projects inside it move back to the top level. | id* |
sidebar.move | sidebar_move | Move a project or folder in the rail — the drag-and-drop action behind the sidebar. | move, drop |
Processes
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
proc.start | proc_start | Start a supervised long-running process. | projectId, command, cwd, defId, name |
proc.stop | proc_stop | Stop a supervised process. | id* |
proc.restart | proc_restart | Restart a Nocturnal-managed process. | id* |
proc.delete | proc_delete | Remove a process row from the Nocturnal registry. | id* |
proc.list | proc_list | List Nocturnal-managed processes with status, pid, and project. | — |
proc.logs | proc_logs | Read the tail of a process log. | id*, lines |
proc.save | proc_save | Snapshot the currently running process set so it can be restored later. | — |
proc.resurrect | proc_resurrect | Restart the last saved process set. | — |
proc.startGroup | proc_startGroup | Start every process in a named project group (skips members already running). | projectId, groupId |
proc.stopGroup | proc_stopGroup | Stop every running process in a named project group. | projectId, groupId |
proc.groupSave | proc_groupSave | Replace the processGroups list in a project's project.json. | projectId, groups |
Scripts
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
script.logs | script_logs | Read the log for a script run. | projectId, scriptId, runId |
script.stop | script_stop | Cancel a running one-shot script. | projectId, scriptId |
script.run | script_run | Run a one-shot project script (command defaults to the script in project.json). | projectId, scriptId, command, cwd, traceId, parentEventId |
script.save | script_save | Add a script to a project's project.json (or edit one when id is given). A pasted one-liner is enough; the name defaults to the command. | projectId, command, name, id, cwd, kind |
script.remove | script_remove | Remove a script from a project's project.json. Its run history stays. | projectId, scriptId |
Ports
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
ports.kill | ports_kill | Kill whatever process is holding a TCP port. | port* |
port.fixConflicts | port_fixConflicts | Launch an agent to remap a project off ports that overlap another adopted project. | projectId* |
port.rotate | port_rotate | Launch an agent to move every declared service in a project onto free ports from the registry, even when nothing currently conflicts. | projectId* |
port.suggest | port_suggest | Suggest free replacement ports for a project: conflicting and common-default ports by default, every declared service with all. Changes nothing. | projectId*, all |
registry.claim | registry_claim | Reserve a port for a project service in the Nocturnal port registry. | port, projectId, service* |
registry.release | registry_release | Release a port claim so another project can take it. | port* |
Git
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
git.commit | git_commit | Stage everything and create a git commit. | cwd, message, traceId, parentEventId |
git.suggestCommit | git_suggestCommit | Draft a short commit message from the current working-tree diff. | cwd* |
git.publishRepo | git_publishRepo | Initialise git if needed, create a GitHub repository with gh, and push. | name*, cwd, projectId, visibility |
git.createBranch | git_createBranch | Create and switch to a new local git branch. | cwd, name |
git.checkout | git_checkout | Switch to an existing local git branch. | cwd, name |
git.push | git_push | Push a branch to origin, creating upstream if needed. | cwd*, name |
git.branchDetail | git_branchDetail | Load commits and ahead/behind counts for a local branch. | cwd, name, base |
git.graph | git_graph | Load a commit graph of recent history across all branches. | cwd* |
git.commitDetail | git_commitDetail | Load the message and changed files for a single commit. | cwd, sha |
git.refresh | git_refresh | Re-read git status for a project and publish gitIndex immediately. | cwd* |
git.fetch | git_fetch | Update remote-tracking refs so ahead and behind are current. Changes nothing locally. | cwd* |
git.pull | git_pull | Bring remote commits into this workspace, setting local changes aside and back. | cwd*, strategy |
git.integrationStatus | git_integrationStatus | Read whether remote changes can be brought in, and what stands in the way. | cwd* |
git.resolveMerge | git_resolveMerge | Start an agent to settle merge conflicts, run the checks, and report what happened. | cwd, projectId, branch, verifyCommand |
git.removeLock | git_removeLock | Delete a stale .git/index.lock left behind by a crashed git process, so commits work again. | cwd* |
git.merge | git_merge | Merge a local branch into the current branch. | cwd, name |
GitHub
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
ci.refresh | ci_refresh | Refresh CI runs and the workflow list (including newly pushed workflows) from GitHub Actions. | owner, repo |
ci.detail | ci_detail | Load jobs, failed steps, annotations, and a log tail for a GitHub Actions run. | owner, repo, runId* |
ci.workflows | ci_workflows | List GitHub Actions workflows for a repo, including dispatch inputs and latest run status. | owner, repo |
ci.triggerWorkflow | ci_triggerWorkflow | Trigger a workflow_dispatch GitHub Actions workflow. | owner, repo, workflowId, ref, inputs |
github.overview | github_overview | Fetch open pull requests and local branches for a project repo. | owner, repo, cwd |
github.createPR | github_createPR | Push the branch if needed and open a GitHub pull request. | owner, repo, title, head, base*, body, draft, cwd, push, traceId, parentEventId |
github.prDetail | github_prDetail | Load a pull request with files, commits, reviews, and checks. | owner, repo, number* |
github.mergePR | github_mergePR | Merge a GitHub pull request. | owner, repo, number* |
deploy.overview | deploy_overview | Fetch GitHub environments and recent deployments for a repo. | owner, repo, projectId |
Issues
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
issue.overview | issue_overview | List GitHub issues plus labels, milestones, and assignees for a project. | projectPath, projectId, owner, repo, state, labels, milestone, assignee |
issue.detail | issue_detail | Load one GitHub issue and its comments. | number*, projectPath |
issue.create | issue_create | Create a GitHub issue on the project repository. | title*, projectPath, body, labels, assignees, milestone, after, traceId, parentEventId |
issue.update | issue_update | Update a GitHub issue (title, body, state, labels, assignees, milestone). | number*, projectPath, title, body, state, stateReason, labels, assignees, milestone |
issue.comment | issue_comment | Add a comment on a GitHub issue. | number, body, projectPath, traceId, parentEventId |
issue.reorder | issue_reorder | Save a custom Issues-tab order for a repository (device-local, not GitHub). | numbers*, projectPath |
Versions
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
version.cut | version_cut | Start cutting a new version — drafts a changelog from commits since the last baseline. | projectPath*, projectId, bumpType, traceId, parentEventId |
version.save | version_save | Save a drafted version entry to versions.json. | projectPath, version, summary, toCommit, fromCommit*, projectId, sections, issueIds |
version.markDeployed | version_markDeployed | Mark a version as deployed. | projectPath, version, projectId, ciRunUrl, target |
workingChanges.refresh | workingChanges_refresh | Recompute the working-changes summary for a project (agent one-liners and files since the last version). | projectId*, projectPath |
Changes
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
changes.list | changes_list | List what agents built in a project — by day, week, month or version — with where each change has reached (not committed, committed, on staging, live) and whether it still needs testing. Over MCP it still answers while the computer is asleep, from its last sync (90 days, no file paths). | projectId*, range, since, until, stage, kind, needsTesting, query, area, sessionId, planId, releaseId, changeId, includeHidden, limit, before |
changes.overview | changes_overview | Read a project's pipeline: what is not built yet (plans and roadmap), what is built but not live (and needs testing), what is live, and how much changed today, this week and this month. | projectId* |
changes.update | changes_update | Edit a change's wording, hide it, or record that it works or has a problem. Only a person can mark it as working. | projectId, changeId, title, detail, area, kind, testHint, hidden, verified, problem, note |
changes.summarise | changes_summarise | Write (or rewrite) the plain-language summary for a change's run, or for the placeholder lines from chat history. Each is one small Claude Haiku call. | projectId*, changeId, backfill, dryRun |
Deploy
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
release.plan | release_plan | Read what a release would carry, where it would go, and what blocks it. | projectId*, componentId, target, planId |
release.run | release_run | Run a project release script for one component and record what happened. | projectId, scriptId, target*, componentId, production, planId, traceId, parentEventId |
release.record | release_record | Record a release that happened outside Nocturnal, such as a store submission. | projectId, sourceRev, action, target, componentId, version, fromWorkingTree, releaseId, artifact, production, outcome, installKnowledge, detail |
release.history | release_history | Read the release log for a project, with recovery options and their limits. | projectId*, componentId |
release.policy | release_policy | Read or change what a project requires before a production release. | projectId*, requireStaging, requireChecks, requireAcceptance, autoStageOnVersion, dataNote |
release.component | release_component | Declare or edit a releasable part of a project (a website, a desktop app), so its version and what is live show separately. | projectId, name, kind, defaultTarget, componentId, paths, scriptIds |
Settings
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
settings.get | settings_get | Read every engine setting (the public settings object; never secrets). | — |
settings.set | settings_set | Change one engine setting. Keys: agentPermissionMode, agentDefaultMode, agentDefaultModel, agentDefaultEffort, agentPersonalities, agentDefaultPersonality, deviceName, projectsBase, processAutostart, workingChangesEnabled, planAskQuestions, agentClaudeChrome, agentClaudeUserMcp, agentPrivate, mirrorAgents, editAgentsMd, completionTonesEnabled, completionToneId, completionToneByProject, mutedNotificationsByProject, scriptLabelsByProject, voiceInputEnabled, voiceHoldEnabled, voiceProvider, voiceModel. | key, value |
tokens.status | tokens_status | Report which API keys and tokens are stored on this machine, as booleans and hints. Never returns a secret. | — |
tokens.set | tokens_set | Store an API key or token on this machine (written 0600 to ~/.nocturnal/secrets.json, never mirrored to the cloud). | kind, value |
tokens.clear | tokens_clear | Delete a stored API key or token from this machine. | kind* |
keepAwake.set | keepAwake_set | Prevent the computer from sleeping. duration 0 = indefinite, 60 = one hour, 300 = five hours. Pass off:true to allow sleep again. | duration, off |
keepAwake.get | keepAwake_get | Return the current keep-awake state (active, duration, expiry). | — |
usage.checkLimits | usage_checkLimits | Read the Claude and ChatGPT (Codex) plan usage windows now: percent used and reset time for the 5-hour and weekly windows. Codex is free to read; Claude costs one tiny Haiku request. The result is also on the planLimits topic. | — |
System
| Command | MCP tool | What it does | Parameters |
|---|---|---|---|
terminal.open | terminal_open | Open a system terminal at a project folder, or tail a process log in one. | cwd, logPath |
ide.open | ide_open | Open a project folder in Nocturnal IDE and optionally reveal a file in that workbench (never a lone file window). | folder, file, line, column, cwd, path |
voice.transcribe | voice_transcribe | Transcribe a recorded audio clip to text for the voice composer. | audio, mime, provider, model, remote, durationMs |