Model Context Protocol (MCP) is an open standard that simplifies how AI models and agentic IDEs connect with external data sources, local environments, and third-party APIs.
Instead of writing custom API adapters for every tool, MCP provides a unified JSON-RPC protocol allowing AI coding assistants like Antigravity to query databases directly, inspect local Git repos, run terminal commands, and call live APIs.
In this guide, we cover how to install, configure, and use MCP servers inside Antigravity step-by-step.
What is MCP and Why Does it Matter?
Before MCP, if you wanted your AI coding assistant to query your local SQLite database or your team’s GitHub issues, you had to manually copy-paste schema dumps or write custom plugins.
MCP acts as a USB-C port for AI applications:
- Any MCP-compliant server (PostgreSQL, filesystem, Brave Search, GitHub, Docker) plugs directly into any MCP-compliant AI client.
- Secure, local-first communication over standard IO (
stdio) or Server-Sent Events (SSE). - Real-time schema discovery and tool execution.
Step 1: Locating the MCP Configuration File
In Antigravity, MCP servers are defined in a central JSON configuration file.
- Open your Antigravity user settings or navigate to your global configuration directory:
- macOS / Linux:
~/.gemini/config/mcp_config.json - Or locally within your workspace root:
.agents/mcp_config.json
- macOS / Linux:
Step 2: Adding an MCP Server (e.g., PostgreSQL & Filesystem)
Open mcp_config.json and add your server definitions:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://user:password@localhost:5432/my_app_db"
]
},
"github": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-github"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_yourTokenHere"
}
}
}
}
Step 3: Verifying and Testing Tools
- Save the configuration file.
- Restart or reload your Antigravity agent session.
- Your agent will automatically discover the exposed tools (e.g.,
query_database,get_table_schema,search_github_issues). - Simply prompt your agent in natural language:
“Inspect the users table in our local database and show me the top 5 most recent signups.”
The agent calls the PostgreSQL MCP server over stdio, retrieves the record payload, and renders the result directly in your coding session.
Security Guidelines for MCP
- Read-Only Credentials: Always connect database MCP servers using read-only database roles to prevent accidental drops or deletes.
- Environment Variables: Never commit raw API tokens or credentials into Git repositories. Store sensitive keys in local
.envfiles referenced by your MCP config.
Summary
MCP transforms your AI coding assistant from an isolated code completion engine into a fully connected, contextual pairing partner.
Building custom AI development pipelines, internal MCP servers, or full-stack software applications? Talk with Klickspell today.
Scaling a high-growth Shopify brand?
Skip fragile apps. Build custom Liquid.
We engineer custom Shopify themes, tailored sections, and high-converting store architectures for brands that refuse to compromise on design, speed, or autonomy.
Keep Reading
Related Engineering Articles
How to Get Free & High-Quota AI Tokens for Developers (2026 Guide)
A developer guide on accessing generous free-tier AI tokens, using Google AI Studio, open-weights models, and local Ollama inference without paying high monthly API fees.
How to Build a Multi-Skill AI Agent: Step-by-Step Architecture Guide
A comprehensive developer guide on engineering multi-skill autonomous AI agents using modern agentic design patterns, dynamic tool calling, and modular skill routing.