Google Antigravity + MCP Server: How to Connect GitHub and Push Code with Just One Command Prompt (Part 2) Step by Step
By Geeta Kakrani | Google Developer Experts
Missed part 1? Read the beginner’s guide first 👉 Google Antigravity: Beginner’s Guide to the New Agent IDE
In Part 1, we learned what Google Antigravity is, how to install it, and how an AI agent can create a complete Next.js dashboard for you step by step. But here’s a question that came to mind right after this demo.
After the agent builds your code, what’s next? You still have to open GitHub manually. Create a repo. Copy the project path. Run Git commands. Push the code yourself.
This completely interrupts the flow.
What if the agent could also push the code to GitHub – just because you asked them to?
That’s exactly it MCP server make possible.
What is MCP? (Simple explanation)
MCP stands for Model context log.
Think of it like a Plugin system for your AI agent.
By default, the agent in Antigravity can write code and execute terminal commands. That’s it. But with MCP you can give the agent new skills– like the ability to communicate with GitHub, read your Google Drive, interact with Firebase, query BigQuery, and much more.
MCP = a bridge between your AI agent and the outside world.
Each bridge is referred to as one MCP server. You connect it once and your agent can use it in any project forever.
What we will do in this part
- Find the MCP option in Antigravity
- Discover the integrated MCP Store
- Add the GitHub MCP server
- Create a personal GitHub access token
- Submit code directly to GitHub using a simple command prompt
Step 1 – Open the agent panel and find the MCP option
Open Google Antigravity on your computer.
On the right you can see this Agent panel– This is where you enter prompts and the agent responds.
Check this out at the top right of the agent window . You will see a button… (three dots).
Click on these three dots.
A small drop-down menu will appear with two options:
- Adjustment
- MCP server
👉 Click on “MCP Server”
![foto[1]-Google Antigravity + MCP Servers: How to Connect GitHub and Push Code with Just a Prompt (Part… For Windows 7,8,10,11-Winpcsoft.com](https://winpcsoft.com/wp-content/plugins/wp-fastest-cache-premium/pro/images/blank.gif)
Step 2 – The MCP Store opens
After clicking on “MCP Server,” the right panel will change to display the following MCP Store .
![foto[2]-Google Antigravity + MCP Servers: How to Connect GitHub and Push Code with Just a Prompt (Part… For Windows 7,8,10,11-Winpcsoft.com](https://winpcsoft.com/wp-content/plugins/wp-fastest-cache-premium/pro/images/blank.gif)
All available MCP servers live here. You can see one Search bar at the top and below that a list of operational servers.
You will see some of the servers in a moment:
MCP Server What it does:
- Cloud Run: Deploy your app directly to Google Cloud Run.
- Google Kubernetes Engine: Interact with GKE clusters.
- Firebase: Use Firebase tools within the agent.
- BigQuery:Query your BigQuery data using natural language.
- Dart/Flutter:Actions of Flutter and Dart development tool.
- many more…
But for now we want GitHub . So type GitHub in the search bar.
![foto[3]-Google Antigravity + MCP Servers: How to Connect GitHub and Push Code with Just a Prompt (Part… For Windows 7,8,10,11-Winpcsoft.com](https://winpcsoft.com/wp-content/plugins/wp-fastest-cache-premium/pro/images/blank.gif)
Step 3 – Create a personal GitHub access token
Before we add the GitHub MCP, we need to give it permission to access our GitHub account. We do this with a Personal Access Token (PAT) .
This is basically a password that you generate in GitHub. It tells GitHub: “Yes, this tool can act on my behalf.”
Follow these steps carefully:
1. Go to github.com and log in to your account.
2. Click on your Profile picture in the upper right corner → Click Settings
3. Scroll all the way down in the left sidebar → Click Developer settings
4. Click Personal access tokens → Click Tokens (classic)
5. Click Generate new token → Select Generate new token (classic)
6. Give your token a name – something like antigravity-mcp – so you remember what it’s for.
7. Set the expiration to 90 days (or “No Process” if this is just for learning/testing).
8. Now select the one Permissions (scopes) Your token requires:
- Repo – Full control over your repositories (read, write, criar)
- Workflow – Needed if you want to trigger GitHub actions later
- read:user – To allow the agent to read your GitHub profile information
9. Scroll down and click on the green one “Generate tokens” Button.
10. Copy the token immediately. It looks like this: gp_xxxxxxxxxxxxxxxxxxxxx
GitHub will do it Never show this token againafter you leave the site. If you lose it, you have to generate a new one.
![foto[4]-Google Antigravity + MCP Servers: How to Connect GitHub and Push Code with Just a Prompt (Part… For Windows 7,8,10,11-Winpcsoft.com](https://winpcsoft.com/wp-content/plugins/wp-fastest-cache-premium/pro/images/blank.gif)
Step 4 – Add GitHub MCP Server in Antigravity
Now go back to antigravity. You should still be on the MCP Store screen.Search for “GitHub” in the search bar. The GitHub MCP server appears in the results. Click on it.
A dialog box or configuration window will open asking you for your information GitHub Personal Access Token .
Paste the token copied in step 3.
Click Connect (or Add server — key labeling may vary slightly).
You now see a green display next to GitHub MCP – this means the connection was successfully established!
Step 5 – Test the connection
Before we do anything big, let’s make sure the GitHub MCP actually works.
Go back to the Agent panel (Click Return to Agent at the top of the MCP panel).
In the chat box, enter this simple prompt:
“List all my GitHub repositories.”
When GitHub MCP is connected correctly, the agent will respond with a list of all your GitHub repos – directly from your GitHub account – without you even having to open a browser.
If you see an error instead:
- Double check that your token has the repo scope selected
- Make sure you have included the full token without any extra spaces
- Try disconnecting and reconnecting the GitHub MCP server
Step 6 – Submit code to GitHub using Command Prompt
Now the exciting part.
Let’s say you just built this FinancePulse Dashboard from Part 1 – or any project you currently have open in Antigravity.
Instead of running git init, git add ., git commit, git push manually, just type the following in the agent panel:
“Create a new public GitHub repository named ‘finance-pulse’. Then push all current project files there with the commit message ‘Initial commit – FinancePulse Dashboard’.”
Here’s what the agent will do – completely independently:
1. Create the repo – The agent calls GitHub MCP to create a brand new repository called “finance-pulse” on your GitHub account.
2. Initialize Git – It opens the terminal in Antigravity and runs git init in your project folder.
3. Deploy all files — git add is running. to prepare all files for commit.
4. Make the commit — It runs git commit -m "First commit – FinancePulse dashboard".
5. Set the remote control – The origin is set to point to the new GitHub repo URL.
6. Press the code — Git push origin main is running.
You can follow each and every one of these steps live Connection panel at the end of antigravity.
When it’s ready, open your browser and go to github.com/YOUR_USERNAME/finance-pulse – your code is already there.
Step 7 – More things you can do with GitHub MCP
Now that the GitHub MCP is connected, your agent has a whole new set of capabilities. Try these prompts:
Create a new branch and commit changes:
“Create a new branch named ‘feature/dark-mode’, add a dark mode switch to the dashboard, and push the branch to GitHub.”
Open a pull request:
“Open a pull request from ‘feature/dark-mode’ to ‘main’ with the title ‘Add dark mode toggle’ and a brief description of the changes.”
Read an existing repo:
“Go to my GitHub repo called ‘my-portfolio’, read the README, and suggest three improvements I can make.”
Check recent commits:
“Show me the last 5 commits in my Finance Pulse repository.”
The agent processes all GitHub API calls in the background. They just give instructions in plain English.
How to add another MCP server (general steps)
The process we followed for GitHub works the same way for any other MCP server. Here is the general pattern:
1. Open the agent panel → Click… → Click MCP server
2. Search the Internet for the server you want MCP Store
3.Click on it and enter the required credentials (API key, token or OAuth login – depending on the service).
4.Click Connect
5.Test it by asking the agent using this service a simple question
6.Start using it in your prompts!
Each MCP server differs a little in the credentials required, but the steps within Antigravity are always the same.
A true end-to-end workflow
This is what a complete agent workflow looks like when everything is connected:
Your request: “Create a simple ToDo app in React with a clean UI. Add an appropriate README file. Then create a public GitHub repository called “my-todo-app” and push everything with the “Initial Release” commit message.”
What the agent does:
- Framework for the React project (encoding)
- Installs all dependencies (Terminal)
- Creates the UI components (encoding)
- Writes the README file (file creation)
- Creates the GitHub repository (GitHub MCP)
- Adopts and pushes all code (GitHub MCP + Terminal)
This is what “agentic development” actually feels like in practice.
Important tips before your trip
Keep your GitHub token safe.Never include it in a file that is submitted to GitHub. Antigravity saves it locally on your computer, not in your project files.
Always check before going to the main menu.The agent is fast, but you are still the engineer. Review the code before sending it to your production branch.
Test a small project first.Familiarize yourself with the workflow before using it in your main codebase.
Token expired?Simply generate a new one from GitHub and reconnect the MCP server in Antigravity – it takes less than 2 minutes.
Scroll down the MCP Store.There are many more servers available than you see at first glance. Cloud Run, Firebase, BigQuery, Kubernetes – everything is waiting for you.
#GoogleAntigravity #MCP #GitHub #AgenticAI #GeminiAI #WebDevelopment #DevTools #ModelContextProtocol
![]()
Google Antigravity + MCP Server: How to Connect GitHub and Push Code with Just a Command Prompt (Part…) was originally published in Google Developer Experts on Medium, where people are continuing the conversation by highlighting and responding to this story.
