developer-toolsproductivity

Gravity Forms

by gravitykit

Integrate with Gravity Forms REST API for robust form, entry, and notification management, advanced search, uploads, and

Integrates with Gravity Forms REST API v2 to provide comprehensive form, entry, submission, feed, and notification management with intelligent field operations, advanced search capabilities, file upload handling, and dual environment support for safe WordPress development workflows.

github stars

13

Full Gravity Forms REST API v2 coverageDual environment support for safe developmentAdd-on integration management

best for

  • / WordPress developers managing Gravity Forms
  • / Site administrators handling form submissions
  • / Automating form-based workflows

capabilities

  • / Manage WordPress forms and form fields
  • / Create and submit form entries with validation
  • / Search and filter form submissions
  • / Handle file uploads through forms
  • / Configure feeds for MailChimp, Stripe, PayPal integrations
  • / Manage form notifications and settings

what it does

Connects to Gravity Forms REST API to manage WordPress forms, entries, submissions, and add-on feeds directly through MCP-compatible clients.

about

Gravity Forms is a community-built MCP server published by gravitykit that provides AI assistants with tools and capabilities via the Model Context Protocol. Integrate with Gravity Forms REST API for robust form, entry, and notification management, advanced search, uploads, and It is categorized under developer tools, productivity.

how to install

You can install Gravity Forms in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Gravity Forms is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

MCP for Gravity Forms

A Model Context Protocol (MCP) server for Gravity Forms. Interact with your WordPress forms, feeds, and entries through any MCP-compatible client.

npm version

Built by GravityKit for the Gravity Forms community.

Features

  • Comprehensive API Coverage: Gravity Forms API endpoints
  • Smart Field Management: Intelligent field operations with dependency tracking
  • Advanced Search: Complex filtering and searching capabilities for entries
  • Form Submissions: Full submission workflow with validation
  • Add-on Integration: Manage feeds for MailChimp, Stripe, PayPal, and more
  • Type-Safe: Comprehensive validation for all operations
  • Battle-Tested: Extensive test suite with real-world scenarios

Quick Start

Prerequisites

  • Node.js 18+
  • WordPress with Gravity Forms 2.5+
  • HTTPS-enabled WordPress site (required for authentication)

Installation

  1. Clone the repository

    git clone https://github.com/GravityKit/GravityMCP.git
    cd GravityMCP
    npm install
    
  2. Set up environment

    cp .env.example .env
    
  3. Configure credentials in .env:

    GRAVITY_FORMS_CONSUMER_KEY=your_key_here
    GRAVITY_FORMS_CONSUMER_SECRET=your_secret_here
    GRAVITY_FORMS_BASE_URL=https://yoursite.com
    

    For local development (Laravel Valet, MAMP, etc.):

    # Add this line if using self-signed certificates
    MCP_ALLOW_SELF_SIGNED_CERTS=true
    
  4. Generate API credentials in WordPress:

    • Go to Forms → Settings → REST API
    • Click Add Key
    • Save the Consumer Key and Secret
  5. Add to Claude Desktop

    Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

    {
      "mcpServers": {
        "gravitymcp": {
          "command": "node",
          "args": ["/path/to/GravityMCP/src/index.js"],
          "env": {
            "GRAVITY_FORMS_CONSUMER_KEY": "your_key",
            "GRAVITY_FORMS_CONSUMER_SECRET": "your_secret",
            "GRAVITY_FORMS_BASE_URL": "https://yoursite.com"
          }
        }
      }
    }
    

Available Tools

Forms (6 tools)

  • gf_list_forms - List forms with filtering and pagination
  • gf_get_form - Get complete form configuration
  • gf_create_form - Create new forms with fields
  • gf_update_form - Update existing forms
  • gf_delete_form - Delete forms (requires ALLOW_DELETE=true)
  • gf_validate_form - Validate form data

