# Add a tool server

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.

A tool server is the MCP server where your agents' tools live. You register it in Amiril once, and the [Amiril gateway](/access) calls it for every agent you grant its tools.

## What a server needs [#what-a-server-needs]

A server connects when it speaks MCP over HTTPS at an address Amiril can reach over the internet. A server that runs only as a local program over stdio cannot connect. If someone else wrote the server, run it behind a bridge that serves stdio servers over Streamable HTTP. Host the bridge at an HTTPS address. For a server you write, the official MCP SDKs include an HTTP transport. [Wrap an API as a tool server](/tool-servers/wrap-an-api) shows one in use.

## Enter the server's address [#enter-the-servers-address]

Open **Tools** in the sidebar and select **Add server**. Paste the server's MCP address into **Server URL**.

## Choose how Amiril signs in [#choose-how-amiril-signs-in]

Amiril checks the address when you paste it and marks the method the server asks for as **Detected**. A server that answers anyone needs **No authentication**. The other three methods each have a page.

<Cards>
<Card title="API key or token" href="/tool-servers/key">
One fixed value in a header, such as an API key or a personal access token.
</Card>

<Card title="OAuth client credentials" href="/tool-servers/app-login">
A client ID and secret for an app you registered at the vendor.
</Card>

<Card title="OAuth, user sign-in" href="/tool-servers/person-login">
A person signs in at the vendor once, and Amiril renews the login.
</Card>
</Cards>

Pick **OAuth client credentials** when the vendor offers it. The login belongs to an app, so it keeps working after the person who set it up leaves.

The method's page takes you through the rest of the form. With any method, keep **Type** under **Details** as **Internal** for a server your teams run, or pick **External** for one a vendor provides. The Agents page can then find the agents that reach external tools.

## Check the name, slug and access [#check-the-name-slug-and-access]

After the sign-in fields, select **Test connection**. When the test works, Amiril lists the server's tools with three things to check:

- **Name** is what the app calls the server. Amiril takes it from what the server reports about itself.
- **Slug** is a short form of the name that goes in front of each tool's name. A tool `issue_payment` on a server with the slug `payments` shows as `payments.issue_payment`.
- Each tool's **Access** says what the tool does to data. **Read** changes nothing, **Write** creates or changes data and **Destructive** deletes data or can't be undone.

Amiril sets each tool's **Access** from the hints the server sends with it, `readOnlyHint` and `destructiveHint`. A tool with neither counts as **Write**. The value matters later, because each access level on an agent's **Access** tab picks tools by it. Correct any that are wrong, then select the button that adds the tools, such as **Add 2 tools**. Next, [grant the tools to an agent](/agents/access).

## How Amiril stores keys and tokens [#how-amiril-stores-keys-and-tokens]

Amiril encrypts every key, secret and token with AES-256-GCM before it stores it. Neither the app nor the API ever shows a saved one again, so you can replace it but not read it.

## Put a tool on a tool server [#put-a-tool-on-a-tool-server]

When a tool is not on an MCP server yet, pick the path that fits it.

<Cards>
<Card title="Connect a service through Composio" href="/tool-servers/connectors">
Composio gives a service with no MCP server an MCP address.
</Card>

<Card title="Wrap an API as a tool server" href="/tool-servers/wrap-an-api">
Write a small MCP server in front of the API yourself.
</Card>

<Card title="Move an in-process tool to a tool server" href="/tool-servers/move-a-tool">
Take a function and its API key out of your agent.
</Card>
</Cards>

## Next steps

- [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.
- [Connect an MCP server with an API key](https://docs.amiril.ai/tool-servers/key.md): Register a tool server that takes a fixed API key or token in a header. You enter the key once in Amiril, and the gateway adds it to every call.
- [Connect a service through Composio](https://docs.amiril.ai/tool-servers/connectors.md): Reach a service with no MCP server of its own through Composio. Register the MCP address Composio gives you in Amiril, then grant its tools.
- [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.
- [Control tool access with the Amiril gateway](https://docs.amiril.ai/access.md): 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.

## 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.
