Overview
Connectors are integrations that you configure once on your Project connectors page. Choose a managed connector from the catalog, or add a custom connector for your own remote Model Context Protocol (MCP) server. Perplexity stores the connection settings and credentials for your Project. Your application references the connector by ID, so it does not need to store or send the MCP server’s token with each request. You still use your Perplexity API key to authenticate Agent API requests. Any API key in the same Project can use the connector. Some managed connectors also make their credentials available to Sandbox commands. This lets an agent combine service access with code changes and other local work in one run.Managed connectors
The current set of connectors includes:Don’t see the connector you need? Email api@perplexity.ai to request it.
You can also add a custom connector for your own remote MCP server.
Add a managed connector
You must be a Project administrator to connect a service.- Open your Project connectors page.
- Select a service and complete its connection setup.
- Copy the connector ID from the service card.
- Use the connector in an Agent API request.
Add a custom connector
Register your remote MCP server once and let Perplexity store its API key. Your application only needs the connector ID to use the saved connection, with no separate MCP credential to manage in your application. Custom connectors are available to all Projects and require a Project administrator to set up. Open your Project connectors page and select Add custom connector. Add your server’s name, MCP URL, authentication (API Key or None), and transport (Streamable HTTP or SSE), then copy its connector ID. Use that ID withtype: "connector" in requests authenticated with an API key from the same Project.
The saved connection supplies the server URL and authentication.
Use a connector
Managed and custom connectors use the same request fields. Add aconnector entry to the tools array.
Connector tools use deferred discovery by default.
Set
max_steps high enough to discover and use them.output array lists the connector’s tools, the model’s search of that catalog, each tool call, and the final message.
Connectors are deferred by default, so the model searches the catalog (tool_search_output) before it calls a tool.
Response output (truncated)
Response output (truncated)
Deferred tool discovery
A connector can expose many tools, and loading every schema up front would waste tokens. Connector tools are discovered lazily instead: the model receives the connector namespace, searches it, loads only the schemas it needs, and calls them — all automatically. You only add the connector totools.
The mcp_list_tools item still records the full catalog; deferred discovery controls what enters the model’s context, not what the response reports.
Connector parameters
Use connectors in the sandbox
Some connectors make their credentials available to sandbox commands. GitHub is a key example.GitHub connector
The GitHub connector lets the model use the GitHub tools that belong to your connected GitHub account. You can use it in two ways.Connector only
Without the sandbox, GitHub works like any other connector: the model discovers tools from the GitHub catalog and calls them asmcp_call items.
The catalog covers repositories, files, commits, issues, and pull requests.
For example, get_file_contents reads the current contents of a file by owner, repo, and path, or lists a directory when path points to a folder.
Pass ref to read from a specific branch, tag, or commit; without it, the tool reads the default branch.
Use this mode for targeted lookups, such as reading a file, checking a commit, or listing pull requests, when you want each call recorded in the response.
To see the full tool set, send a request with only the connector and read the mcp_list_tools item in the output.
Connector with the sandbox
Pair the connector with Sandbox when the task needs thegit or gh CLI.
With both tools enabled, the agent can clone private repositories, read and search files, diff branches, change code, commit, push a branch, and create or update a pull request.
It uses the git and gh CLIs in the sandbox with the GitHub credentials from the connector.
The agent can access only repositories and perform only actions that your connected GitHub account permits.
With the sandbox enabled and no allowed_tools, GitHub runs through the CLIs: the response has sandbox_results items instead of mcp_list_tools or mcp_call items, and failures appear as git or gh output.
Set allowed_tools or omit the sandbox to use GitHub as a regular connector with mcp_call items.
What to expect
The sandbox is a general-purpose execution environment, not a dedicated coding agent. It is a good fit for scoped repository tasks that complete in one run: read or review a set of files, explain a diff, make a focused change, or open a pull request. Repository-wide code review and multi-stage development work that depends on a persistent development environment, project-specific test setup, or long iteration loops are outside what a single sandbox run is designed for. For that kind of work, split it into scoped requests and give each one a clear, verifiable outcome.Connectors and MCP
Both connectors and MCP servers let the Agent API call external tools. Use a managed or custom connector to reuse a connection configured for your Project. Use MCP to provide a remote server’s URL and authentication in each request.Error handling
A connector tool call can fail as anmcp_call item with an error field.
This does not fail the request: the run continues and the error is passed to the model in-band, so the model still answers — it just cannot use that connector.
The main case to handle is AUTH_REQUIRED: the connector’s authorization went stale or an administrator revoked it.
Your requests keep working — the connector is just unavailable to the model until it is reconnected, which you can do later.
For example:
error value:
The
error field is a free-form string, so treat any other value as a tool failure.
A connector that is not connected lists no tools ("tools": []) and produces no error, so also watch for an empty tool list.
Next steps
MCP
Connect a remote MCP server that you manage.
Sandbox
Run code and use the GitHub connector with
git and gh.