Entries (5 tools)

  • gf_list_entries - Search entries with advanced filters
  • gf_get_entry - Get specific entry details
  • gf_create_entry - Create new entries
  • gf_update_entry - Update existing entries
  • gf_delete_entry - Delete entries (requires ALLOW_DELETE=true)

Field Operations (4 tools)

  • gf_add_field - Add fields with intelligent positioning
  • gf_update_field - Update fields with dependency checking
  • gf_delete_field - Delete fields with cascade options
  • gf_list_field_types - List available field types

Submissions (2 tools)

  • gf_submit_form_data - Submit forms with full processing
  • gf_validate_submission - Validate without submitting

Add-ons (7 tools)

  • gf_list_feeds - List all add-on feeds
  • gf_get_feed - Get specific feed configuration
  • gf_list_form_feeds - List feeds for a specific form
  • gf_create_feed - Create new add-on feeds
  • gf_update_feed - Update existing feeds
  • gf_patch_feed - Partially update feed properties
  • gf_delete_feed - Delete add-on feeds

Usage Examples

Search Entries

await mcp.call('gf_list_entries', {
  search: {
    field_filters: [
      { key: "1.3", value: "John", operator: "contains" },
      { key: "date_created", value: "2024-01-01", operator: ">=" }
    ],
    mode: "all"
  },
  sorting: { key: "date_created", direction: "desc" }
});

Add Fields

await mcp.call('gf_add_field', {
  form_id: 1,
  field_type: 'email',
  properties: {
    label: 'Email Address',
    isRequired: true
  }
});

Submit Forms

await mcp.call('gf_submit_form_data', {
  form_id: 1,
  input_1: "John Doe",
  input_2: "john@example.com",
  input_3: "Message content"
});

Configuration

Required Environment Variables

  • GRAVITY_FORMS_CONSUMER_KEY - API consumer key
  • GRAVITY_FORMS_CONSUMER_SECRET - API consumer secret
  • GRAVITY_FORMS_BASE_URL - WordPress site URL

Optional Settings

  • GRAVITY_FORMS_ALLOW_DELETE=false - Enable delete operations
  • GRAVITY_FORMS_TIMEOUT=30000 - Request timeout (ms)
  • GRAVITY_FORMS_DEBUG=false - Enable debug logging
  • MCP_ALLOW_SELF_SIGNED_CERTS=false - Allow self-signed SSL certificates (local dev only)

Test Environment Configuration

The server supports dual environment configuration to safely test without affecting production data.

Setting Up Test Environment

Add test site credentials to your .env file alongside production credentials:

# Production/Live Site
GRAVITY_FORMS_CONSUMER_KEY=ck_live_key
GRAVITY_FORMS_CONSUMER_SECRET=cs_live_secret
GRAVITY_FORMS_BASE_URL=https://www.yoursite.com

# Test/Staging Site (recommended for safe testing)
GRAVITY_FORMS_TEST_CONSUMER_KEY=ck_test_key
GRAVITY_FORMS_TEST_CONSUMER_SECRET=cs_test_secret
GRAVITY_FORMS_TEST_BASE_URL=https://staging.yoursite.com

# Enable test mode (optional)
GRAVITY_MCP_TEST_MODE=true

Test Environment Features

When using test configuration:

  • Automatic test form prefixing - All test forms created with "TEST_" prefix
  • Auto-cleanup - Test forms automatically removed after testing
  • Environment isolation - Complete separation from production data
  • Safe experimentation - Test destructive operations without risk

Using Test Mode

# Verify test environment configuration
GRAVITY_MCP_TEST_MODE=true npm run check-env

# Create test data on test site (requires test credentials)
npm run setup-test-data

# Run all tests against test site (auto-detects test credentials)
npm test

# Interactive testing with MCP Inspector (test mode)
GRAVITYMCP_TEST_MODE=true npm run inspect

# Run specific test suites against test site
NODE_ENV=test npm run test:forms
NODE_ENV=test npm run test:entries
NODE_ENV=test npm run test:submissions

