# Control tool access with the Amiril gateway

Put your agents' tools behind the Amiril gateway in four steps. Each agent then sees only the tools you granted it and never has a tool server's key.

The Amiril gateway is an MCP server that sits between your agents and the servers their tools live on. Amiril runs it for you, and each agent's **Connect** tab shows its address. Each agent sees only the tools you granted it, and the gateway refuses a call to any other tool. The gateway also signs in to each tool server for the agent, so you can take API keys and logins out of your agents.

Your agent connects to the gateway as an MCP client, and each tool has to live on a **tool server**, which is an MCP server you register in Amiril. If a tool is a function inside your agent today, [move it to a tool server](/tool-servers/move-a-tool). That guide takes it through steps 2 to 4 below. [Put a tool on a tool server](/tool-servers#put-a-tool-on-a-tool-server) lists the other ways to do that.

## Connect an agent to its tools [#connect-an-agent-to-its-tools]

<Cards>
<Card title="1. Register the agent" href="/agents">
Give the agent a display name on the **Agents** page, so it can have grants and a token. For an agent that sends no traces yet, select **Register agent**.
</Card>

<Card title="2. Add a tool server" href="/tool-servers">
Paste the server's MCP address under **Tools** and test the sign-in.
</Card>

<Card title="3. Grant tools" href="/agents/access">
Turn on the tools this agent needs on its **Access** tab.
</Card>

<Card title="4. Connect the agent" href="/agents/access#connect-the-agent">
Create a token on the agent's **Connect** tab and add it to the agent's MCP client settings.
</Card>
</Cards>

## Review what your agents can call [#review-what-your-agents-can-call]

<Cards>
<Card title="Answer an access suggestion" href="/agents/access#answer-an-access-suggestion">
Revoke or keep a tool that Amiril suggests taking away, such as one unused for 30 days.
</Card>

<Card title="Audit agent access" href="/agents/access-log">
See who granted or revoked each tool, which calls the gateway refused and what changed on your servers.
</Card>
</Cards>

## Next steps

- [Register and manage agents](https://docs.amiril.ai/agents.md): Amiril lists every agent it finds in your traces. Register one with a display name so it can have owners, tool grants and a gateway token.
- [Add a tool server](https://docs.amiril.ai/tool-servers.md): Register the MCP server where your agents' tools live and choose how Amiril signs in to it. Then grant its tools to agents on their Access tab.
- [Grant tools to an agent](https://docs.amiril.ai/agents/access.md): Turn on the tools an agent may call, give it a gateway token and point its MCP client at the Amiril gateway. Then revoke the tools it stops using.
- [Move an in-process tool to a tool server](https://docs.amiril.ai/tool-servers/move-a-tool.md): Take a tool function and its API key out of your agent and put them on a tool server behind the Amiril gateway. The agent keeps one gateway token.

## More detail

- [Tool servers, the gateway and agent access](https://docs.amiril.ai/assistant/tool-servers.md): Everything about registering MCP tool servers, the four sign-in methods, the Amiril gateway, tool grants, gateway tokens, sync, the access log, access suggestions and their errors.
- [HTTP API: access](https://docs.amiril.ai/assistant/api/access.md): The access routes of Amiril's HTTP API: 16 operations, each with its parameters, request body, responses and token access.
- [HTTP API: agents](https://docs.amiril.ai/assistant/api/agents.md): The agents routes of Amiril's HTTP API: 41 operations, each with its parameters, request body, responses and token access.
