Work About Team Blog Tutorials FAQ
Book a discovery call → Chat on WhatsApp

Home / Blog / Shopify / How to Setup and Use MCP (Model Context Protocol) in Antigravity

MCPAIAntigravityDeveloper ToolsLLMsTutorial

How to Setup and Use MCP (Model Context Protocol) in Antigravity

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.

  1. 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

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

  1. Save the configuration file.
  2. Restart or reload your Antigravity agent session.
  3. Your agent will automatically discover the exposed tools (e.g., query_database, get_table_schema, search_github_issues).
  4. 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

  1. Read-Only Credentials: Always connect database MCP servers using read-only database roles to prevent accidental drops or deletes.
  2. Environment Variables: Never commit raw API tokens or credentials into Git repositories. Store sensitive keys in local .env files 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.

Custom Shopify Engineering

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.

Explore Custom Shopify Dev → Book Free 30-Min Call ↗

Keep Reading

Related Engineering Articles

AILLMs

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.

5 min read Read →
AIAgents

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.

7 min read Read →

Technical Blog

Explore all 50+ engineering tutorials

All Articles ↗

Looking for custom
Shopify engineering craft?

Let's build
your store right.

Book a free 30-minute call. We'll talk through your store goals, timeline, and budget.

Free 30-min call · Discuss scope & budget

Book your free call → Chat on WhatsApp

The craft in every click.