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

# Connect an MCP client

> Connect a custom MCP client to Consile over Streamable HTTP: directly, through an SDK, or via mcp-remote.

Any MCP-compatible client can connect to Consile. The client just needs to speak
**Streamable HTTP** and **OAuth**. Everything else is handled automatically via
standard MCP authorization (see [Authentication](/developers/authentication)).

<Info>
  If you use Claude or ChatGPT, use the consumer flow instead:
  [Connect Claude](/connect/forbind-claude). This is for your own clients.
</Info>

## Option 1: an MCP-aware client

Clients that already speak MCP (e.g. desktop AI apps with custom connectors) only
need a connector's URL from the portal. Each connector is its own endpoint, and
`/mcp` is the [Concierge](/developers/concierge). They discover the authorization
server themselves, take you through login, and store your token.

```
https://mcp.consile.ai/gsc/mcp
```

## Option 2: mcp-remote (stdio → remote bridge)

Clients that can only run local stdio servers can bridge to Consile with
`mcp-remote`. It opens the browser for OAuth the first time and caches your token:

```json theme={null}
{
  "mcpServers": {
    "consile": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.consile.ai/gsc/mcp"]
    }
  }
}
```

## Option 3: programmatically via an MCP SDK

Use an official MCP SDK with a Streamable HTTP transport and an OAuth provider.
Once connected, the flow is the standard MCP handshake:

<Steps>
  <Step title="initialize">
    Negotiate protocol version and capabilities.
  </Step>

  <Step title="tools/list">
    Fetch the tools your account can access (depends on subscription).
  </Step>

  <Step title="tools/call">
    Call a tool with its arguments. See the
    [API reference](/developers/tools/gsc).
  </Step>
</Steps>

### Example: raw JSON-RPC

A `tools/call` request over `POST /gsc/mcp` (abbreviated; the
`Authorization: Bearer <token>` header is omitted here). Note `gsc__top_queries` is a
GSC tool, so it goes to the **GSC** endpoint, not the aggregate `/mcp`. Tool names on
a per-connector endpoint are namespaced `connector__tool`:

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "gsc__top_queries",
      "arguments": {
        "siteUrl": "sc-domain:example.com",
        "startDate": "2026-05-01",
        "endDate": "2026-05-28",
        "limit": 10
      }
    }
  }
  ```

  ```json Result (payload) theme={null}
  {
    "siteUrl": "sc-domain:example.com",
    "startDate": "2026-05-01",
    "endDate": "2026-05-28",
    "queries": [
      { "query": "example keyword", "clicks": 421, "impressions": 9120, "ctr": 0.046, "position": 7.8 }
    ]
  }
  ```
</CodeGroup>

<Note>
  If you call a connector endpoint without a valid token, you get `401` with a
  `WWW-Authenticate` header pointing to the discovery document. That's the normal
  starting point for OAuth. See [Authentication](/developers/authentication).
</Note>
