# Connect yourself to AgentCall

You are an AI agent. AgentCall lets you reach your human by phone when you
hit a decision, approval, or notification that warrants their attention — you
call `request_human`, their phone rings, you talk it through, you resume. It is
an MCP server. Find the section for your client below, follow it, then confirm
the tools loaded.

- Endpoint: https://agentcall.io/api/mcp
- Transport: Streamable HTTP
- Tool-call timeout: 60 seconds works — no tool holds one call longer than about 50 seconds (it answers
  `ringing`, `listening` or `pending: "none"` and you call again) — but 300 seconds is better where you can set it.
- Stay reachable: if you can run shell commands in the background, call `watch_for_calls` once per
  session and run the command it returns in the background.

Two ways to authenticate, and which one you use is a fact about your client, not
a choice: **Claude Code and Codex** sign in through the browser (OAuth), and
your human completes that sign-in. **Every other client** sends a fixed
`Authorization: Bearer <TOKEN>` header — this server offers no dynamic client
registration, so those clients' own OAuth cannot complete here. Where a token is
needed, ask your human to create one; never invent, guess, or reuse a credential.

# Browser sign-in (OAuth)

## Claude Code

Run once (adds it across your projects):

    claude mcp add --transport http --scope user agentcall https://agentcall.io/api/mcp

Then start a session, run /mcp, and complete the browser sign-in when prompted. Claude Code stores and refreshes the tokens for you.

## Codex CLI

~/.codex/config.toml:

    [mcp_servers.agentcall]
    url = "https://agentcall.io/api/mcp"
    tool_timeout_sec = 300

Authenticate once:

    codex mcp login agentcall

Codex support is in beta; the conversation flow is tested primarily with Claude Code. Needs a recent Codex build (remote HTTP MCP is native now).

# Connect with a token

## Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project):

    {
      "mcpServers": {
        "agentcall": {
          "url": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          }
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Cursor" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

Some Cursor versions cap a tool call at ~60 seconds; AgentCall answers every call within about 50 seconds and the agent calls again to keep waiting, so that cap is fine. Cursor's own OAuth needs dynamic client registration, which this server doesn't offer — use the token.

## VS Code (Copilot)

.vscode/mcp.json:

    {
      "servers": {
        "agentcall": {
          "type": "http",
          "url": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          }
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "VS Code (Copilot)" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

VS Code's own file uses the "servers" key and needs "type": "http"; a portable .mcp.json uses "mcpServers" instead. MCP is GA since VS Code 1.102 — use a recent build.

## Windsurf

~/.codeium/windsurf/mcp_config.json:

    {
      "mcpServers": {
        "agentcall": {
          "serverUrl": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          }
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Windsurf" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

The field must be "serverUrl" — a Cursor-style "url" is silently ignored. Windsurf exposes no tool-call timeout setting, so a very long call may hit its built-in limit.

## Cline

Cline → MCP Servers → Remote, or cline_mcp_settings.json:

    {
      "mcpServers": {
        "agentcall": {
          "type": "streamableHttp",
          "url": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          },
          "timeout": 300
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Cline" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

The type is camelCase "streamableHttp". The timeout is in seconds (max 3600). Pin to a current Cline build — remote server support has had rough edges on older ones.

## Gemini CLI

~/.gemini/settings.json:

    {
      "mcpServers": {
        "agentcall": {
          "httpUrl": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          },
          "timeout": 600000
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Gemini CLI" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

The remote key is "httpUrl" (a plain "url" is treated as SSE). The timeout is in milliseconds.

## Grok CLI

Add it with the CLI:

    grok mcp add --transport http agentcall https://agentcall.io/api/mcp --header "Authorization: Bearer <TOKEN>"

Or ~/.grok/config.toml:

    [mcp_servers.agentcall]
    url = "https://agentcall.io/api/mcp"
    headers = { "Authorization" = "Bearer <TOKEN>" }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Grok CLI" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

Grok also supports OAuth (a browser flow on first use), but this server offers no dynamic client registration, so if that sign-in doesn't complete, the token above is the reliable path. Grok's default tool timeout already exceeds the 4-minute call window.

## Zed

~/.config/zed/settings.json:

    {
      "context_servers": {
        "agentcall": {
          "url": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          }
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Zed" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

Zed nests MCP servers under "context_servers", not "mcpServers". It has no tool-call timeout setting, so a very long call may hit its internal limit. Needs a recent Zed build.

## Antigravity

~/.gemini/antigravity/mcp_config.json:

    {
      "mcpServers": {
        "agentcall": {
          "serverUrl": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          }
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Antigravity" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

Antigravity's remote servers authenticate with a fixed header — the field is serverUrl.

## Any other MCP client

Your client's MCP config:

    {
      "mcpServers": {
        "agentcall": {
          "url": "https://agentcall.io/api/mcp",
          "headers": {
            "Authorization": "Bearer <TOKEN>"
          }
        }
      }
    }

Replace `<TOKEN>` with a token your human creates in AgentCall: Settings → Connections → choose "Any other MCP client" → **Create a token** (https://agentcall.io/settings#connect). Never invent or reuse a token.

Set the client's per-tool timeout to at least 300 seconds. Some clients can also sign in with OAuth 2.1 + PKCE, but this server doesn't offer dynamic client registration, so a token is the path that always works.

# Confirm it worked

After connecting, these tools should be available: `request_human`,
`check_in`, `converse`, `say`, `stand_by`, `end_call`,
`leave_voicemail`. Call `check_in` at a natural task boundary to verify the
connection; if it returns `call_requested`, call `request_human` and take the
call. Queued audio is not proof it was heard — listen for the human's reply.

# Optional — Claude Code check-in hook

Merge into your project's `.claude/settings.json` so each turn ends with a
check-in, and a callback your human requests reaches you within one turn:

    {
      "hooks": {
        "Stop": [
          {
            "hooks": [
              {
                "type": "command",
                "command": "input=$(cat); case \"$input\" in *'\"stop_hook_active\":true'*|*'\"stop_hook_active\": true'*) exit 0;; esac; grep -qs '\"agentcall\"' \"$HOME/.claude.json\" .mcp.json || exit 0; printf '%s' '{\"decision\":\"block\",\"reason\":\"Before you stop, call the agentcall check_in tool once, with project set to this repo directory name. If it returns call_requested, call request_human and take the call. If it returns none, stop.\"}'"
              }
            ]
          }
        ]
      }
    }
