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

# X

> Give the Sazabi agent tools to search posts and access real-time X data from your X developer app.

[All X integration capabilities](https://docs.sazabi.com/catalogs/integrations/x)

## About

This is an MCP connector that gives the Sazabi agent tools from X's hosted MCP server at `https://api.x.com/mcp`. X does not support OAuth dynamic client registration for this server, so you supply your app's app-only Bearer Token, which Sazabi sends in the `Authorization` header. The hosted server runs in app-only mode: the agent can search and read X data, but cannot post or act as a user.

**What the agent can do:**

* Search X posts and retrieve real-time data
* Look up users, posts, and engagement metadata
* Browse user timelines, mentions, and trends

## Prerequisites

* An X Developer account with API access
* An X app with an app-only Bearer Token (from Keys and tokens)

## Set up in the dashboard

Configure connectors in the dashboard under [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Step 1**

### Open the connector

Find X in [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Step 2**

### Add your Bearer Token

Go to the [X Developer Portal](https://developer.x.com/en/portal/dashboard), open the project and app you want Sazabi to use, and confirm the app has access to the API tiers you need. In your app's **Keys and tokens**, find the app-only **Bearer Token** and copy it (regenerate it if you don't have it saved). Sazabi stores it securely and sends it as `Authorization: Bearer <token>` to X's hosted MCP endpoint (`https://api.x.com/mcp`).

## Set up with the CLI

X authenticates with an app-only Bearer Token. With the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) installed and authenticated (see [`sazabi mcp-connectors` reference](https://docs.sazabi.com/reference/cli/mcp-connectors)), connect it in one command, passing the credential as a header:

```bash theme={"system"}
sazabi mcp-connectors connect x --header "Authorization=Bearer <access-token>"
```

The CLI connects to the MCP server at once and prints the connection with the tools it discovered; a credential the server rejects is reported, and the connection is left needing attention. Use `NAME=@<file>` to read a value from a file, or `--header-file <file.json>` for a JSON object of header names and values. To rotate the stored credentials later, use `sazabi mcp-connectors update-credentials <connection-id>`; find the connection ID with `sazabi mcp-connectors list`.

## Verify

Open the connector's connection page under [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors) and confirm Sazabi lists the tools it discovered. Then, in a thread, ask the agent to use one of those tools and confirm it runs. If no tools appear, confirm the Bearer Token is correct.

## Troubleshooting

**No tools discovered** — Confirm the app-only Bearer Token is valid and has not been regenerated since you last connected. Re-enter it from [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Connection shows needs attention** — The authorization or key may have expired or been revoked; reconnect from [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

## Further reading

> [card] [Agent tools](https://docs.sazabi.com/guides/investigate/agent-tools.md)
>
> How the agent uses connector tools.

> [card] [MCP connectors](https://docs.sazabi.com/catalogs/mcp-connectors.md)
>
> Browse the connector catalog.


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