# Quickstart

> Connect Claude, ChatGPT, Claude Code, Cursor, OpenClaw, Hermes or any MCP agent to Xholic in a minute, or make your first API call with an API key.

Source: https://docs.xholic.ai/quickstart/

You need an Xholic account with an active plan or trial and at least one connected X account. Everything below works on every plan.

## Connect your AI (MCP)

The server URL is the same everywhere:

```text
https://api.xholic.ai/mcp
```

Clients that support OAuth open the Xholic sign-in and consent screen the first time you use it. Read and Write are ticked and Publish starts off; pick the X accounts it can use, then approve. When your AI first needs to post, it gives you a link to allow that in one click.

### Claude

Add a custom connector in Claude's settings (**Connectors → Add custom connector**), paste the URL, and click **Connect**. Then ask something like *"What happened on my X account this week?"*.

### ChatGPT

Add the URL as a custom connector (an app backed by an MCP server) in ChatGPT's settings, then sign in when ChatGPT asks.

### Claude Code

```bash
claude mcp add --transport http xholic https://api.xholic.ai/mcp
```

Then run `/mcp` inside Claude Code and pick **xholic** to sign in.

### Cursor

Add Xholic to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project):

```json
{
  "mcpServers": {
    "xholic": { "url": "https://api.xholic.ai/mcp" }
  }
}
```

### VS Code

Add it to `.vscode/mcp.json`:

```json
{
  "servers": {
    "xholic": { "type": "http", "url": "https://api.xholic.ai/mcp" }
  }
}
```

### Clients without OAuth

Send an API key as a header instead. For example, in Claude Code:

```bash
claude mcp add --transport http xholic https://api.xholic.ai/mcp \
  --header "Authorization: Bearer $XHOLIC_API_KEY"
```

Or in a JSON config:

```json
{
  "mcpServers": {
    "xholic": {
      "url": "https://api.xholic.ai/mcp",
      "headers": { "Authorization": "Bearer xhk_your_key" }
    }
  }
}
```

**Try these first:**
"Catch me up on my X account." · "Write three posts about what's working in my niche and schedule the best one for tomorrow morning." · "Who should I reply to today?"


## Call the REST API

1. In Xholic, open **Settings → API / MCP / CLI** and create an API key. Pick its scopes and the X accounts it can use. The key (`xhk_…`) is shown once; store it as a secret.
2. Read your profile:

```bash
export XHOLIC_API_KEY="xhk_your_key"

curl https://api.xholic.ai/v1/me/get \
  -H "Authorization: Bearer $XHOLIC_API_KEY"
```

3. Schedule a post (needs the `publish` scope):

```bash
curl https://api.xholic.ai/v1/posts/schedule \
  -H "Authorization: Bearer $XHOLIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Shipping beats planning. Every time.",
    "scheduledAt": "2026-11-03T09:00",
    "timezone": "Europe/London",
    "idempotencyKey": "launch-post-001"
  }'
```

Every response starts with a readable `summary`, then `data`. Add `"dryRun": true` to any change to see what would happen without doing it. See [Responses and errors](/api/responses/).

Prefer clicking? The [API playground](/api/playground/) runs any call from your browser with your key, in any of nine languages, and every change starts as a dry run. Each page of the [REST API reference](/api/reference/) has a **Try it** button that opens its call there.

## Use the CLI

```bash
npm i -g xholic
xholic login            # opens the browser to sign in
xholic me get
xholic posts schedule --text "Shipping beats planning." \
  --scheduled-at 2026-11-03T09:00 --timezone Europe/London
```

In CI, set `XHOLIC_API_KEY` instead of logging in. See [CLI](/cli/).

## Next

- [Authentication](/api/authentication/): keys, OAuth, scopes and accounts
- [MCP tools](/mcp/tools/): what your AI can do
- [Credits](/api/credits/): what costs anything, and the quote flow
- [Webhooks](/webhooks/): get events pushed to your server
