Building a Tech Blog with AI Pair Programming (Antigravity + MCP)
A chronicle of building a Next.js 15-based tech blog using the Gemini-based AI coding assistant Antigravity and MCP tools. Includes development tips for using AI and real-world troubleshooting examples.
This post was machine-translated from Korean by AI. Some expressions may differ from the original.
Read the original (Korean)Introduction
The recent advancements in AI coding assistants have been remarkable. While various tools like GitHub Copilot, Cursor, Cody, and Continue have emerged, this time I tried something a bit special.
It is Antigravityβan "Agentic AI" coding assistant created by the Google DeepMind team. Going beyond simple code autocompletion, it can actually create files, execute terminal commands, manipulate the browser, and even commit/push to GitHub.
In this post, I will share my experience of building this blog from scratch using Antigravity and MCP (Model Context Protocol).

Tech Stack
Technologies used in this blog:
| Category | Technology | Description |
|---|---|---|
| Framework | Next.js 15 | App Router, React Server Components |
| Content | Velite | Type-safe handling of MDX/Markdown |
| Styling | Tailwind CSS + shadcn/ui | Dark minimal design system |
| DB | SQLite (better-sqlite3) | Storage for comments, translations, and honeypot logs |
| Auth | Auth.js (NextAuth v5) | GitHub OAuth admin authentication |
| Translation | Gemini API | AI-based automatic translation |
| Deployment | Ubuntu Server + PM2 | Nginx reverse proxy |
| CI/CD | GitHub Actions | Automated SSH deployment |
| Highlighting | rehype-pretty-code | tokyo-night theme |
Blog Structure
arang-blog/
βββ content/ # μ½ν
μΈ (Velite)
β βββ posts/ # λΈλ‘κ·Έ κΈ (.md)
β βββ writeups/ # CTF Writeup (.md)
βββ data/
β βββ blog.db # SQLite (λκΈ, λ²μ, λ‘κ·Έ)
βββ public/
β βββ images/ # μ΄λ―Έμ§ νμΌ
β βββ uploads/ # μ
λ‘λλ νμΌ
βββ src/
β βββ app/ # Next.js App Router
β β βββ admin/ # κ΄λ¦¬μ νμ΄μ§
β β βββ api/ # API λΌμ°νΈ
β β βββ posts/ # λΈλ‘κ·Έ κΈ νμ΄μ§
β β βββ writeups/ # Writeup νμ΄μ§
β βββ components/ # React μ»΄ν¬λνΈ
β βββ hooks/ # Custom Hooks
β βββ lib/ # μ νΈλ¦¬ν° (DB, Auth, i18n)
βββ velite.config.ts # Velite μ€μ
βββ next.config.ts # Next.js μ€μ Start: Project Kickoff with a Single Prompt
The development of this blog started with a single prompt:
# Project Kickoff: Arang Tech Blog (Deep Dark & Aesthetic)
**λͺ©ν:** Next.js 15 + Velite + Shadcn/uiλ₯Ό μ¬μ©ν CTF/κΈ°μ λΈλ‘κ·Έ ꡬμΆ.
**νμ¬ μν©:** λ‘컬 ν΄λλ§ μμ±λ¨. Git μ΄κΈ°ν μ λ¨.
**Target Repo:** `https://github.com/JaewookYou/arang-blog`
---
## π¨ Phase 0: Git Initialization (Handshake)
1. **μν νμΈ:** `filesystem`μΌλ‘ νμ¬ ν΄λκ° λΉμ΄μλμ§ νμΈ
2. **λͺ
λ Ήμ΄ μ 곡:** Git μ΄κΈ°ν λ° μ격 μ°κ²° λͺ
λ Ήμ΄ μΈνΈ μμ±
3. **λκΈ°:** μ€ν ν "μ°κ²° μλ£"λΌκ³ μλ΅νλ©΄ Phase 1 μμ
## π§ Phase 1: Architecture & Setup (After Git Init)
Git μ°κ²°μ΄ νμΈλλ©΄, `sequential-thinking`μ μ¬μ©νμ¬:
1. **Stack Strategy (Context7 νμ):** Next.js 15, Velite μ€μ
2. **Project Management (GitHub MCP):** Issue μμ±μΌλ‘ λ‘λλ§΅ μ 리
3. **Implementation Start:** κΈ°λ³Έ μ€μΊν΄λ© νμΌ μμ±With this one prompt, the AI:
- Checked the folder status
- Provided Git initialization commands
- Created an "Initial Setup & Roadmap" issue on GitHub
- Created basic files like
package.json,next.config.ts, etc.
It took about 10 minutes to go from an empty folder to a complete project structure.
Global Rule: Defining AI's Persona
One of Antigravity's powerful features is the Global Rule. You can set rules that apply to every conversation:
# π Global Persona & Identity
- You are a **Senior Full-Stack Engineer** and **Security Researcher (CTF Player)**.
- **Core Values:** "Security-First", "Modular Design", "Hacker Aesthetic (Dark/Minimal)".
- **Language Protocol:** All explanations MUST be in **Korean (νκ΅μ΄)**.
# π‘οΈ Security-First Mindset (Critical)
- **Defensive Coding:** Always assume inputs are malicious. Validate everything.
- **Secrets:** Never hardcode API keys. Always use `.env`.
# π οΈ MCP Toolchain Protocol (Adaptive)
1. **π§ Sequential Thinking:** REQUIRED for Architecture, Debugging, or Complex Logic.
2. **π Context7:** ALWAYS fetch latest docs for libraries.
3. **π GitHub (API):** Create Issues for planning, PRs for features.
4. **π Filesystem:** Direct code manipulation.
5. **π¦ Brave Search:** For error solutions and design references.
# β‘ Autonomous Execution Protocol
- **Do NOT ask the user** to run commands. Execute directly.
- **Trial & Error:** If a command fails, READ the error, PLAN a fix, EXECUTE.
- **Verification:** After running a command, verify before reporting back.Thanks to these rules:
- The AI always explains in Korean (including code comments)
- Automatically considers security perspectives (input validation, use of
.env) - Proceeds autonomously with command execution without asking for permission every time
- Attempts to resolve errors on its own before reporting
Utilizing MCP (Model Context Protocol)
What is MCP?
MCP is a standard protocol that connects AI systems with external tools and data sources. Antigravity expands its capabilities through various MCP servers.
The MCP tools I actually used:
| MCP Server | Usage | Benefit |
|---|---|---|
sequential-thinking |
Breaking down complex problems into steps | Essential for architecture design and debugging |
filesystem |
File reading/writing, directory navigation | Direct code modification |
github-mcp-server |
PR creation, issue management, commits | Automated project management |
brave-search-mcp-server |
Web search (error resolution, finding docs) | Retrieving latest information |
context7 |
Library documentation lookup (latest APIs) | Prevention of hallucinations |
Sequential Thinking: The Key to Solving Complex Problems
For complex tasks like architecture design or debugging, sequential-thinking proved invaluable. Here is the approach used when adding 4-language support to the blog:
// Sequential ThinkingμΌλ‘ λ¬Έμ λΆν΄
thought: "λ€κ΅μ΄ μ§μ μν€ν
μ² μ€κ³"
steps: [
"1. νμ¬ locale μν κ΄λ¦¬ λ°©λ² νμ
",
"2. μλ²/ν΄λΌμ΄μΈνΈ μ»΄ν¬λνΈ κ΅¬λΆ",
"3. μΏ ν€ κΈ°λ° μΈμ΄ μ μ₯",
"4. t() ν¨μλ‘ λ²μ ν
μ€νΈ μ‘°ν",
"5. λ μ§ ν¬λ§· λ‘μΌμΌν",
"6. κ²μκΈ λ²μμ DBμ μ μ₯νμ¬ κ΄λ¦¬"
]Browser Subagent: Automating Visual Verification
The most impressive feature is the Browser Subagent. The AI directly opens the browser to check pages, take screenshots, and identify issues.
// AIκ° μ€μ λ‘ μ€νν λΈλΌμ°μ κ²μ¦
browser_subagent({
Task: `
1. Navigate to https://blog.arang.kr/posts
2. Wait 3 seconds for page load
3. Scroll down to check all post cards
4. Capture screenshot of the page
5. Switch language to English using the globe icon
6. Verify content changed to English
`,
RecordingName: "i18n_verification"
});Thanks to this feature, instead of saying "Please check it yourself after deployment," it becomes "I've checked it, and here is the screenshot."

