Home / Servers / X (Twitter) API / create_posts

Create or Edit Post

An MCP tool from the X (Twitter) API server, hosted on mcp.hjlabs.in.

Create or Edit Post Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Supports paid partnership disclosure via the paid_partnership field. [POST /2/tweets]

Name on the gateway: x_api__create_posts · may change things.

Parameters

NameTypeDescription
card_uristringCard URI parameter.
community_idstringCommunity to post the tweet to.
direct_message_deep_linkstringDirect message deep link.
edit_optionsobjectEdit an existing tweet rather than creating a new one.
for_super_followers_onlybooleanRestrict tweet to super followers.
geoobjectGeo location for the tweet.
made_with_aibooleanDisclose that the tweet contains AI-generated media.
mediaobjectMedia attachments.
nullcastbooleanIf true, the tweet is not shown in the public timeline.
paid_partnershipbooleanDisclose that the tweet is a paid partnership.
pollobjectPoll configuration.
quote_tweet_idstringTweet ID to quote.
replyobjectTweet reply configuration.
reply_settingsfollowing | mentionedUsers | subscribers | verifiedWho can reply to this tweet.
share_with_followersbooleanShare an exclusive (super-follower) tweet with all followers.
textstringText of the tweet. Required unless media is provided. Defaulted to an empty…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "x_api__create_posts",
  "arguments": {}
}

Or connect the X (Twitter) API server directly, which lists 258 tools including this one:

Run in your terminal
claude mcp add --transport http hj-x-api https://mcp.hjlabs.in/mcp/x-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create or edit post tool with card_uri set to ….

More from X (Twitter) API