Search DevTools

Jump to any tool or page

Gleap

Gleap's official MCP server: tickets, contacts, CRM, help center and support stats. OAuth sign-in.

GleapSDK0 stars0 forksDeveloper Tools
View source

Install

mcp_config.json

{
  "mcpServers": {
    "ai-gleap-mcp": {
      "url": "https://mcp.gleap.ai/mcp",
      "type": "streamable-http"
    }
  }
}

Documentation

Gleap MCP Server

Connect your Gleap workspace to Claude and other AI assistants via the Model Context Protocol. Manage tickets, contacts, help center articles, and statistics using natural language.

Prerequisites

  • A Gleap account with at least one project
  • An API key (Gleap → Settings → Developer → API keys) and your project (the Project ID from Settings → Project → General, or the project's internal ID)

Local development

Install dependencies, then build and run the server locally:

npm install    # install dependencies
npm run build  # compile TypeScript to build/
npm start      # run the compiled server (node build/index.js)

Use npm run dev to recompile automatically on file changes while you work.

Node.js 22 (engines in package.json). Before opening a PR, run npm run typecheck, npm test and npm run build; CI runs them too. Coding agents: see AGENTS.md.

Connecting to Claude (OAuth — recommended)

  1. In Claude, open Settings → Connectors and add a custom connector
  2. Enter the Gleap MCP server URL of the region your Gleap workspace is hosted in:
    • EU: https://mcp.gleap.ai/mcp
    • US: https://mcp.us.gleap.ai/mcp
  3. Click Connect — you'll be redirected to Gleap to authorize access
  4. Select the project you want Claude to access and approve the requested scopes
  5. Done. Claude can now read and manage your Gleap workspace with your role in that project.

No API key or client ID setup is required. The OAuth flow handles authentication automatically.

Alternative: API key auth (for clients that support custom headers)

Send these headers with every request:

HeaderValue
x-gleap-api-keyYour Gleap API key
x-gleap-project-idYour project: the Project ID (Settings → Project → General) or its internal ID

Coding sessions

A coding agent working a Gleap ticket names its coding session, with the sessionId argument of a tool (report_progress, send_message, …) or for every call with the header x-gleap-session-id (the client sets it from .gleap/session.json, a Kai Code sandbox from its MCP config; OAuth and API-key connections alike). The server then sends X-Gleap-Session-Id with every write of that tool call (reads go without it), plus X-Gleap-Session-Explicit: 1 when the id came from the tool's own sessionId argument (Gleap refuses every write that explicitly names a stopped session): Gleap books the writes to the session's agent (an agent's reply does not stop the agent the way a teammate's does) and checks each write against the session (the episode guard). A session id that does not count for the write (another project's session, one not linked to the written ticket, or one left behind in .gleap/session.json) is ignored: the write is then the caller's own, as without a session. The results then also carry what Gleap says about the session, whatever the tool:

  • stop: true: the ticket is no longer the session's (a teammate took it over, replied to the customer, unassigned the agent or stopped the session). The result is only the STOP instruction, with structuredContent.gleapStop: true: the field Kai Code's runner and the Gleap plugin act on (never words in a result). Only this server sets it; a field of that name in API data is dropped.
  • newCustomerMessages: what the customer wrote that the agent has not been shown, listed after the result.
  • A send written before the customer's newest message is refused (409) with those messages (staleThread: true in the result): the agent reads them, adjusts and sends once more.

Without a session id nothing changes: no header, no extra lines.

Available Tools

ToolDescription
search_ticketsFull-text search across tickets
find_ticketsFilter tickets by status, priority, assignee, tags, date
get_ticketGet a specific ticket by ID
create_ticketCreate a new ticket
get_ticket_typesList ticket types with their custom fields, status lanes and priorities
get_ticket_messagesGet the full conversation history (messages) for a ticket
get_ticket_activity_logGet the console logs, network requests and click trail the SDK captured with a ticket. Coding agents call it on bug reports before reproducing, to see the console errors, failed requests and the user's clicks. Headers are never returned, secrets are redacted and long logs are trimmed (errors and failed requests first); section and search narrow it
send_messageReply to a customer or add an internal note (Markdown). Agent workflows: the agent asks its operator in its own conversation (an instruction to answer or update the customer is the approval), then sends; with sessionId the reply is the session agent's and Gleap refuses a stale one (stale_thread, with the new messages) or one after a stop
draft_reply_to_composerStage a drafted reply in the ticket's dashboard composer for a person to review, edit and send. Sends nothing. For a person's own AI client, also when a .gleap/session.json from another ticket is still around: Gleap refuses Kai runs and the coding session working that ticket (410), which ask their operator and send with send_message
report_progressReport the fix status on the Gleap coding session you were started from (deeplink hand-off loop; session-scoped since 2026-08), the same snapshot every runtime reports: status (queued, working, needs_input, completed, failed, cancelled), step while working (investigating, reproduced, fixing), a one-line message, question with needs_input (kind, prompt, options, audience customer or team), customerLine (one sentence of status the customer may read), howSolved (one paragraph on how the ticket was solved, sent with the last report; it feeds Kai Support's learning), agentKind, agentName and device. The older phase still works: status wins, and a report with only status also sends the phase it stands for, for a Server from before the fix status. Registers PRs (completed with prUrl) and takes the two fix messages: customerUpdateMessage (sent right away) and customerShipMessage (sent when the fix is live, by the project's post-merge setting); the result says what happened to each. The ticket is done when the customer confirms or 24 hours after the last answer without a reply, not at the merge. The result also carries stop, newCustomerMessages (see Coding sessions) and the hook block for .gleap/session.json
update_planLive checklist on the Gleap coding session (sessionId or ticketId, like report_progress): the whole list each call, statuses pending/in_progress/completed/cancelled
wrap_upEnd-of-turn card on the session: recap, at most one question, 0-2 actions (merge_pr, open_pr, review_changes, open_preview; send_customer_update is removed and refused)
share_screenshotPost a screenshot (optionally a before/after pair) into the session thread. Returns the curl -T upload commands to run (the server cannot read local files); imageBase64 (≤ 1.5 MB each) for agents without a shell
publish_artifactPublish a self-contained HTML page (≤ 1 MB) into the session thread; artifactId publishes a new version
get_agent_workflowThe Gleap ticket workflow (fix, answer, feature) as Markdown, plus the .gleap/session.json content for the Gleap plugin
get_ticket_screenshotThe ticket's SDK screenshot as image content (Gleap file hosts only, ≤ 2 MB)
describe_databaseThe team's own databases Kai Code may read (read-only, this ticket's customer only): tables, columns, masked columns, query format. Kai Code runs on a ticket only (the run key's ticket pin); refused for every other connection
query_databaseOne read-only query (a SQL SELECT or a MongoDB JSON request) on the team's database, kept to the ticket's customer (scope: team across customers always waits for a data owner); at most 200 rows, sensitive columns masked. It may wait for a person's approval (status: pending with a queryId). Values from results never go into code, tests, fixtures, commits or PRs. Kai Code runs on a ticket only
get_query_resultThe status of a query that waited for approval, and its rows once a data owner let it run (kept a day). Kai Code runs on a ticket only
get_workflowsList all workflows in the project (live and draft), with their channels, whether Kai Support answers in them (kaiAnswers) and the agent they pass to
get_workflows_available_for_ticketList the live workflows startable on a specific ticket
run_ticket_workflowManually start a workflow on a ticket (the "Start a workflow" action)
get_setup_statusWhere the project stands for AI support: the Hard tickets settings (hardTickets: on a click or automatically, on Kai Code Cloud or a Bridge machine; ticketDone: thank-you and review ask), the default team, and (admins of a new workspace) the signup steps left
get_agentsThe project's AI agents: name, live or draft, customer-facing or team
set_ai_modeRemoved (stub for one release): AI-first and AI-assisted are gone; does nothing and points to update_workflow and the Hard tickets settings
start_kai_resolveRemoved (stub for one release): Kai Resolve is Kai Support's hard-ticket mode, started with Work on it on the ticket or automatically; does nothing and says so
update_workflowChange which channels a workflow runs on (addChannels / removeChannels) and whether it is live; never its steps
get_workflow_build_optionsWhat a workflow can use, by name: teams, tags, Your API endpoints, webhooks, integrations, sequences, contact fields, message variables
get_workflow_stepsOne workflow step by step, with path ids and step numbers, what could go live and the hashes publish_workflow_draft needs
create_workflow_draftBuild a new conversation workflow from steps; always a draft, no customer gets it
change_workflow_draftEdit a workflow's name, trigger, channels, audience and steps; a change to a live workflow waits as a draft
publish_workflow_draftMake a draft live or apply a waiting change, for the version the person agreed to (draftHash), with the editor's publish checks
create_team / update_teamCreate a team, rename it, add or remove members (others stay), change how it hands out tickets
set_default_teamThe team agents escalate to when nobody else is named (admins)
search_contactsFull-text search across contacts
get_contactsFilter contacts by email, name, company
get_contactGet a specific contact by ID
create_contactCreate a new contact
get_companiesList/search the project's companies (organisations)
get_companyGet a company by its external companyId, incl. custom data
update_companyCreate or update a company (name, plan, value, custom data)
get_pipelinesList CRM pipelines with their stages
get_pipelineGet a pipeline incl. stages and fields (fieldIds for entry values)
get_pipeline_statsPer-stage counts and field aggregations (e.g. sum of deal values per stage) plus pipeline totals
get_pipeline_entriesList a pipeline's entries, optionally for one stage
get_pipeline_entryGet one entry with its pipeline context
add_pipeline_entryAdd a company/contact to a pipeline (stage + initial values)
move_pipeline_entryMove an entry to another stage
update_pipeline_entry_valuesUpdate an entry's field values (merge; null clears)
remove_pipeline_entryRemove an entry from a pipeline (record itself is untouched)
get_record_pipelinesWhich pipelines a company/contact is on
get_help_center_sitesList the project's help center sites (id, name, url, access mode, layout, collection and article counts); older servers answer with the default site only
get_help_center_collectionsList help center collections; optional site (default or a site id) lists one site's
get_help_center_collections_treeFull tree of collections and subcollections (each carries its site)
get_help_center_articlesList articles in a collection
get_help_center_articleGet a specific article by ID
create_help_center_collectionCreate a new collection; optional site for a top-level collection
move_help_center_collections_to_siteMove top-level collections (with sub-collections and articles) to another help center site
update_help_center_collectionUpdate an existing collection
upload_imageStore a PNG, JPEG, GIF or WebP (base64 data or public url) on the project's Gleap CDN and get its permanent fileUrl
create_image_upload_linkSingle-use, 15-minute link that uploads one image from disk (curl -F file=@cover.png <link>), for agents with a shell
create_help_center_articleCreate a new article (TipTap JSON content)
update_help_center_articleUpdate an existing article. Partial per-locale updates: locales you send are changed, locales you omit are preserved
get_statistics_factsFact metrics: response times, ticket counts, SLA, AI stats
get_statistics_listList metrics: top agents, top articles, team performance
get_statistics_bar_chartBar chart data: tickets over time, ratings, SLA
get_raw_data_statisticsIndividual event rows behind the metrics, filtered by action type, agent, ticket
get_targeting_optionsEvents and contact attributes outbound messages can target, with the condition syntax
get_event_tracking_guideTracking code (SDKs + backend) for an event or contact attribute targeting needs but the project lacks
list_outbound_messagesList one outbound type: surveys, chat messages, banners, info cards, checklists, tours, tooltips, news, emails, push, WhatsApp
get_outbound_messageOne outbound item: content, targeting, reviewUrl, optional stats
create_outbound_draftDraft a survey, chat message, banner, info card, checklist, push, product tour or tooltip set
update_outbound_contentRevise a non-live outbound item's content
configure_outbound_targetingTrigger, frequency, page rules, audience and schedule of a non-live outbound item
preview_outbound_audienceCount and sample who an audience matches; saves nothing
publish_outboundSet an outbound item live after operator approval (one-offs: with the approved recipient count)
pause_outboundTake a live outbound item off
list_sequencesSequences (Outreach › Sequences) with status, how contacts are enrolled, goal, counts and reply/goal rates
get_sequenceOne sequence: enrollment, exit, goal, sending, the step tree as an outline plus editable steps, unpublished changes and what blocks going live
get_sequence_templatesThe starter templates (blank, onboarding, trial, reengage) and the full step/settings/condition/variable reference with a worked example
create_sequenceNew draft sequence from a template and/or a full definition in one call
update_sequenceChange name, enrollment, exit, goal, sending (merged) and steps (whole list or stepChanges by id); on a live sequence saved as unpublished changes
publish_sequence_changes / discard_sequence_changesMake a live sequence's unpublished changes live, or drop them
set_sequence_statusTurn a sequence live or pause it (server validation messages returned verbatim)
enroll_in_sequenceEnroll up to 500 contacts by email, userId or contact id in a live sequence (they start getting real messages); skipped contacts with reasons
get_sequence_statsCounts, reply and goal rates, exit reasons and per-step funnel
list_sequence_enrollments / get_sequence_enrollmentContacts in a sequence (filter by status, search) and one contact's timeline
manage_sequence_enrollmentPause, resume or exit one contact's run
preview_sequenceRender every message for a contact and list variables that resolve empty; sends nothing
send_sequence_test_emailSend one email step as a test to yourself or up to 5 addresses
search_feature_requestsSemantic dedupe search over feature requests: up to 5 matches with rerank scores, including requests not on the public roadmap yet (public: false)
get_feature_requestRead one feature request by id or ticket number: title, description excerpt, status, upvote count, share link (never voter identities)
subscribe_to_feature_requestIdempotently add a customer as upvoter; returns the request's status and share link
create_feature_requestFile a feature request with the customer as first upvoter. Matching requests refuse it with {ok: false, duplicate: true, candidates}; notDuplicateOf lists candidates that are a different need
list_surveys / get_surveysSurveys with id, SDK id, status, format, published version and unpublished changes (get_surveys is an alias)
get_surveyOne survey's draft (or published) definition, page settings and in-app targeting
create_surveyNew survey from a definition; always an unpublished draft
update_surveyReplace a survey's draft definition; on a live survey it saves the next draft version
validate_surveyServer validation of a definition or the stored draft, without saving
publish_surveyLaunch: publish the draft as the next version; goLive: true also shows it in the app
pause_surveyStop showing a survey in the app (page and emails keep working)
get_survey_resultsTotals, NPS, per-question counts, drop-off, endings and paths from stored counters, plus the step funnel when analytics events exist
get_survey_analyticsEvent analytics with previous-period deltas: views, starts, submissions, rates, step funnel with drop-off, worst step, timing, score, versions, device/channel breakdowns, busiest times, reminders, email, quality
get_survey_insightsStored AI themes, drivers, segments and alerts
ask_survey_resultsPlain-language question about the responses → answer with cited response ids (AI, billed)
get_survey_responsesCompact response rows with filters (status, answer by key, theme, channel, contact, text) and cursor pagination
get_survey_responseOne response with labelled answers, path, ending and contact
search_survey_responsesKeyword search over the answers of every survey (or one), with snippet, NPS and contact per hit
reach_out_to_respondentDraft (default) or, with send: true, start a conversation linked to a response
get_survey_summaryStored AI summary of a survey's responses (legacy)

Error results set isError: true. Reads retry transient API failures (5xx, 429, network errors) twice with backoff, within a 20-second budget. Writes retry only when the request never reached the API (connection refused, DNS failure); calls that pass idempotent: true (feature-request create and subscribe) also retry 502-504. Other writes such as send_message are never repeated.

Prompts and MCP Apps view

  • Prompts fix_ticket and answer_ticket (argument ticket: #number or id) start a ticket workflow with the workflow text and a ticket summary.
  • update_plan, wrap_up, share_screenshot and publish_artifact carry _meta.ui.resourceUri = "ui://gleap/kai-session": hosts that support MCP Apps render the result inline from structuredContent.view; every other client reads the text content.

Examples

Marketing drafts and human review

Use these tools after a human approves the content plan:

| Tool | Outcome | |----

Sourced from the repository README.

More in Developer Tools