20.15 Machines with no person
- Approved by
- Panaversity ·
Going further. Built only in Lab 20's optional tasks. It builds on Chapter 18's sign-in, so read it after 20.16 if you want it.
In everyday life. A cleaning company gets its own key to the office, labeled with its name, for the night shift. It does not borrow the manager's key.
What you will learn. How a program with no person present signs in to a connector, and how long work answers without making the caller wait.
Why it matters. In Chapter 18, almost every token named a person (18.6), and every AI app had a client ID (18.5). The one exception was Lab 18's test client for CI, which signed in with client credentials and took its company from its own record at the sign-in server. Chapter 23 will warn that Brightline's morning triage runs with Ana's access, so it acts as her. A job that runs at 7:10 every weekday should be able to act as itself.
One request, start to finish. Brightline's month-end aging report runs at 2:00 a.m. on the first of each month.
- The report job signs in as itself. It proves its identity to Brightline's sign-in server with a signed assertion, a short-lived proof made with its own private key.
- The sign-in server issues an access token for the job, with only the scope the report needs. No browser opens, and no person approves.
- The job calls the connector, which checks the token like any other, and finds no person in it, only the job.
- The report takes several minutes. The connector answers at once with a task handle. The job checks the task until it is complete, and then reads the result.

Figure 20.15. A job with no person signs in as itself, and long work answers with a task handle.
What is OAuth Client Credentials?
The extension io.modelcontextprotocol/oauth-client-credentials, Stable, lets a program sign in with its own credentials, with no interactive approval. It suits background services, scheduled jobs, CI pipelines and server-to-server links. If a person should approve access, use the ordinary sign-in instead.1,2
It accepts two kinds of proof:2
- A signed JWT assertion (recommended), made with the program's private key and short-lived.
- A client secret, simpler, but long-lived: store it in a secrets manager, rotate it, give it the least scope it needs, and prefer the signed assertion.
The connector checks the token's signature, claims and scopes on every request, as it does for people.2 The job's company comes the same way as for Lab 18's CI client: from the job's own record at the sign-in server, which puts it in each token. The connector takes it from the token, as always. Keep the job's scope narrow: the report reads, so it gets ap:read and nothing else.
What is the Tasks extension?
Some calls take minutes. With io.modelcontextprotocol/tasks, a Beta extension planned for the core protocol, the connector may answer with a task handle instead of the result. The caller checks it with tasks/get until its status shows the work has finished, failed or been stopped. A task can also ask for input, with the status input_required. A task id survives a dropped connection, so the caller can check again after reconnecting. The connector must never return a task to a caller that did not declare the extension.1,3
At work. In Lab 20, Task 14 (optional), the builder gives the report job its own credentials and checks that its token carries ap:read only.
The operating rule: give each job its own identity with the least scope it needs, prefer signed assertions to long-lived secrets, and let long work answer with a task handle.
Check yourself
Question 1 / 2
0 answered
The month-end report job runs at 2:00 a.m. How should it sign in?
Sources
- Owner
- Panaversity