Last updated: September 2026
Post to X from Antigravity CLI and IDE
Add the hosted OpenTweet MCP server to ~/.gemini/config/mcp_config.json with serverUrl and an Authorization header. Antigravity CLI and the Antigravity IDE then post, thread and schedule on X, Bluesky and LinkedIn. No X developer account, flat $11.99 a month.
Antigravity CLI (the agy command) is what Google moved Gemini CLI users to on June 18, 2026. The MCP setup is almost the same as before, with one key renamed, covered below.
7-day free trial. Cancel anytime.
What Antigravity can do on X
All 43 tools arrive at once. You do not write a tool wrapper for any of them.
Post now
opentweet_create_tweet with publish_now publishes as soon as you approve the call.
Schedule
opentweet_schedule_tweet and opentweet_batch_schedule queue posts for later.
Threads
opentweet_create_thread ships a connected thread in one call.
43 tools
Posts, threads, articles, evergreen, media and analytics, with no tool code to write.
Three networks
Pass platforms ["x","bluesky","linkedin"] and one call posts to all three.
No X API
No developer account, no OAuth to build, no per-post billing.
Setup: the hosted server
Antigravity keeps MCP servers in their own file, separate from your other settings. The global file is ~/.gemini/config/mcp_config.json. Add one entry:
{
"mcpServers": {
"opentweet": {
"serverUrl": "https://mcp.opentweet.io/mcp",
"headers": {
"Authorization": "Bearer ot_your_key"
}
}
}
}Then install the CLI if you have not, start it in your project, and type /mcp to open the MCP Manager. It shows each server as connected, loading or disconnected, and lets you reload after editing the file.
# Install Antigravity CLI (macOS / Linux)
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Open the global MCP config
$EDITOR ~/.gemini/config/mcp_config.json
# Start the CLI in your project, then type /mcp to reload and check status
agyserverUrl, not url
Antigravity requiresserverUrl for remote servers. Google documents url and httpUrl as not supported. A config pasted from Cursor, VS Code or the old Gemini CLI settings.json needs that one key renamed. The URL alone is not enough either: without the Authorization header the OpenTweet server returns 401.In the Antigravity IDE
The IDE reads the same file. Open the menu at the top of the agent side panel, choose MCP Servers, then Manage MCP Servers and View raw config. Paste the entry above, save, and the tools are available to the agent in the editor and in agy.
Workspace config, and where the key lives
A project can also declare servers in .agents/mcp_config.json. That file sits inside the repository, so if you put the OpenTweet entry there, add it to .gitignore first. Your ot_ key is in the header in plain text, and it can post to your accounts.
Setup: the npm package instead
If you would rather run the server as a local process, Antigravity also takes stdio servers with command, args and env. The package is @opentweet/mcp-server and it reads your key from OPENTWEET_API_KEY.
{
"mcpServers": {
"opentweet": {
"command": "npx",
"args": ["-y", "@opentweet/mcp-server"],
"env": {
"OPENTWEET_API_KEY": "ot_your_key"
}
}
}
}The hosted server is the better default: nothing to install and nothing to upgrade. Use the npm package when you want the process on your own machine.
Prompts that work
Name the networks every time. A post that leaves platforms out follows your account's auto cross-post setting, which may not be what you meant. A post with neither publish_now nor a schedule time is saved as a draft.
Post "Shipped the parser rewrite. 40% faster on the same corpus." to X now.
Write a 4 part thread about today's diff and post it to X and Bluesky.
Post the release note to all three networks: platforms ["x","bluesky","linkedin"].
Schedule five posts from CHANGELOG.md for 9am UTC on weekdays next week.
Use opentweet_batch_schedule and set platforms to ["x"] on each one.Scheduling
opentweet_schedule_tweet takes an ISO 8601 time such as 2026-09-30T09:00:00Z. opentweet_batch_schedule queues many posts in one call. You approve once in Antigravity and OpenTweet sends each post at its time, whether or not the CLI is still open.
Per-network limits
If X is a target and the text is over its limit, the call fails. LinkedIn allows 3,000 characters and gets a thread as one post, parts joined by blank lines. A post too long for Bluesky or LinkedIn is skipped there with a reason and still goes to the others.
The REST fallback
For a post out of a script, a git hook or CI, where nobody is there to approve a tool call, skip MCP. Same key, one endpoint.
curl -X POST https://opentweet.io/api/v1/posts \
-H "Authorization: Bearer ot_your_key" \
-H "Content-Type: application/json" \
-d '{"text":"Shipped the parser rewrite.","platforms":["x","bluesky","linkedin"],"scheduled_date":"2026-09-30T09:00:00Z"}'Full field reference in the API docs. The GitHub Actions guide shows the CI shape.
Frequently asked questions
How do I add an MCP server to Antigravity CLI?
Edit ~/.gemini/config/mcp_config.json, the global MCP file, and add the server under mcpServers. For OpenTweet, use serverUrl set to https://mcp.opentweet.io/mcp and a headers object with Authorization: Bearer ot_your_key. Then type /mcp inside agy to open the MCP Manager, reload, and check the server shows as connected.
Why does my server entry with "url" not load in Antigravity?
Antigravity requires the serverUrl key for remote servers, whether Streamable HTTP, SSE or websocket. Google documents the legacy keys url and httpUrl as not supported. Configs copied from Cursor, VS Code or the old Gemini CLI settings.json usually carry one of those, so rename it to serverUrl.
Do Antigravity CLI and the Antigravity IDE share MCP config?
Yes. Both read ~/.gemini/config/mcp_config.json for global servers and .agents/mcp_config.json for a workspace. In the IDE, open the agent panel menu, choose MCP Servers, then Manage MCP Servers and View raw config to edit the same file. Add OpenTweet once and it is available in both.
I used Gemini CLI. What changes?
Google stopped serving Gemini CLI for free, Google AI Pro and Ultra users on June 18, 2026, and pointed them to Antigravity CLI. Gemini Code Assist Standard and Enterprise licenses kept access. MCP servers moved out of ~/.gemini/settings.json into the separate mcp_config.json, and the url or httpUrl key became serverUrl. The headers object carries over as is.
Will Antigravity post without asking me?
Not by default. Antigravity runs MCP tools in Ask mode, so each call waits for your approval before it runs. That suits posting while you work. For anything that must go out at a set time, have the agent schedule the post rather than publish it, so you approve once and OpenTweet sends it later.
Do I need an X developer account?
No. OpenTweet holds the X connection, the OAuth flow and the token refresh. Antigravity authenticates to OpenTweet with one ot_ key. The same key posts to Bluesky and to your personal LinkedIn profile once those are connected in OpenTweet settings.
Can the agent post links?
Only within your plan allowance. Pro includes no URL posts per day, Advanced 10 and Agency 20. Over the allowance OpenTweet removes the URL from the text before posting, and purchased URL credits cover overflow. If your Antigravity workflow is release notes with a changelog link, plan for that.
Keep exploring
Antigravity is one client of many. The same hosted MCP server works everywhere.
Can Gemini post to X?
Which Gemini surfaces can use an MCP server with a bearer key, and which cannot.
The OpenTweet MCP server
Every tool, the hosted endpoint, and the npm package.
Claude Code
The same hosted server from one claude mcp add command.
OpenCode
The same server in opencode.json, with its global-config gotcha.
Is an MCP server safe on my X account?
What a write tool inside a coding agent can and cannot do.
REST API docs
POST /api/v1/posts, for scripts and CI rather than agent turns.
Give Antigravity an X account it can use
Connect X, copy your key, add one entry to mcp_config.json.
7-day free trial. Cancel anytime.