Antigravity MCP Server Setup: Read X (Twitter) Data
Add a remote MCP server to Google Antigravity with serverUrl in mcp_config.json, sign in or send a key, then run a real X research task for 4 credits.
Tarun Khatri
Published · Updated · 7 min read
Adding an Antigravity MCP server takes one serverUrl entry in mcp_config.json, then a refresh and a sign-in.
This guide adds Weir, so the agent in Google Antigravity can search X (Twitter) and read posts, threads and profiles. It only reads, so it never posts as you. We run Weir.
Paste this into ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"weir": { "serverUrl": "https://api.weirapp.io/mcp" }
}
}
Antigravity MCP server setup, step by step
Google's docs say the App, IDE and CLI share one global config, so you add Weir once.
- Open the configIn the IDE, open the agent panel's … menu, then MCP Servers, Manage MCP Servers and View raw config. Or edit the file directly.
- Add WeirPaste the JSON above and save. For one project only, use .agents/mcp_config.json in that folder.
- RefreshIn the App or IDE, open Settings, then Customizations, and click Refresh under Installed MCP Servers. In the CLI, run agy and type /mcp.
- Sign inClick Authenticate next to Weir if it asks. Then approve Weir's consent screen in your browser.
- Ask the free question"What's my Weir usage?" The agent calls get_usage, which costs nothing.
Weir isn't in the MCP Store. Google's docs say a server the store doesn't list goes in by hand, through View raw config, which is what you just did.
Antigravity asks before each call. Its docs say MCP tools run in Ask mode until you allow them. Read the arguments: the limit decides what a call costs.
Antigravity MCP server URL, key and tool options
The URL is https://api.weirapp.io/mcp, and it always goes under serverUrl.
Global or project file? Use the global file to get Weir in every project. Use .agents/mcp_config.json to share the setup with a team: it holds only the URL, and each teammate signs in to their own Weir account.
Google says the Antigravity SDK picks up that project file by itself, too.
Rather use a key? Create one under API keys in your Weir dashboard, then add a headers block:
{
"mcpServers": {
"weir": {
"serverUrl": "https://api.weirapp.io/mcp",
"headers": { "Authorization": "Bearer weir_live_..." }
}
}
}
Google's docs don't describe reading a key from an environment variable here. So the key sits in the file as written. Keep it in the global file, never in a project file you commit.
Only want X? Antigravity's disabledTools field hides tools from the model. Add it to the Weir entry with Weir's Reddit tools:
"disabledTools": [
"search_reddit", "search_subreddit", "search_subreddits", "lookup_reddit",
"get_reddit_post", "get_reddit_comments", "get_reddit_user",
"get_reddit_user_posts", "get_reddit_user_comments",
"get_subreddit", "get_subreddit_posts", "get_subreddit_comments"
]
The agent then sees Weir's X tools and the three free account tools. A shorter list also leaves the model less to read.
Can Antigravity read X (Twitter)? A worked task
Yes. With Weir added, the agent picks the tool and its arguments itself.
Say your app calls the X API and you're about to change that code. First, check what X's developer account has announced. Paste this into the agent:
Use Weir to find what @XDevelopers posted on X in the last 30 days.
Skip reposts. List anything that could affect our X API client code,
with links, and save it as docs/x-api-news.md.
The tool it needs is search_x, with fromUsers, since and onlyOriginal. We ran that call through Weir's MCP server on 22 October 2026, at limit: 3:
→ search_x {"fromUsers": ["XDevelopers"], "since": "2026-09-22T00:00:00Z",
"onlyOriginal": true, "limit": 3}
← 3 posts · 4 credits (1 + 3 × 1) · nextCursor set
2026-10-22 repost retweetedPost set
2026-10-17 repost retweetedPost set
2026-10-16 120 likes New guide to the 𝕏 Chat API: How to build with it, how the encryption works...
Two of the three were reposts, because onlyOriginal drops replies, not reposts.
That's why the prompt says "skip reposts": the agent can drop any post whose retweetedPost is set.
The agent then writes docs/x-api-news.md in your repo. You review it like any other change, before you touch the client code.
The one original post links an X Article. The agent can read it in full with get_x_article, as our guide to reading X Articles through an API shows.
Weir bills a credit per call plus a credit per X post, and failed calls are free:
Paid packs start at $5 for 25,000 credits and never expire, as of October 2026. At that rate, the 20-post search costs under half a cent. Every rate is on our pricing page.
Coming from Gemini CLI? What changes
Google's developer blog says Gemini CLI stopped serving Google AI Pro, Ultra and free Code Assist users on 18 June 2026. Antigravity CLI, run as agy, replaced it for them.
If you set Weir up in Gemini CLI, four things change:
- The file moves. Gemini CLI kept servers in
~/.gemini/settings.json, and Antigravity readsmcp_config.json. - The key is renamed. Change
urlorhttpUrltoserverUrl, Google's migration guide says. - There's an import.
agyspots old configs on first run, andagy plugin import geminimoves extension servers across. - Enterprise users keep Gemini CLI. Google says their access stays the same, and our coding agents docs keep the Gemini CLI setup.
If it doesn't work
- Sign-in fails. We haven't tested Weir's sign-in inside Antigravity. Google says it handles servers with dynamic client registration, which Weir supports, so if it fails, use the key.
- "serverUrl or command must be specified". GitHub's Antigravity guide reports this error when an entry uses
url. Rename it toserverUrl. - Weir never shows up. Some older guides use
~/.gemini/antigravity/mcp_config.json. Google's docs now give~/.gemini/config/mcp_config.json. - Signed in on the IDE, not the CLI. A Google codelab says sign-in tokens aren't shared between surfaces, so sign in on each one.
- You're tired of approving calls. In the CLI, add
"mcp(weir/*)"topermissions.allowin~/.gemini/antigravity-cli/settings.json. You stop seeing each call's arguments, though. - A tool returns
402. Your Weir credits ran out, and retrying won't help. Add credits or wait for next month's grant.
When not to use Weir
- Your agent has to post or DM on X. Weir is read-only, so pick a tool with write access to your account.
- You want your private data. Weir reads public posts, not your bookmarks, DMs or home timeline.
- Price per post matters most. TwitterAPI.io lists $0.15 per 1,000 tweets as of October 2026, less than we charge.
- You need a guarantee. Weir isn't licensed by X or affiliated with it, so access can change.
FAQ
What is the Antigravity MCP server URL field?
It's serverUrl. Google's docs say remote servers need it, and the older url and httpUrl keys aren't supported. For Weir, the value is https://api.weirapp.io/mcp. Local servers use command and args instead.
How do I add an MCP server in Antigravity?
Install it from the MCP Store, or add it by hand. For a server the store doesn't list, open View raw config and add an entry under mcpServers. Then click Refresh in Customizations, or open /mcp in the CLI.
Do the Antigravity IDE and CLI need separate setups?
No. Both read ~/.gemini/config/mcp_config.json, along with the Antigravity App. Sign-in is the exception: a Google codelab says tokens aren't shared, so each surface asks you to sign in once.
Can Antigravity post to X through Weir?
No. Weir only reads public X data, so nothing can post, like or follow through it. To post, you need a tool that holds your own X account's access.
Sources
- Google Antigravity docs, MCP (checked 22 October 2026): https://antigravity.google/docs/mcp
- Google Antigravity docs, permissions (checked 22 October 2026): https://antigravity.google/docs/permissions
- Google Antigravity docs, migrating from Gemini CLI (checked 22 October 2026): https://antigravity.google/docs/cli/gcli-migration
- Google Developers Blog, "Transitioning Gemini CLI to Antigravity CLI", 19 May 2026 (checked 22 October 2026): https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli
- Google Codelabs, Developer Knowledge MCP server in Antigravity (checked 22 October 2026): https://codelabs.developers.google.com/developer-knowledge-mcp-antigravity
- Google Codelabs, Google Workspace MCP servers in Antigravity (checked 22 October 2026): https://codelabs.developers.google.com/google-workspace-mcp-antigravity
- GitHub, installing the GitHub MCP server in Antigravity (checked 22 October 2026): https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-antigravity.md
- TwitterAPI.io pricing (checked 22 October 2026): https://twitterapi.io/pricing
- Weir docs, MCP: https://docs.weirapp.io/mcp
- Weir docs, coding agents and IDEs: https://docs.weirapp.io/mcp-coding-agents
- Weir billing: https://docs.weirapp.io/billing
- Weir search_x call, run 22 October 2026 (request 376b2de1-813c-4607-91a9-8ad307405236)