Building with agents, lesson 9.1
One door to your tools, with permissions
When every person wires their own agent to their own tools, nobody can say who can reach what. This lesson puts every tool behind one door, with one sign-in, one policy and one log.
Every example below changes to fit what you pick. The businesses are made up for teaching.
The picture, one step at a time
Each box is one stage. The picture lights up as you scroll.
One door between a company's agents and its tools
1The agents
Coding agents, chat assistants and scheduled jobs, run by different people in different teams.
2One door
One address every agent connects to, instead of a dozen tool servers each wired up by hand.
3Who is asking
Each person signs in, and the agent gets a token issued for that person, for this door only.
4What they may use
A policy per team and per tool: no access, read, change with approval, or change on its own.
5The tools behind it
The MCP servers for your code, tickets, documents and data. Their own keys stay behind the door.
6A record of every call
Who called which tool, when, and what happened.
Many agents, many tools, no single answer to "who can reach what?"
Step 1 of 6
Every agent wired up by hand
Once a company has agents, everyone connects their own. A code server here, a database server there, each with a personal access token pasted into a config file on someone's laptop. Ask who can reach what in the shop's tools, and nobody can answer.
Step 2 of 6
One door
Put one gateway in front of all the tool servers. Some products call it an MCP portal. Every agent connects to that one address and sees only the tools it is allowed. Adding a tool, taking one away or seeing who uses it now happens in one place.
Step 3 of 6
Who is asking
At the door, each person signs in with the company login they already use. The agent then gets a token, a short-lived pass, issued for that person and for this door only. MCP's own rules for this build on OAuth 2.1, the standard behind "sign in with" buttons.
The MCP authorization spec (version 2026-07-28) says a server "MUST validate that access tokens were issued specifically for them" and "MUST NOT accept or transit any other tokens". A pass for one server is no good at another.
An agent holds a token issued for the ticket server. It sends that token to the code server. What should happen?
Step 4 of 6
What they may use
Write a policy for each team and each tool, with one of four answers: no access, read, change with approval, or change on its own. Start every team at no access and open only what its jobs need. Read only covers most of it.
Step 5 of 6
The keys stay behind the door
The tool servers hold their own keys to your real systems, and agents never see them. When someone leaves the company, you remove them at the door, and every tool is closed to them at once. No hunting through laptops for pasted tokens.
Step 6 of 6
A record of every call
The door logs who called which tool, when, and what happened. Read it once a month. Access nobody used gets taken away. A team with "change" whose log shows only reads drops to read only.
A team has had "change" on the database for three months, and the log shows only reads. What do you do?
How much access?
Here are four pairs of a team's agent and a tool. No access: the job never needs it. Read only: it looks things up. Change with approval: the change matters, so a person signs off. Change on its own: low harm and easy to undo.
1The support team's agent and the order database.
2The support team's agent and the refunds tool.
3The marketing team's agent and the payment provider's dashboard.
4Any team's agent and the shared to-do list.
0 of 4 right so far, 4 to go.
An access-policy template
This is what you keep: the columns of the policy and the rules around it, ready to fill in for your own teams and tools.
An access-policy template
- List every tool server, and who owns each one.
- For each team and each tool, write one of four: no access, read, change with approval, change on its own.
- Start every team at no access, and open only what its jobs need.
- Agents reach tools only through the one door, signed in as a person, with tokens issued for that door.
- Tool keys stay behind the door. No personal tokens in config files.
- Log every call, and once a month take back the access nobody used.
One door, one sign-in, one log. If you cannot say who reached which tool, you do not control it.
Next: Lesson 9.2: Gateways, model routing and cost. How one gateway in front of the models gives each team a budget and sends each job to the right model.