# Threads

```json
{
  "name": "Threads",
  "slug": "threads",
  "url": "https://composio.dev/toolkits/threads",
  "markdown_url": "https://composio.dev/toolkits/threads.md",
  "logo_url": "https://logos.composio.dev/api/threads",
  "categories": [
    "social media"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-10-25T05:35:47.201Z"
}
```

![Threads logo](https://logos.composio.dev/api/threads)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Threads MCP or direct API to publish posts, manage replies, discover public content, and analyze profile performance through natural language.

## Summary

Threads is Meta's social network for publishing posts, managing replies, discovering content, and tracking performance.
It helps creators and brands engage audiences and measure what resonates.

## Categories

- social media

## Toolkit Details

- Tools: 24

## Images

- Logo: https://logos.composio.dev/api/threads

## Authentication

- **Oauth2**
  - Type: `oauth2`
  - Description: Oauth2 authentication for Threads.
  - Setup:
    - Configure Oauth2 credentials for Threads.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Publish today's product update on Threads
- Find public Threads posts about product launches
- Analyze engagement on my recent Threads posts

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `THREADS_CREATE_AND_SHARE_POST` | Create and Share Post | Create and publish a top-level Threads post and cross-share it to the linked Instagram account as a Story. Returns crossreshare_to_ig_status to report whether the Story cross-share succeeded independently of Threads publication. |
| `THREADS_CREATE_POST` | Create Post | Create and publish a top-level Threads text, image, video, carousel, quote, poll, ghost, GIF, or text-attachment post, optionally with a location tag. |
| `THREADS_CREATE_REPLY` | Create Reply | Create and publish a reply to a Threads post, including a text, image, video, carousel, quote, poll, GIF, or text-attachment reply. |
| `THREADS_DELETE_POST` | Delete Post | Permanently delete a Threads post owned by the connected profile. |
| `THREADS_GET_LOCATION` | Get Location | Retrieve one Threads location by ID for inspection or post tagging. |
| `THREADS_GET_MY_PROFILE` | Get My Profile | Return the connected or app-scoped Threads user's profile and identity fields. |
| `THREADS_GET_POST` | Get Post | Retrieve one Threads post by ID. Third-party posts may be unavailable until the Meta app has advanced access. |
| `THREADS_GET_POST_EMBED` | Get Post Embed | Return embeddable HTML and oEmbed metadata for a public Threads post. |
| `THREADS_GET_POST_INSIGHTS` | Get Post Insights | Return selected lifetime engagement metrics for one post owned by the connected Threads profile. |
| `THREADS_GET_PROFILE_INSIGHTS` | Get Profile Insights | Return one time-window page of selected profile time-series, totals, link clicks, follower counts, or follower demographics for a Threads profile. |
| `THREADS_GET_PUBLISHING_LIMITS` | Get Publishing Limits | Return current usage and configured quota for Threads posts, replies, deletes, location searches, or all publishing categories. |
| `THREADS_LIST_GHOST_POSTS` | List Ghost Posts | List active and archived ghost posts created by the connected Threads profile, one cursor page at a time. |
| `THREADS_LIST_MY_MENTIONS` | List My Mentions | List public Threads posts that mention the connected profile, one cursor page at a time. With development access, Threads may return only mentions made by app testers, so an empty page does not prove that no public mentions exist. |
| `THREADS_LIST_MY_POSTS` | List My Posts | List posts created by the connected Threads profile, one cursor page at a time. |
| `THREADS_LIST_MY_REPLIES` | List My Replies | List replies created by the connected Threads profile, one cursor page at a time. |
| `THREADS_LIST_PENDING_REPLIES` | List Pending Replies | List one page of pending or ignored replies for an owned Threads post. The post must have been created with reply approvals enabled. |
| `THREADS_LIST_POST_REPLIES` | List Post Replies | Return either immediate replies or the flattened full conversation for a Threads post, one cursor page at a time. |
| `THREADS_LIST_PUBLIC_PROFILE_POSTS` | List Public Profile Posts | List one cursor page of posts from a qualifying public Threads profile by exact username. Standard or unreviewed app access is restricted to selected official Meta accounts, and returned post IDs may not support direct retrieval until the app has advanced access. |
| `THREADS_LOOKUP_PUBLIC_PROFILE` | Lookup Public Profile | Look up a qualifying public Threads profile by exact username. Profiles generally need at least 100 followers, and standard or unreviewed app access is restricted to selected official Meta accounts. |
| `THREADS_REPOST_POST` | Repost Post | Repost an existing Threads post to the connected profile; this creates a visible post. |
| `THREADS_REVIEW_PENDING_REPLY` | Review Pending Reply | Approve or ignore one pending reply; an ignored reply can later be approved. |
| `THREADS_SEARCH_LOCATIONS` | Search Locations | Search Threads locations by text, coordinates, or both. Returns the provider-ranked unpaginated result set. |
| `THREADS_SEARCH_POSTS` | Search Posts | Search one page of Threads posts by keyword or topic tag. Broader public results require Meta advanced access, so an empty page may reflect app-review limits rather than no public matches. |
| `THREADS_SET_REPLY_VISIBILITY` | Set Reply Visibility | Hide or unhide a top-level reply and its nested replies on a post managed by the connected profile. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to Threads
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["threads"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["threads"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run Threads tools with your agent

Send a request, execute the Threads tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Publish a Threads post saying 'Our new product update is live today.'"}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Publish a Threads post saying 'Our new product update is live today.'" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to Threads and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["threads"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["threads"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a Threads request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to Threads tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Publish a Threads post saying 'Our new product update is live today.'")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Publish a Threads post saying 'Our new product update is live today.'",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native Threads Integration

- Supports both Threads MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for publishing, replying, discovering, and analyzing Threads content

### 2. Managed Auth

- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke Threads access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Threads
- Scoped, least privilege access to Threads resources
- Full audit trail of agent actions to support review and compliance

## Use Threads with any AI Agent Framework

Choose a framework you want to connect Threads with:

- [ChatGPT](https://composio.dev/toolkits/threads/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/threads/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/threads/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/threads/framework/atomic-agent)

## Related Toolkits

- [Twitter](https://composio.dev/toolkits/twitter) - Twitter is a social media platform for sharing real-time updates, conversations, and news. Stay connected, informed, and engaged with communities worldwide.
- [Instagram](https://composio.dev/toolkits/instagram) - Instagram is a social platform for sharing photos, videos, and stories with your audience. It helps brands and creators engage, grow, and analyze their online presence.
- [Ayrshare](https://composio.dev/toolkits/ayrshare) - Ayrshare is a Social Media API for managing, automating, and analyzing posts across multiple platforms. It helps you streamline social media workflows and centralize analytics.
- [DEV Community](https://composio.dev/toolkits/devto) - DEV Community (dev.to) is a social publishing platform for software developers. Use it to share technical articles, grow a developer audience, and join community discussions.
- [Dotsimple](https://composio.dev/toolkits/dotsimple) - Dotsimple is a social media management platform for planning, creating, and publishing content. It helps teams boost their reach with AI-powered content generation and actionable analytics.
- [Just One API](https://composio.dev/toolkits/just_one_api) - Just One API is a unified platform providing public social, creator, entertainment, and ecommerce data. Use it to query standardized, metered datasets across hundreds of endpoints for research and product insights.
- [Pinterest](https://composio.dev/toolkits/pinterest) - Pinterest is a visual discovery platform for recipes, home ideas, style inspiration, travel plans, and more. It helps people save, organize, and revisit ideas through Pins and Boards.
- [Strava](https://composio.dev/toolkits/strava) - Strava is a social fitness network and app for cyclists and runners. It's perfect for tracking workouts, sharing progress, and joining active communities.
- [TikHub](https://composio.dev/toolkits/tik_hub) - TikHub is a social metadata API that exposes supported TikTok and social metadata routes. It provides consistent, API-key-based access to public metadata without cookies or device signatures.
- [Tiktok](https://composio.dev/toolkits/tiktok) - Tiktok is a short-form video platform for creating, sharing, and discovering viral content. It helps creators and brands reach massive audiences with creative tools and global social features.
- [Twitch](https://composio.dev/toolkits/twitch) - Twitch is a live streaming platform for gamers, creators, and communities. It enables real-time interaction, monetization, and community building.
- [TwitterShots](https://composio.dev/toolkits/twittershots) - TwitterShots is an API service that renders public X posts as clean screenshots and retrieves tweet content. Use it to capture social posts, extract tweet text, and track API usage without building screenshot infrastructure.
- [Upload-Post](https://composio.dev/toolkits/upload_post) - Upload-Post is a social publishing API for posting, scheduling, and managing content across social networks. Use it to run multi-channel content workflows through one clean API instead of separate platform integrations.
- [X MCP](https://composio.dev/toolkits/x_mcp) - X MCP is X's hosted MCP server for searching posts, users, news, trends, Spaces, and communities. It provides a ready-to-use bridge for working with X data and account features.
- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Google Calendar](https://composio.dev/toolkits/googlecalendar) - Google Calendar is a time management service for scheduling meetings, events, and reminders. It streamlines personal and team organization with integrated notifications and sharing options.
- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Supabase](https://composio.dev/toolkits/supabase) - Supabase is an open-source backend platform offering scalable Postgres databases, authentication, storage, and real-time APIs. It lets developers build modern apps without managing infrastructure.

## Frequently Asked Questions

### Do I need my own developer credentials to use Threads with Composio?

Yes, Threads requires you to configure your own OAuth credentials. Once set up, Composio handles token storage, refresh, and lifecycle management for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
