Gleap
Gleap's official MCP server: tickets, contacts, CRM, help center and support stats. OAuth sign-in.
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)
- In Claude, open Settings → Connectors and add a custom connector
- 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
- EU:
- Click Connect — you'll be redirected to Gleap to authorize access
- Select the project you want Claude to access and approve the requested scopes
- 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:
| Header | Value |
|---|---|
x-gleap-api-key | Your Gleap API key |
x-gleap-project-id | Your 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, withstructuredContent.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: truein the result): the agent reads them, adjusts and sends once more.
Without a session id nothing changes: no header, no extra lines.
Available Tools
| Tool | Description |
|---|---|
search_tickets | Full-text search across tickets |
find_tickets | Filter tickets by status, priority, assignee, tags, date |
get_ticket | Get a specific ticket by ID |
create_ticket | Create a new ticket |
get_ticket_types | List ticket types with their custom fields, status lanes and priorities |
get_ticket_messages | Get the full conversation history (messages) for a ticket |
get_ticket_activity_log | Get 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_message | Reply 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_composer | Stage 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_progress | Report 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_plan | Live checklist on the Gleap coding session (sessionId or ticketId, like report_progress): the whole list each call, statuses pending/in_progress/completed/cancelled |
wrap_up | End-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_screenshot | Post 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_artifact | Publish a self-contained HTML page (≤ 1 MB) into the session thread; artifactId publishes a new version |
get_agent_workflow | The Gleap ticket workflow (fix, answer, feature) as Markdown, plus the .gleap/session.json content for the Gleap plugin |
get_ticket_screenshot | The ticket's SDK screenshot as image content (Gleap file hosts only, ≤ 2 MB) |
describe_database | The 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_database | One 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_result | The 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_workflows | List 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_ticket | List the live workflows startable on a specific ticket |
run_ticket_workflow | Manually start a workflow on a ticket (the "Start a workflow" action) |
get_setup_status | Where 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_agents | The project's AI agents: name, live or draft, customer-facing or team |
set_ai_mode | Removed (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_resolve | Removed (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_workflow | Change which channels a workflow runs on (addChannels / removeChannels) and whether it is live; never its steps |
get_workflow_build_options | What a workflow can use, by name: teams, tags, Your API endpoints, webhooks, integrations, sequences, contact fields, message variables |
get_workflow_steps | One workflow step by step, with path ids and step numbers, what could go live and the hashes publish_workflow_draft needs |
create_workflow_draft | Build a new conversation workflow from steps; always a draft, no customer gets it |
change_workflow_draft | Edit a workflow's name, trigger, channels, audience and steps; a change to a live workflow waits as a draft |
publish_workflow_draft | Make 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_team | Create a team, rename it, add or remove members (others stay), change how it hands out tickets |
set_default_team | The team agents escalate to when nobody else is named (admins) |
search_contacts | Full-text search across contacts |
get_contacts | Filter contacts by email, name, company |
get_contact | Get a specific contact by ID |
create_contact | Create a new contact |
get_companies | List/search the project's companies (organisations) |
get_company | Get a company by its external companyId, incl. custom data |
update_company | Create or update a company (name, plan, value, custom data) |
get_pipelines | List CRM pipelines with their stages |
get_pipeline | Get a pipeline incl. stages and fields (fieldIds for entry values) |
get_pipeline_stats | Per-stage counts and field aggregations (e.g. sum of deal values per stage) plus pipeline totals |
get_pipeline_entries | List a pipeline's entries, optionally for one stage |
get_pipeline_entry | Get one entry with its pipeline context |
add_pipeline_entry | Add a company/contact to a pipeline (stage + initial values) |
move_pipeline_entry | Move an entry to another stage |
update_pipeline_entry_values | Update an entry's field values (merge; null clears) |
remove_pipeline_entry | Remove an entry from a pipeline (record itself is untouched) |
get_record_pipelines | Which pipelines a company/contact is on |
get_help_center_sites | List 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_collections | List help center collections; optional site (default or a site id) lists one site's |
get_help_center_collections_tree | Full tree of collections and subcollections (each carries its site) |
get_help_center_articles | List articles in a collection |
get_help_center_article | Get a specific article by ID |
create_help_center_collection | Create a new collection; optional site for a top-level collection |
move_help_center_collections_to_site | Move top-level collections (with sub-collections and articles) to another help center site |
update_help_center_collection | Update an existing collection |
upload_image | Store 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_link | Single-use, 15-minute link that uploads one image from disk (curl -F file=@cover.png <link>), for agents with a shell |
create_help_center_article | Create a new article (TipTap JSON content) |
update_help_center_article | Update an existing article. Partial per-locale updates: locales you send are changed, locales you omit are preserved |
get_statistics_facts | Fact metrics: response times, ticket counts, SLA, AI stats |
get_statistics_list | List metrics: top agents, top articles, team performance |
get_statistics_bar_chart | Bar chart data: tickets over time, ratings, SLA |
get_raw_data_statistics | Individual event rows behind the metrics, filtered by action type, agent, ticket |
get_targeting_options | Events and contact attributes outbound messages can target, with the condition syntax |
get_event_tracking_guide | Tracking code (SDKs + backend) for an event or contact attribute targeting needs but the project lacks |
list_outbound_messages | List one outbound type: surveys, chat messages, banners, info cards, checklists, tours, tooltips, news, emails, push, WhatsApp |
get_outbound_message | One outbound item: content, targeting, reviewUrl, optional stats |
create_outbound_draft | Draft a survey, chat message, banner, info card, checklist, push, product tour or tooltip set |
update_outbound_content | Revise a non-live outbound item's content |
configure_outbound_targeting | Trigger, frequency, page rules, audience and schedule of a non-live outbound item |
preview_outbound_audience | Count and sample who an audience matches; saves nothing |
publish_outbound | Set an outbound item live after operator approval (one-offs: with the approved recipient count) |
pause_outbound | Take a live outbound item off |
list_sequences | Sequences (Outreach › Sequences) with status, how contacts are enrolled, goal, counts and reply/goal rates |
get_sequence | One sequence: enrollment, exit, goal, sending, the step tree as an outline plus editable steps, unpublished changes and what blocks going live |
get_sequence_templates | The starter templates (blank, onboarding, trial, reengage) and the full step/settings/condition/variable reference with a worked example |
create_sequence | New draft sequence from a template and/or a full definition in one call |
update_sequence | Change 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_changes | Make a live sequence's unpublished changes live, or drop them |
set_sequence_status | Turn a sequence live or pause it (server validation messages returned verbatim) |
enroll_in_sequence | Enroll 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_stats | Counts, reply and goal rates, exit reasons and per-step funnel |
list_sequence_enrollments / get_sequence_enrollment | Contacts in a sequence (filter by status, search) and one contact's timeline |
manage_sequence_enrollment | Pause, resume or exit one contact's run |
preview_sequence | Render every message for a contact and list variables that resolve empty; sends nothing |
send_sequence_test_email | Send one email step as a test to yourself or up to 5 addresses |
search_feature_requests | Semantic dedupe search over feature requests: up to 5 matches with rerank scores, including requests not on the public roadmap yet (public: false) |
get_feature_request | Read one feature request by id or ticket number: title, description excerpt, status, upvote count, share link (never voter identities) |
subscribe_to_feature_request | Idempotently add a customer as upvoter; returns the request's status and share link |
create_feature_request | File 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_surveys | Surveys with id, SDK id, status, format, published version and unpublished changes (get_surveys is an alias) |
get_survey | One survey's draft (or published) definition, page settings and in-app targeting |
create_survey | New survey from a definition; always an unpublished draft |
update_survey | Replace a survey's draft definition; on a live survey it saves the next draft version |
validate_survey | Server validation of a definition or the stored draft, without saving |
publish_survey | Launch: publish the draft as the next version; goLive: true also shows it in the app |
pause_survey | Stop showing a survey in the app (page and emails keep working) |
get_survey_results | Totals, NPS, per-question counts, drop-off, endings and paths from stored counters, plus the step funnel when analytics events exist |
get_survey_analytics | Event 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_insights | Stored AI themes, drivers, segments and alerts |
ask_survey_results | Plain-language question about the responses → answer with cited response ids (AI, billed) |
get_survey_responses | Compact response rows with filters (status, answer by key, theme, channel, contact, text) and cursor pagination |
get_survey_response | One response with labelled answers, path, ending and contact |
search_survey_responses | Keyword search over the answers of every survey (or one), with snippet, NPS and contact per hit |
reach_out_to_respondent | Draft (default) or, with send: true, start a conversation linked to a response |
get_survey_summary | Stored 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_ticketandanswer_ticket(argumentticket:#numberor id) start a ticket workflow with the workflow text and a ticket summary. update_plan,wrap_up,share_screenshotandpublish_artifactcarry_meta.ui.resourceUri = "ui://gleap/kai-session": hosts that support MCP Apps render the result inline fromstructuredContent.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
- N8nFair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.202,280
- Gemini CliAn open-source AI agent that brings the power of Gemini directly into your terminal.106,664
- World MonitorLive global intelligence: real-time markets, conflicts, country risk, chokepoints, energy. 39 tools.84,026
- WorldmonitorReal-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface84,024
- Scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!76,275
- Ruflo🌊 The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated69,270