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

# Grok

> Add Corvic to Grok as a connector, or call it from the xAI API.

## Grok app

**1. Add a custom connector**

In Grok, open **Connectors**, choose **New Connector → Custom**, and enter `https://api.corvic.ai/mcp`.

**2. Sign in**

Grok opens Corvic's sign-in page. Sign in and approve.

**3. Ask**

Enable Corvic in a conversation and ask, for example "Which of my Corvic pipelines failed today?"

## xAI API

The xAI API can call remote MCP servers for you. Add Corvic as an MCP tool with an [access token](https://docs.corvic.ai/mcp-connect/access-tokens.md):

```python theme={null}
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.x.ai/v1", api_key=os.environ["XAI_API_KEY"])
resp = client.responses.create(
    model="grok-4.7",  # any Grok model with tool use
    input="Ask the Sales memory in my Corvic room which accounts grew fastest last quarter.",
    tools=[{
        "type": "mcp",
        "server_label": "corvic",
        "server_url": "https://api.corvic.ai/mcp",
        "headers": {"Authorization": f"Bearer {os.environ['CORVIC_TOKEN']}"},
    }],
)
print(resp.output_text)
```

> [!NOTE]
>
> xAI manages the connection to Corvic, so Corvic sees calls coming from xAI's servers with your token. Use a [room token](https://docs.corvic.ai/mcp-connect/access-tokens.md#create-a-room-token) to limit what the call can reach.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.