# Custom API and MCP server

A service that is not in the catalog can be connected by you: on the **Custom API** tab by its API address and key, or on the **MCP servers** tab if the service offers an MCP server. Both tabs are under **Integrations** for everyone. The general rules of connections (statuses, Read-only, disconnecting) are in [Connecting services](/help/integrations), and how the agent decides which change to make on its own and which to send for confirmation is in [Action approval](/help/trust).

## Custom API

Any service with an HTTP API: your accounting system, a CRM on your own server, a service with no ready integration.

### What the agent can do

Calls the endpoints of your API: reads data with GET requests and changes it with the other requests. Which endpoints exist and what they are for, the agent learns from the **Hint for the agent** field, so the more precise the hint, the fewer unneeded requests.

### Before you start

- The API address from the service's docs, usually starting with https://api.
- A key or token from the service's account. If the service needs no key, you do not need one.
- If the server is reachable only inside the office network, the desktop app on a computer in that network ([Apps](/help/apps)).

### Steps

### Open the Custom API tab
Under **Integrations** open the **Custom API** tab and click **Add API**.

### Enter a name and the address
**Name**: what you and the agent will call the connection. **API address**: the address from the service's docs. If the address is internal, a hint under the field says that requests go through your computer.

### Paste the key
Paste the key or token from the service's account into **API Key**. If the key must be sent in a particular way, click **Configure how the key is sent**: there you choose where the key goes (a header or a **Query parameter**), the header or parameter name and the **Auth scheme**. If a key is already saved for this address, leave the field empty and that key is used.

### Describe the endpoints for the agent
In **Hint for the agent** list the endpoints one per line with a note, for example `GET /customers?email=` (search customers) or `POST /orders` (create an order).

### Connect
Click **Connect**: the address and key are checked with a request to the service. If the service says the key was not accepted or is needed, the form tells you. When you are sure everything is right, you can click **Connect without check**.

The key is stored in **Connection keys** on the **Variables** tab and is added to every request to this API.

### Permissions to grant

The agent works with the rights of the key you pasted. For reports, issue a read-only key in the service: then data cannot be changed even if you ask.

### Limitations

- **A POST counts as a change.** Requests other than GET are made as changes, and the address and method of your API do not say what exactly changes. If a change came as a confirmation card, the permission is not remembered for later calls.
- **A POST that only reads** (a search, a filtered report) goes into **POST endpoints that only read**: one path under the API address per line, starting with /, without spaces. The agent calls those endpoints without asking, and a read-only helper may call them. Only you set this list in the form, the agent cannot change it.
- **Slow replies.** If the service answers slowly, set **Response wait, seconds**. Empty uses the default.

### How to revoke access

Open the connection on the **Custom API** tab and click **Disconnect**. The key itself stays valid in the service: to close access fully, delete or reissue it in the service's account.

### Troubleshooting

- **The service didn't accept the key**: check the key or set how it is sent under **Configure how the key is sent**.
- **The service says it needs a key**: paste the key from the service's account.
- **The agent calls the wrong endpoints**: extend the **Hint for the agent**, name the endpoint and what it returns.
- **An internal address does not answer**: open the desktop app on a computer in the same network.

<TryPrompt prompt="Find the customer with the email ivanov@example.com in @my_api and show their latest orders. Don't change anything." />

## MCP server

A server speaking the MCP protocol that gives the agent ready tools: many services publish such an address, and you can also run one yourself.

### What the agent can do

Calls the tools the server declares. When you add a server it is checked, and the window shows **Tools detected**: that is how many tools the agent gets.

### Before you start

- The server address: the service gives it, look for "MCP" in its settings or docs. Or a JSON config from Claude, Cursor, VS Code or Zed.
- Sign-in details if the server asks for them: a token, a key or an account on the service.
- For a server on your computer: an address like http://localhost:port and the desktop app open ([Apps](/help/apps)).

### Steps

### Open the MCP servers tab
Under **Integrations** open the **MCP servers** tab and click **Add MCP server**.

### Paste the address or config
Paste an address like https://example.com/mcp or a JSON config into **Server URL or config**. A config can be uploaded with **Upload .json**: one config connects several servers at once.

### Choose the sign-in
The server is checked, and the **Sign-in** line shows what it requires: **not required**, **Bearer token**, **API key header**, **Basic authentication** or **with your account on the service**. For a token or key fill in **Authentication token**, for the account sign-in click **Authorize** and allow access on the service's page. Your own headers go into **HTTP headers**.

### Check the tools
Make sure the window shows **Tools detected**, and connect the server.

### Permissions to grant

The agent gets exactly the tools the server declares, with the rights of the token or account you signed in with. If the service can issue a read-only token, use it for reports.

### Limitations

- **Only servers with an address.** A server that runs as a command on a computer and has no address cannot be connected. An http(s):// address works, including http://localhost:port on the computer with the desktop app.
- **A local server lives with the desktop app.** While the app on that computer is closed, the agent cannot reach the server.
- **Group chats.** In a group chat with other people and in a messenger group, MCP server tools are not available to the agent, see [Group chats](/help/group-chats).

### How to revoke access

Open the server on the **MCP servers** tab and click **Disconnect**. A token or permission granted in the service itself is revoked there.

### Troubleshooting

- **There's no MCP server at this URL**: check the address, it usually ends with /mcp.
- **The server isn't responding**: check the URL and try again.
- **The cloud can't connect to this address**: the server is reachable only on your network, use an address like http://localhost:port or an IP on that network and open the desktop app.
- **This server runs on your computer**: open the desktop app on it and try again.
- **This is a local server**: the config has a server with no address, run it with an http(s):// address.
- **Couldn't read this config**: check the JSON format.

## The service you need is not there

If the service has neither an API nor an MCP server, ask the team for an integration right from the chat: how to do it is on the [Connecting services](/help/integrations#when-the-service-you-need-is-missing) page.
