Use a connector

Last validated:

Use connectors to let your agents call tools and query APIs through Aperture. To add a connector and grant access as an admin, refer to get started with connectors.

Prerequisites

Before you use a connector, make sure that you have the following:

  • A connector that is available to you. An admin must configure verified, custom, and built-in connectors. The aperture system connector is always present.
  • A grant for the connector. You need a grant for each tool or proxy path that you use.

Aperture Chat does not show a configured connector unless you have a matching grant, even if you are an admin.

Aperture shows a not-found page for a connector that your grants deny. This page is the same as for a connector that does not exist. If you are not an admin, a verified connector that you have no grant for can appear under Requires admin setup, as if it were not configured. If a connector or tool is missing, ask your admin to check your connector and tool grants.

Check a connector's status

To check your connectors, open Connectors in the Aperture Chat portal. Aperture groups the connectors into sections. The built-in aperture system connector appears first in the list. The following table shows what each section and indicator means, and what to do:

Chat displayMeaningAction
Ready to use, with a Ready badgeYou have access and the required authorization.Select the connector to review its tools.
Connect to use, with a Connect buttonYou have access, but you have not authorized this per-user connector.Select Connect and give consent.
Connect to use, with a Reconnect buttonYour authorization needs renewal. The detail page shows a Needs reconnect badge.Select Reconnect and give consent again.
Temporarily unavailableAperture cannot read your authorization state at this time.Reload the page later. Do not reconnect.
Requires admin setupAn admin has not configured this connector, or you have no grant for it.Ask your admin to configure the connector or grant you access.

Ready confirms access and authorization. It does not confirm that the upstream service is reachable.

If the provider does not issue a refresh token, a new authorization stays Ready until shortly before its access token expires.

Authorize a per-user connector

A connector that uses per-user OAuth, including dynamic client registration, needs authorization from each user. Use Aperture Chat to connect, reconnect, and disconnect. For the authorization flow and token lifecycle, refer to connector authentication.

To authorize a per-user connector:

  1. Open Connectors in Aperture Chat.
  2. Under Connect to use, select Connect on the connector's row or on its detail page.
  3. Sign in to the provider.
  4. Give consent.

Aperture then returns you to the page in Aperture Chat where you started, and the connector shows Ready. If you do not finish within 15 minutes, the authorization expires. Select Connect again to start over.

After authorization, Aperture runs tool discovery. Tool discovery requests your tool list from the upstream service with your credentials. If the upstream is slow or unreachable, your tools might not appear immediately. To load them, refer to review or refresh MCP tools.

Review or refresh MCP tools

To review the tools of an MCP connector, select a connector that shows Ready. The detail page groups tools under Interactive tools, Read-only tools, and Write/Delete tools.

To get the current tools from the upstream service, select Refresh tools. This button appears only for MCP connectors that show Ready. If the refresh fails, Aperture shows Couldn't refresh tools. The connector still shows Ready, because the status describes access and authorization, not upstream health.

Discover and call tools

Your agent reaches a connector's capabilities through Aperture. You can list and call only the tools that your grants permit.

Send requests from a device in your tailnet. Aperture identifies you from your Tailscale connection, so you do not need an API token. Use one of the following methods:

  • MCP tools in chat or agent clients: For a per-user connector, authorize the connector first. When the connector shows Ready, its tools appear in your client automatically. If tools are missing, refresh the MCP tools.

  • MCP tools in a custom MCP client: Point your client at the Aperture /v1/mcp endpoint. Aperture adds the connector ID and an underscore to the front of each tool name from a verified or custom connector. For example, Aperture exposes a search tool from the github connector as github_search. Each upstream defines its own tool arguments. To find the arguments of a tool, read its inputSchema in the tool list.

  • HTTP APIs: Send requests to /v1/connectors/<id>/<path>. Aperture adds the connector's credentials automatically.

Call MCP tools with curl

The following example uses curl to list tools and call the aperture_list_connectors tool. This tool lists the HTTP connectors that you can reach. It appears only if an HTTP connector is configured and you have a grant for aperture/tools/list_connectors or label:system. In the following commands, set APERTURE_HOST to your Aperture gateway's MagicDNS name, such as the hostname in your browser's address bar when you open Aperture Chat.