Completed Features
1. Next.js 15 Based Static Blog
- Velite: MDX/Markdown content management + Type safety
- App Router: Latest Next.js routing (Server Components)
- SSG: Fast loading via static site generation
- Code Highlighting:
rehype-pretty-code(tokyo-night theme)

2. 4-Language Support
- Supports Korean, English, Japanese, and Chinese
- Automatic translation via Gemini API (Preserves code blocks/images)
- Saves translations to SQLite DB (Converted to HTML before storage)
- Automatic detection based on access country/browser language

3. Admin Dashboard
Admin features available after GitHub OAuth authentication:
- Write/Edit Posts: Markdown editor (Auto-upload for clipboard images)
- Translation Management: Generate AI translations, edit/delete saved translations
- Comment Management: View and delete comments
- Static Page Editing: Edit Home, About pages
- Honeypot Logs: Track attack attempts on
/wp-admin,/.env, etc.

4. GitHub Actions CI/CD
Write post in Admin β GitHub Commit β Trigger Actions β Automatic Server Deployment
# .github/workflows/deploy.yml
on:
push:
branches: [main]
jobs:
deploy:
steps:
- name: Deploy to Production
run: |
ssh ${{ secrets.SSH_HOST }} "
cd /home/arang/web/blog
git pull
npm run build
pm2 reload arang-blog
"5. Comment System
- SQLite-based self-hosted (No dependency on external services)
- Supports Nested Comments (1 level)
- Anonymous nickname input
- Admin Delete function

6. Search Feature
- Integrated Search for Posts and Writeups
- Real-time Dropdown results
- Multilingual UI support

7. Security Features
- Honeypot: Logging access to bot attack paths (
/wp-admin,/.env,/phpmyadmin) - Rate Limiting: Limits on comment submission
- XSS Prevention: HTML sanitization
Real-world Troubleshooting Cases
1. output: 'standalone' Compatibility Issue
Problem: next/dist/compiled/cookie module not found in PM2 + npm start environment
Cause: The output: 'standalone' configuration requires running via .next/standalone/server.js, but running with npm start causes conflicts.
Solution:
// next.config.ts
// output: 'standalone' μ κ±° - PM2 νκ²½μμλ λΆνμ
const nextConfig: NextConfig = {
// output: 'standalone', // μ΄κ±° μ κ±°!
};2. MDX Comment Syntax Conflict
Problem: Build error when <!-- comment --> is included in posts written in Admin.
Solution: Auto-conversion in the Commit API
// HTML μ£Όμ β MDX μ£Όμ μλ λ³ν (MDX νμΌλ§)
if (ext === ".mdx") {
content = content.replace(/<!--([\s\S]*?)-->/g, '{/*$1*/}');
}3. pm2 not found during GitHub Actions SSH Connection
Problem: fnm environment variables were not loaded in the SSH session.
Solution:
# .github/workflows/deploy.yml
eval "$(fnm env)"
source ~/.bashrc
pm2 reload arang-blog4. Markdown Structure Breaking during Translation
Problem: Code blocks and image paths were breaking during translation.
Solution: Replace code blocks/images with placeholders β Translate β Restore
// λ²μ μ : μ½λλΈλ‘ μΆμΆ
const { processed, codeBlocks } = extractCodeBlocks(content);
// λ²μ ν: 볡μ
translatedContent = restoreCodeBlocks(translatedContent, codeBlocks);Pros and Cons of AI Development
Pros
| Item | Description |
|---|---|
| Speed | Repetitive tasks (CRUD, applying i18n) are incredibly fast |
| Reduced Learning Curve | Can immediately utilize libraries never used before via Context7 |
| Real-time Verification | Visual confirmation before deployment via Browser Subagent |
| Autonomous Execution | Just saying "Build and deploy it" gets the job done |
Cons and Precautions
| Item | Description |
|---|---|
| Context Loss | Forgets previously discussed content if the conversation gets too long |
| No Blind Trust | Even if it says "It's done," you must verify it yourself |
| Security Caution | Risk of hardcoding API keys - Prevented via Global Rule |
Conclusion
The combination of Antigravity + MCP is undeniably powerful. Going beyond simple code autocompletion, it handles project management, browser verification, and automated deployment all at once.
The Global Rule setting is particularly critical. By defining the AI's persona and behavioral principles:
- Security principles are automatically applied
- Language/cultural consistency is maintained
- Productivity increases through autonomous execution
However, AI is ultimately a tool. Setting the direction and verifying quality is still the human's role.
I spent about 50 hours with AI building this blog. Initially, I doubted, "Can this really work?" but now I think, "How did I ever develop without this?"
AI tools will continue to evolve. The important thing is not to fear change, but to actively experiment with new tools.
π€ This post was written by AI (Antigravity).
The AI that built this blog together compiled this development experience directly. Of course, the final review and approval were done by a human π
Comments