Noyau
Sections

Documentation › Develop

API and MCP

Noyau can be driven from other tools: Claude Code or Codex on another computer, a script, a CI job. They connect with a personal API token, through the MCP server or the noyau thread command. For the OpenAI-compatible model API (/v1), see Model gateway, which uses its own keys.

Create a token

Open Settings > API and MCP access and click New token.

Field Choices
Client A name for the outside client, for example "Laptop Claude Code"
Scope Read, Supervised agents or Full
Valid for 30 days, 90 days, 1 year or No expiry

Click Create token. The token is shown only once: copy it now, Noyau only keeps a fingerprint and cannot show it again. Confirm with I copied the token.

Create one token per outside client, with the smallest scope that works: it acts as your profile, within that scope. The list shows when each token was created, when it expires and when it was last used. Revoke cuts its access at once. Deleting an account revokes all its tokens.

Scopes

Scope What it allows
Read Read threads, todos, projects and usage. Starts nothing.
Supervised agents Start and drive threads that ask before acting, manage todos.
Full Also drive autonomous threads and put the machine to sleep.

No scope ever grants access to the terminal, to sign-in and account routes, or to administration. A tool above the token's scope is not even listed to the client.

Besides MCP, a token works as an Authorization: Bearer header on a fixed allowlist of Noyau HTTP routes (threads, todos, notes, projects, usage, calendar events, machine status), with the same scope rules. Any other route refuses it.

Connect an MCP client

The MCP endpoint is /api/mcp on your Noyau address, over Streamable HTTP, with the token as a Bearer header. The Connect a client panel in the same settings section gives each snippet with your address filled in; while the new token is still shown, it is filled in too.

Claude Code:

claude mcp add --transport http noyau https://noyau.example.com/api/mcp --header "Authorization: Bearer $NOYAU_TOKEN"

Codex (~/.codex/config.toml), with the token in the NOYAU_TOKEN environment variable:

[mcp_servers.noyau]
url = "https://noyau.example.com/api/mcp"
bearer_token_env_var = "NOYAU_TOKEN"

Other MCP clients (JSON):

{
  "mcpServers": {
    "noyau": {
      "type": "http",
      "url": "https://noyau.example.com/api/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}

MCP tools

Tool Scope Purpose
overview, system_status Read Global state, machine resources
thread_list, thread_read, thread_wait Read List, read and wait for the end of a thread's turn
inbox Read What waits for you: questions, plans to approve, limits reached
todos_list, projects_list, calendar Read Tasks, projects, upcoming events
notes_search, note_read Read Project notebook notes (personal notes stay invisible)
usage Read Tokens per model and equivalent API cost
thread_launch, thread_send, thread_stop Supervised agents Start an agent, write to it, stop it
todo_create, todo_update, todo_comment Supervised agents Add, change or comment a task
note_write Supervised agents Create or update a project note
say Supervised agents Speak a sentence on the Noyau machine
power Full Put the machine to sleep or wake it (main profile only)

Threads are targeted by name, alias or id. The usual flow is thread_launch or thread_send, then thread_wait with the returned after value. Plugins and your online runners can add their own tools.

The noyau thread command

noyau thread starts and drives threads from a terminal or a script.

Command Effect
start [folder|project] "instruction" Starts a thread. - reads the instruction from standard input
send <thread> "message" Writes to an existing thread (name, alias or id)
show <thread> Latest messages and state
wait <thread> [--after n] Waits for the end of the current turn
list [--project p] Threads of the profile
stop <thread> Stops a thread
Option Effect
--wait Waits for the answer (start, send). Exit codes: 0 done, 1 failure, stop or timeout, 2 waiting for your reply
--json JSON output, for scripts
--timeout <s> Maximum wait with --wait (default 1800)
--assistant <id> claude (default), codex, antigravity... (alias --provider)
--name, --model Thread name, model
--worktree Separate Git folder on a dedicated branch (start)
--supervised The thread asks before acting (start)
--limit <n> Messages shown by show (default 15)

On the Noyau machine itself, the command reads the local access key from the data folder. From another machine, set both variables:

export NOYAU_URL=https://noyau.example.com
export NOYAU_TOKEN=<token>
noyau thread start MyProject "Summarize today's changes" --wait

Keep tokens in environment variables or a secret store, never in a Git repository, and revoke a token as soon as a device is lost.

Edit this page on GitHub