You MUST fully ingest @AGENTS.md first.
- Package:
@gravitykit/mcpv2.1.0 - Type: Node.js MCP server (ESM)
- Purpose: Full Gravity Forms REST API v2 coverage via 28 MCP tools
- Repo: https://github.com/GravityKit/MCP
npm run dev # Dev with auto-reload
npm run inspect # MCP Inspector debugging
npm run check-env # Validate environment
npm run test:all # Run all test suites
npm test # Integration tests (live API)Required env vars (see .env.example for full list):
GRAVITY_FORMS_CONSUMER_KEY— from WP Admin > Forms > Settings > REST APIGRAVITY_FORMS_CONSUMER_SECRETGRAVITY_FORMS_BASE_URL— WordPress site URL, no trailing slash
- Never use
console.login MCP mode — stdout is JSON-RPC. Uselogger.info/error/warnfromutils/logger.js - Always use
.jsextension in imports (ESM requirement) - Delete operations require
GRAVITY_FORMS_ALLOW_DELETE=trueenv var - Fields are form properties — no direct field endpoints; modify via form PUT
- Update operations fetch-then-merge — always GET existing data first to avoid data loss
- Minimize response tokens — no pretty-print (
JSON.stringify(result)notnull, 2), no redundantmessagestrings, no echo-back of input IDs, nocreated/updatedbooleans. Return only essential data. - Keep tool descriptions terse — every token in tool schemas is sent on every
tools/listcall - Compact mode strips null, empty strings, and entry meta —
stripEmpty()inutils/compact.jsruns on all responses. Entry tools also strip plugin-added meta keys viastripEntryMeta(), keeping only core properties and field values.falseis preserved. Passcompact=falsefor full raw data. - Test mode uses dev site — when
GRAVITYKIT_MCP_TEST_MODE=true(or legacyGRAVITYMCP_TEST_MODE=true), the client auto-resolvesGRAVITY_FORMS_TEST_*env vars to connect to the test site instead of production. Resolution logic lives intestConfig.resolveEnv()inconfig/test-config.js.
When tagging a new version, you MUST complete ALL of these steps:
- Update
CHANGELOG.mdwith all changes since the last release (follow Keep a Changelog format) - Bump
versioninpackage.json - Update the version in this file (
CLAUDE.md→ Project Identity → Package) - Commit with message
chore(release): bump version to X.Y.Z - Tag:
git tag vX.Y.Z - Push:
git push origin main --tags