Test Mode Detection

The server automatically uses test configuration when:

  1. GRAVITYMCP_TEST_MODE=true is set
  2. OR NODE_ENV=test is set
  3. OR test credentials are configured and test commands are run

Test Safety Features

The server includes multiple safety mechanisms to prevent accidental production data contamination:

  1. Test Credential Requirements - The setup-test-data script will fail by default if test credentials aren't configured
  2. No Silent Fallbacks - Scripts that create or modify data won't silently fall back to production
  3. Explicit Production Override - Production usage requires scary --force-production flag with warnings
  4. Clear Error Messages - Helpful guidance on configuring test credentials when missing
  5. Test Data Prefixing - All test forms automatically prefixed with "TEST_" for easy identification

Best Practices

  1. Always configure a test environment - Use a staging/test WordPress site
  2. Never test on production first - Validate on test site before production
  3. Keep test credentials separate - Different API keys for test vs live
  4. Use prefixes for test data - Makes cleanup easy and identification clear
  5. Enable debug mode for testing - GRAVITY_FORMS_DEBUG=true for detailed logs
  6. Review safety warnings - Take warnings seriously when they appear

Testing

# Run all tests
npm run test:all

# Run specific test suites
npm run test:forms
npm run test:entries
npm run test:field-operations

# Run with live API (requires credentials)
npm test

Security

  • HTTPS Required: All API communication encrypted
  • Delete Protection: Destructive operations disabled by default
  • Input Validation: All inputs validated before API calls
  • Rate Limiting: Automatic retry with exponential backoff

Troubleshooting

Connection Issues

  • Verify credentials with npm run check-env
  • Ensure WordPress site is HTTPS-enabled
  • Check REST API is enabled in Gravity Forms settings

Local Development with Self-Signed Certificates

If you're using a local development environment (Laravel Valet, MAMP, Local WP, etc.) with self-signed SSL certificates, you may encounter authentication errors. To fix this:

Add to your .env file:

MCP_ALLOW_SELF_SIGNED_CERTS=true

⚠️ Security Warning: Only disable SSL certificate verification for local development environments. Never use this setting in production!

Authentication Errors

  • Confirm API keys are correct
  • Verify user has appropriate Gravity Forms capabilities
  • Check Forms → Settings → REST API for key status
  • For local development, ensure MCP_ALLOW_SELF_SIGNED_CERTS=true is set if using self-signed certificates

Debug Mode

Enable detailed logging:

GRAVITY_FORMS_DEBUG=true

Support

License

GPL-2.0 License - see LICENSE file for details.

Contributing

We welcome contributions from the Gravity Forms community! Whether you're building add-ons, managing forms, or integrating with other services, your insights and code contributions can help everyone.

How to Contribute

  1. Fork the repository - Start by creating your own copy
  2. Create a feature branch - Keep your changes organized
  3. Add tests - Ensure reliab

FAQ

What is the Gravity Forms MCP server?
Gravity Forms is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Gravity Forms?
This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
MCP server reviews

Ratings

4.510 reviews
  • Shikha Mishra· Oct 10, 2024

    Gravity Forms is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Piyush G· Sep 9, 2024

    We evaluated Gravity Forms against two servers with overlapping tools; this profile had the clearer scope statement.

  • Chaitanya Patil· Aug 8, 2024

    Useful MCP listing: Gravity Forms is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Sakshi Patil· Jul 7, 2024

    Gravity Forms reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Ganesh Mohane· Jun 6, 2024

    I recommend Gravity Forms for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Oshnikdeep· May 5, 2024

    Strong directory entry: Gravity Forms surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Dhruvi Jain· Apr 4, 2024

    Gravity Forms has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Rahul Santra· Mar 3, 2024

    According to our notes, Gravity Forms benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Pratham Ware· Feb 2, 2024

    We wired Gravity Forms into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Yash Thakker· Jan 1, 2024

    Gravity Forms is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.