The /v1/mcp endpoint requires an MCP session. The following commands start a session, confirm it, and list the tools in it. Set APERTURE_HOST to your Aperture gateway's hostname, then copy and run all of them at once.

# Replace <aperture-hostname> with your Aperture gateway's MagicDNS name.
APERTURE_HOST="<aperture-hostname>"

# 1. Start a session and capture the session ID from the Mcp-Session-Id response header.
SESSION_ID=$(curl -sS -D - -o /dev/null "http://$APERTURE_HOST/v1/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "curl", "version": "1.0"}}}' \
  | awk 'tolower($1) == "mcp-session-id:" {print $2}' | tr -d '\r')

# 2. Confirm the session.
curl -sS "http://$APERTURE_HOST/v1/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{"jsonrpc": "2.0", "method": "notifications/initialized"}'

# 3. List the tools in the session.
curl -sS "http://$APERTURE_HOST/v1/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}'

Aperture returns the tools/list response as a text/event-stream event. The data: line holds the JSON-RPC response, and the tools are under result.tools.

If the request fails, the JSON-RPC object contains error instead of result.

If aperture_list_connectors is in the tool list, call it in the same session to list the HTTP connectors that you can reach:

curl -sS "http://$APERTURE_HOST/v1/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  -d '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "aperture_list_connectors", "arguments": {}}}'

The output is in result.content. The following example shows the data: payload for a gateway with a github HTTP connector that you have access to:

{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Aperture HTTP API Connectors\n============================\nThe following HTTP APIs are available through authenticated proxy endpoints.\nAperture handles all authentication automatically.\n\nBase URL: http://ai.example.ts.net\nMake requests to {Base URL}/v1/connectors/{id}/{path}\n\nAvailable connectors:\n\n## github\n- Endpoint: http://ai.example.ts.net/v1/connectors/github/\n- Upstream: https://api.github.com\n"
      }
    ]
  }
}

The list includes only the connectors that you can reach, not every configured connector. If the list is empty, ask your admin to check your proxy grants.

To call a different tool, use its prefixed name and the arguments from its inputSchema. Do not copy the empty arguments object from this example.

Call an HTTP API with curl

In the following example, an admin configured an HTTP connector with the ID github and the upstream URL https://api.github.com. The request gets the authenticated GitHub account from /user:

curl -i http://<aperture-hostname>/v1/connectors/github/user

For a different API, replace github with the connector ID and user with the API path. If the GitHub credential is valid and you have a github/proxy grant, the request returns HTTP 200 and account JSON with a login field. If Aperture returns 403 Forbidden, refer to HTTP connector returns 403 Forbidden. The result depends on the upstream API and its permissions.

Reconnect when tools stop working

If a connector shows Ready but tool calls fail, check the error before you reconnect. Upstream outages, network timeouts, and rate limits can cause failures while your authorization is valid. For a temporary failure, try again later. For other problems, refer to these troubleshooting sections:

If the provider revokes your refresh token, or your access token expires and no refresh token exists, the connector moves to Connect to use and shows Reconnect. To renew your authorization:

  1. Open Connectors in Aperture Chat.
  2. Select Reconnect on the connector's row or on its detail page.
  3. Give consent to the provider.

If you must reconnect again after each access token expires, ask your admin to check the provider's offline-access settings.

Some configuration changes affect your authorization:

  • A change to the connector's OAuth settings, such as scopes or offline access, does not update your existing authorization. To use the new settings, disconnect the connector and connect it again.
  • If an admin removes the connector, changes its provider, or changes its authentication type, Aperture deletes all stored authorizations for it. Each user must select Connect again.

Disconnect a connector

Disconnect deletes your stored authorization and cached tool list for a connector. It does not affect other users. Do not disconnect only because a tool call failed while the connector shows Ready.

To disconnect a connector:

  1. Open the connector's detail page in Aperture Chat.
  2. Select Disconnect.
  3. To confirm, select Disconnect again.

Disconnect appears only for per-user connectors that show Ready. To use the connector again, select Connect and give consent.

For more information, refer to these topics: