Google Antigravity Directory

The #1 directory for Google Antigravity prompts, rules, workflows & MCP servers. Optimized for Gemini 3 agentic development.

Resources

PromptsMCP ServersAntigravity RulesGEMINI.md GuideBest Practices

Company

Submit PromptAntigravityAI.directory

Popular Prompts

Next.js 14 App RouterReact TypeScriptTypeScript AdvancedFastAPI GuideDocker Best Practices

Legal

Privacy PolicyTerms of ServiceContact Us
Featured on FazierVerified on Verified ToolsFeatured on WayfindioAntigravity AI - Featured on Startup FameFeatured on Wired BusinessFeatured on Twelve ToolsListed on Turbo0Featured on findly.toolsFeatured on Aura++That App ShowFeatured on FazierVerified on Verified ToolsFeatured on WayfindioAntigravity AI - Featured on Startup FameFeatured on Wired BusinessFeatured on Twelve ToolsListed on Turbo0Featured on findly.toolsFeatured on Aura++That App Show

© 2026 Antigravity AI Directory. All rights reserved.

The #1 directory for Google Antigravity IDE

This website is not affiliated with, endorsed by, or associated with Google LLC. "Google" and "Gemini" are trademarks of Google LLC.

Antigravity AI Directory
PromptsMCPBest PracticesUse CasesLearn
Home
MCP Servers
Refactor MCP Server
edit-3

Refactor MCP Server MCP Server

Regex-based code refactoring

refactorregexsearch-replacecoding

About

## Refactor MCP Server: Intelligent Code Refactoring Assistant The **Refactor MCP Server** provides sophisticated code refactoring capabilities within Google Antigravity, enabling safe, automated code transformations that improve structure, readability, and maintainability while preserving functionality. ### Why Refactor MCP? - **Safe Transformations**: Apply complex refactoring patterns with confidence using AST-based transformations - **Pattern Detection**: Automatically identify code smells and suggest appropriate refactoring strategies - **Multi-File Refactoring**: Rename symbols, move functions, and restructure across entire codebases safely - **Preview Changes**: Review proposed changes before applying with detailed diff visualization - **Undo Capability**: Easily revert refactoring operations if results do not meet expectations ### Key Features #### 1. Code Restructuring ```python from anthropic import Anthropic client = Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Extract the validation logic from processOrder into a separate validateOrder function" }] ) ``` #### 2. Symbol Renaming ```python # Rename across codebase response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Rename the UserManager class to UserService across all files and update imports" }] ) ``` #### 3. Pattern Conversion ```python # Apply modern patterns response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Convert all Promise chains in the api/ directory to async/await syntax" }] ) ``` #### 4. Code Smell Detection ```python # Identify issues response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Analyze the utils/ directory for code smells and suggest refactoring opportunities" }] ) ``` ### Configuration ```json { "mcpServers": { "refactor": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-refactor"], "env": { "REFACTOR_PREVIEW_MODE": "true", "REFACTOR_BACKUP_ENABLED": "true" } } } } ``` ### Use Cases **Technical Debt Reduction**: Systematically improve code quality by applying consistent refactoring patterns across the codebase. **API Evolution**: Safely rename and restructure public APIs while updating all dependent code automatically. **Framework Migration**: Transform code patterns when migrating between frameworks or library versions. **Code Review Implementation**: Apply reviewer suggestions as safe, trackable refactoring operations. The Refactor MCP Server brings professional-grade refactoring tools into the AI-assisted development workflow, making code improvement safe, efficient, and accessible.

Installation

Configuration
{
  "mcpServers": {
    "refactor": {
      "mcpServers": {
        "refactor": {
          "args": [
            "-y",
            "refactor-mcp"
          ],
          "command": "npx"
        }
      }
    }
  }
}

How to Use

  1. 1Regex-based operations
  2. 2Cross-file search/replace
  3. 3Advanced filtering

Related MCP Servers

🧰

Toolhouse MCP

Universal AI tool platform that equips your AI with production-ready capabilities. Execute code, browse the web, manage files, send emails, and more through a unified MCP interface.

🔨

Smithery Registry MCP

The MCP server registry and discovery platform. Browse, search, and install MCP servers from the community. Find the perfect integrations for your AI development workflow.

🔍

MCP Inspector

Official debugging and testing tool for MCP servers. Inspect server capabilities, test tool calls, validate responses, and debug protocol communication in real-time.

← Back to All MCP Servers