IntegrateIntegrate
Integrations

X Integration

Manage X users, posts, timelines, likes, bookmarks, follows, and posting

The X integration provides access to manage X users, posts, timelines, likes, bookmarks, follows, and posting through the Integrate MCP server.

Installation

The X integration is included with the SDK:

import { xIntegration } from "integrate-sdk/server";

Setup

1. Create a X OAuth App

  1. Create an OAuth application for X
  2. Configure your redirect URI
  3. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the X integration to your server configuration. The integration automatically reads X_CLIENT_ID and X_CLIENT_SECRET from your environment variables:

import { createMCPServer, xIntegration } from "integrate-sdk/server";

export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    xIntegration({
      scopes: ["tweet.read", "tweet.write", "users.read", "follows.read", "follows.write", "like.read", "like.write", "bookmark.read", "bookmark.write", "offline.access"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

xIntegration({
  clientId: process.env.CUSTOM_X_ID,
  clientSecret: process.env.CUSTOM_X_SECRET,
      scopes: ["tweet.read", "tweet.write", "users.read", "follows.read", "follows.write", "like.read", "like.write", "bookmark.read", "bookmark.write", "offline.access"], // Optional
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";

await client.authorize("x");
const result = await client.x.getMe({});

console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, xIntegration } from "integrate-sdk";

const customClient = createMCPClient({
  integrations: [xIntegration()],
});

Configuration Options

Prop

Type

Default Scopes

These defaults are applied unless you override scopes in the integration config:

  • tweet.read
  • tweet.write
  • users.read
  • follows.read
  • follows.write
  • like.read
  • like.write
  • bookmark.read
  • bookmark.write
  • offline.access

Tools

x_get_me

Get me

Prop

Type

x_get_user

Get user

Prop

Type

x_search_posts

Search posts

Prop

Type

x_get_user_timeline

Get user timeline

Prop

Type

x_create_post

Create post

Prop

Type

x_delete_post

Delete post

Prop

Type

x_like_post

Like post

Prop

Type

x_get_bookmarks

Get bookmarks

Prop

Type

x_follow_user

Follow user

Prop

Type

Notes

  • Category: Social Media
  • Authentication mode: OAuth

On this page