Skip to main content
The Gleap MCP server lets AI agents such as Claude, ChatGPT, Cursor or Kai work with your surveys: draft a survey from a one-line request, check its logic, read results and AI insights, and draft follow-ups to respondents. Agents create and edit drafts; publishing and sending stay with your team.

Connect

Add the Gleap MCP server as a custom connector in your AI client and sign in with Gleap (OAuth): Clients that can’t do OAuth send the headers x-gleap-api-key and x-gleap-project-id instead. The agent acts with your role in the project.

Tools

How agents build a survey

  1. create_survey with a definition. The tool rejects common mistakes before saving — unknown properties, duplicate ids or keys, jumps to unknown or earlier questions, conditions on choice labels instead of choice ids, NPS ranges outside 0–10 — and returns Gleap’s validation of the saved draft.
  2. The agent fixes problems with update_survey (always the complete definition) or validate_survey.
  3. You open the reviewUrl the tool returns, check the survey in the editor and click Publish changes.
Example request to an agent:
Create a churn survey for customers who cancel. Ask why, and if it’s pricing, ask what price would have worked. Show it full screen right after they cancel.
The agent creates a full-screen draft with a single question, a jump from the too_expensive choice to a number question, two endings and the trigger subscription_cancelled (once per contact) — and tells you it hasn’t published it.

Guardrails

  • create_survey always saves status: "draft"; update_survey only writes the draft definition. Neither publishes nor changes a live survey’s version, status or targeting.
  • publish_survey goes through the same publish endpoint as the dashboard. For agents it returns { "published": false, "requiresApproval": true, "reviewUrl": "…" }; the agent shouldn’t retry.
  • reach_out_to_respondent sends nothing unless the call passes send: true, which agents should only do after you approved the exact message.
  • Results stay compact: lists are capped, long answers are clipped and responses are paged with a cursor.
  • Customer-facing agent runs (Kai answering one customer) can’t use survey tools.