> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agi.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Clients

> Connection, transport, and client-specific issues.

## Connection times out or fails

* Confirm the server URL is exactly `https://api.agi.tech/v1/mcp`
* Some clients require the transport to be set to `http` or `sse`
  explicitly; try both
* For OAuth clients, clear saved authentication and reconnect to restart
  browser sign-in
* For API-key clients, confirm the custom `Authorization` header is present
* Claude Desktop cannot connect to remote URLs directly - see below

## Client-specific notes

### Claude Code

```bash theme={null}
claude mcp add --transport http agi-devices https://api.agi.tech/v1/mcp
```

* Complete sign-in via `/mcp`, verify with `claude mcp list`
* Claude Code stores and refreshes OAuth credentials; **Clear
  authentication** from `/mcp` switches accounts

### Claude Desktop

* `claude_desktop_config.json` only launches local (stdio) servers - a
  `url`-style entry will not work
* Bridge through [`mcp-remote`](https://www.npmjs.com/package/mcp-remote)
  (requires Node.js 18+), then restart Claude Desktop:

```json theme={null}
{
  "mcpServers": {
    "agi-devices": {
      "command": "npx",
      "args": ["mcp-remote", "https://api.agi.tech/v1/mcp"]
    }
  }
}
```

* If the browser does not open automatically during sign-in, copy the
  authorization URL from the bridge output

### Cursor

* Add the server to `.cursor/mcp.json` with the URL and an
  `Authorization: Bearer YOUR_API_KEY` header, then restart Cursor or
  refresh MCP servers from settings

### ChatGPT

* Requires developer mode under **Settings > Apps > Advanced settings**; a
  workspace administrator may need to enable access first
* Availability of full MCP actions is controlled by OpenAI and varies by
  plan and workspace

Full setup walkthroughs for every client are on the [Connect your AI client page](/android-mcp/connect).

## The client connects but tools look stale

* Reconnect the MCP server so the client calls `tools/list` again - the tool
  list changes when devices register or the app updates
* If a client caches old tool state (stale sessions, old tool names),
  disconnect and reconnect the server

## Verifying the connection independently

If you suspect the client, take it out of the loop: an unauthenticated request to the endpoint should return `401` with a `WWW-Authenticate` challenge - that confirms the server is reachable and speaking the protocol, and the problem is client configuration or credentials.

## Related

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/guides/troubleshooting/authentication">
    401s, scopes, and key problems
  </Card>

  <Card title="Devices & Connectivity" icon="mobile" href="/guides/troubleshooting/devices">
    When the connection works but no phone shows up
  </Card>
</CardGroup>
