Connecting to the MCP Server

Overview

This article explains how to connect your AI assistant to Gravity Forms by enabling the MCP in WordPress, creating an Application Password, and configuring your AI client.

Prerequisites

WordPress 6.9 or higher with Gravity Forms installed and active.

Enable the Gravity Forms MCP

  1. In WordPress, go to Forms → Settings → MCP.
Image showing Gravity Forms MCP Settings.
  1. Switch the toggle and save.

Create an Application Password

  1. In WordPress, go to Users → Profile → Application Passwords.
  2. Enter a recognizable name (e.g., “Claude MCP” or “Cursor MCP”).
  3. Click Add New Application Password.
  4. Copy the generated password. It is shown only once. Save it somewhere safe.
Image showing WordPress Application Passwords.
You’ll use this username and password in your AI client configuration.

Note: Generate the Application Password from a dedicated user account with only the capabilities the MCP Server needs. Refer to Creating a User for MCP Access for more information.

Claude Desktop Setup

⚠️ Note: The MCP (Model Context Protocol) integration lets AI assistants access your Gravity Forms, including reading, creating, updating, and deleting forms, entries, and settings (including API keys). AI assistants can make mistakes. Enable write access only when necessary, validate outputs, maintain regular site backups, and consider how your AI assistant will have access to form-collected data.

  1. Download and install Claude Desktop.
  2. Go to Settings → Developer.
  3. Click Edit Config next to “Local MCP servers”.
MCP Settings in Claude Desktop
  1. Add the following configuration, replacing the values for “yoursite.com”, your-username” and “your-api-password” with your own values.:
{
    "mcpServers": {
        "gravityforms": {
            "command": "npx",
            "args": [
                "-y",
                "@automattic/mcp-wordpress-remote"
            ],
            "env": {
                "WP_API_URL": "https://yoursite.com/wp-json/mcp/gravityforms",
                "WP_API_USERNAME": "your-username",
                "WP_API_PASSWORD": "your-api-password",
                "OAUTH_ENABLED": "false"
            }
        }
    }
}
  1. Save the file.
  2. Quit and restart Claude Desktop.

Refer to the Claude official documentation for more information.

Other AI Clients

Most MCP-compatible AI clients use a JSON configuration file. Use the same configuration format as Claude Desktop above, adapting the file location to match your client:

  • Cursor: Add to ~/.cursor/mcp.json or per-project .cursor/mcp.json
  • Claude Code: Add to .mcp.json in your project directory or ~/.claude/mcp.json globally
  • VS Code: Add to .vscode/mcp.json in your project workspace
  • Other clients: Refer to your client’s MCP setup documentation for the configuration file location

Replace the same values (URL, username, password) for your site and user.

Testing Your Connection

Verify Tools Are Available

Start a new chat with your AI assistant and ask it to list available tools.

Try a Simple Prompt

Image showing Claude Desktop connected to the Gravity Forms MCP

Test the connection with a read-only operation:

  • “List all my forms”
  • “How many submissions does form 1 have?”
  • “Get the details of form 2”

If the assistant responds with data from your site, the connection is working.

Troubleshooting

SymptomLikely CauseFix
401 / Authorization failedWrong or missing Application Password or usernameRecreate the Application Password in WordPress; verify WP_API_USERNAME and WP_API_PASSWORD in your config
The tool isn’t listed / “unknown tool”The tool is disabled in the MCP settings, or the master switch is offGo to Forms → Settings → MCP and enable the master switch and the tool you want
“Permission denied” when running a toolThe WordPress user lacks the required capabilityUse a user/role with the appropriate Gravity Forms capability for that tool
MCP settings show “unavailable”WordPress is older than 6.9Update WordPress to 6.9 or higher
The config file won’t saveInvalid JSON syntaxCheck your JSON formatting (commas, quotes, brackets) using a JSON validator
Client won’t recognize the MCP serverConfig file not saved or client not restartedSave your config file and fully restart your AI client (don’t just close the window)

If you need further assistance, please contact our support team.