View as Markdown

Threads Integration

Publish Threads posts and manage media, replies, conversations, and keyword search

The Threads integration provides access to publish Threads posts and manage media, replies, conversations, and keyword search through the Integrate MCP server.

Installation

The Threads integration is included with the SDK:

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

Setup

1. Create a Threads OAuth App

  1. Go to Threads Developer Portal
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Threads integration to your server configuration. The integration automatically reads THREADS_CLIENT_ID and THREADS_CLIENT_SECRET from your environment variables:

import { createMCPServer, threadsIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    threadsIntegration({
      scopes: ["threads_basic", "threads_content_publish", "threads_read_replies", "threads_manage_replies", "threads_manage_insights", "threads_keyword_search", "threads_profile_discovery", "threads_manage_mentions"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

threadsIntegration({
  clientId: process.env.CUSTOM_THREADS_ID,
  clientSecret: process.env.CUSTOM_THREADS_SECRET,
      scopes: ["threads_basic", "threads_content_publish", "threads_read_replies", "threads_manage_replies", "threads_manage_insights", "threads_keyword_search", "threads_profile_discovery", "threads_manage_mentions"], // 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("threads");
const result = await client.threads.getMe({});
 
console.log(result);

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

import { createMCPClient, threadsIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [threadsIntegration()],
});

Configuration Options

export interface ThreadsIntegrationConfig {
  clientId?: string;

Default Scopes

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

  • threads_basic
  • threads_content_publish
  • threads_read_replies
  • threads_manage_replies
  • threads_manage_insights
  • threads_keyword_search
  • threads_profile_discovery
  • threads_manage_mentions

Tools

threads_get_me

Get me

export type ThreadsGetMeParams = Record<string, unknown>;

threads_list_user_media

List user media

export type ThreadsListUserMediaParams = Record<string, unknown>;

threads_get_media

Get media

export type ThreadsGetMediaParams = Record<string, unknown>;

Keyword search

export type ThreadsKeywordSearchParams = Record<string, unknown>;

threads_create_media_container

Create media container

export type ThreadsCreateMediaContainerParams = Record<string, unknown>;

threads_publish_media_container

Publish media container

export type ThreadsPublishMediaContainerParams = Record<string, unknown>;

threads_get_container_status

Get container status

export type ThreadsGetContainerStatusParams = Record<string, unknown>;

threads_list_replies

List replies

export type ThreadsListRepliesParams = Record<string, unknown>;

threads_get_conversation

Get conversation

export type ThreadsGetConversationParams = Record<string, unknown>;

threads_manage_reply

Manage reply

export type ThreadsManageReplyParams = Record<string, unknown>;

threads_repost

Repost

export type ThreadsRepostParams = Record<string, unknown>;

threads_delete_media

Delete media

export type ThreadsDeleteMediaParams = Record<string, unknown>;

Notes

  • Category: Social Media
  • Authentication mode: OAuth