# AgentLine MCP

Use MCP only when the user or harness already wants MCP tools. REST stays the
default path.

Server:

```text
https://api.agentline.cloud/mcp
```

## Claude

claude.ai, Claude Desktop, and Cowork: **Customize → Connectors**, connect
AgentLine (or **Add custom connector** with the server URL), sign in, choose
**Read and write** or **Read only**, keep **Stay connected for 30 days** on,
press **Allow**.

Claude Code:

```bash
claude mcp add --transport http agentline https://api.agentline.cloud/mcp
```

Then run `/mcp` and choose **Authenticate**. OAuth needs no API key.

## Other Clients

Clients without MCP OAuth use `mcp-remote` with a Bearer key:

```json
{
  "mcpServers": {
    "agentline": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.agentline.cloud/mcp",
        "--header",
        "Authorization: Bearer $AGENTLINE_API_KEY"
      ]
    }
  }
}
```

PowerShell uses `$env:AGENTLINE_API_KEY`. A prepaid `agent_token` also works as
the Bearer token. On a consent page without a browser login, choose **Use an
API key instead** and paste the `al_live_` key.

Never put the key in a URL.

## Tools

The server exposes the agent-facing REST operations as 21+ tools, including
`create_agent`, `buy_phone_number`, `make_outbound_call`,
`get_call_transcript`, `hangup_call`, `push_call_context`, `list_messages`,
`poll_events`, `set_webhook`, `get_account_balance`, and
`release_phone_number`. Tool names match the operation IDs in the
OpenAPI (https://api.agentline.cloud/openapi.json); see
https://agentline.md/api.md

`release_phone_number` is destructive and cannot be undone. Use it only when the
human asks.

## Permissions

| Grant | Allows |
|---|---|
| Read only | List and get agents, numbers, calls, transcripts, messages, balance, spend, voices, webhooks, feedback. Peek events. |
| Read and write | All of the above, plus create, update, delete agents; buy and release numbers; place and hang up calls; push context; consume events; set, test, delete webhooks; change account voice; submit feedback. |

## Troubleshooting

| Symptom | Fix |
|---|---|
| Reconnect prompt after about an hour | Reconnect with **Stay connected for 30 days** on. |
| `Read Only connection cannot modify data` | Revoke in the dashboard; reconnect with **Read and write**. |
| `Insufficient balance` | Add credit, then retry. |
| "This sign-in request expired" | Over 10 minutes passed. Start the connection again. |

Revoke a Claude connection at
https://agentline.cloud/dashboard/privacy

AgentLine: https://agentline.cloud | API: https://api.agentline.cloud | All guides: https://agentline.md
