SurveyLane / MCP v0.1.0
Model Context Protocol · live

Analyse your SurveyLane results with AI.

A hosted, read‑only MCP endpoint that lets Claude (or any MCP‑capable client) read the surveys and responses in your SurveyLane account — so it can summarise open text, test which differences are significant, find the key drivers, compare segments and write up findings. No SDKs, no glue.

Endpoint https://mcp.surveylane.app

01Quick start

Three steps from zero to chatting with your survey data.

1

Generate a token

Open Settings → API access and click Generate. Copy the value once — it’s shown only at creation.

2

Wire up your client

Add the endpoint and Bearer header to Claude Code, Claude Desktop or Cursor — one CLI command or a small JSON snippet.

3

Ask in plain English

The model decides which tools to call. You describe what you want to learn, not which query to run.

02Install

Drop the endpoint into any MCP‑capable client. HTTP transport, Bearer auth, no SDK.

Add the server with one CLI call. Positional args come before the flags, otherwise the URL gets swallowed by --header.

terminal
claude mcp add surveylane https://mcp.surveylane.app \
  --transport http \
  --header "Authorization: Bearer slk_..."

Verify with claude mcp list — you should see surveylane alongside any other servers.

03Authentication & privacy

Every request other than GET /health must carry a Bearer token. Tokens are personal, read‑only, and shown once at creation.

read

Read‑only by design

The AI can list and analyse your surveys, results and responses — it cannot create, edit or delete anything. Safe to hand to any MCP client you want to give visibility.

  • list_surveys, get_survey
  • get_results, get_open_text, get_funnel
  • get_responses, whoami
privacy

Respondent privacy

For anonymous surveys, respondent names and e-mail addresses are never returned — only aggregates and de-identified answers. For non-anonymous surveys the choice you made on the survey is honoured.

  • isAnonymous enforced server-side
  • aggregate tools never expose PII
  • scoped to your account only
Tokens are per‑user and revocable

Every tool query is scoped to your own data and cannot see other accounts. Revoke a leaked token from Settings → API access — it’s effective immediately.

04Tools · 22

Everything the AI can call. All read‑only. Each returns plain building blocks (counts, distributions, raw text) — the model does the interpretation.

whoami
read
Return the caller's plan and account context.
list_surveys
read
List the caller's surveys with response totals and completion rate.
get_survey (survey_id)
read
Get the full structure of a survey (groups, questions, options). No responses, no PII.
get_results (survey_id, only_complete, filter, segment_by)
read
Aggregated results per question: choice counts, rich numeric summary (mean/median/stddev/quartiles + histogram), and scale distributions with NPS/top-2-box. Optional `filter` ({question_id, equals}) restricts to a subgroup; optional `segment_by` (a choice question id) returns results split per option. yes_no/single_choice counts are correct (not just multiple_choice).
get_open_text (question_id, limit, offset)
read
Free-text answers for one question, paginated. Use to summarise themes/sentiment.
get_responses (survey_id, only_complete, limit, offset, include_pii, question_ids)
read
Individual responses as a compact answer matrix (response x question), paginated. PII (name/email) is omitted by default and only included with include_pii=true on a non-anonymous survey. Use question_ids to fetch only specific columns and keep payloads small. Prefer get_crosstab/get_results for analysis.
get_funnel (survey_id)
read
Drop-off funnel: total vs completed responses, per-question answered/shown/skipped and reached counts. Conditional (branched) questions report drop-off relative to who actually saw them, not all starters.
get_crosstab (question_a, question_b)
read
Cross-tabulate two questions of the same survey. Numeric×numeric returns a Pearson correlation; otherwise a contingency table (counts of A categories × B categories).
get_group_summary (survey_id)
read
Roll-up of numeric/VAS scores per question group (cluster): pooled group mean + per-question means, so clusters are comparable at a glance.
get_data_quality (survey_id)
read
Data-quality signals for a survey: completion-time stats (median/quartiles + speeders) and straightlining detection (respondents giving near-identical answers across numeric/scale questions).
compare_surveys (survey_a, survey_b)
read
Compare two surveys (e.g. baseline vs follow-up). Matches numeric/VAS questions by text and reports per-question mean deltas, sorted by magnitude. Useful for 0-meting vs nameting.
test_significance (survey_id, question_id, group_question_id, group_a, group_b)
read
Statistically test whether a target question differs across subgroups defined by another question. Numeric target -> Welch t-test (two groups) or one-way ANOVA (all groups), with Cohen's d / eta². Categorical target -> chi-square + Cramér's V. Returns p-values so you don't over-interpret small samples.
get_correlation_matrix (survey_id, group_id)
read
Pairwise Pearson correlations (with p-values, significance) across all numeric/VAS questions, sorted by strength. Optionally scope to one group/cluster. One call instead of N² crosstabs.
key_drivers (survey_id, target)
read
Driver analysis: rank all numeric questions by their correlation (with p-value) to a target numeric question. Answers 'what most relates to low energy / high stress?'.
scale_reliability (survey_id)
read
Cronbach's alpha per question group (cluster) over its numeric items, with an interpretation. Validates whether a cluster measures one coherent construct before averaging it.
query_cohort (survey_id, where, aggregate)
read
Define a cohort with multiple AND/OR conditions (numeric ranges, option matches, answered/not_answered) and get its size/share. With aggregate=true, returns full get_results-style aggregates for just that cohort.
get_weighted_results (survey_id, weight_question_id, target_shares)
read
Post-stratification weighting on a single variable: supply target shares for a demographic question (e.g. gender 50/50) and get weighted numeric means vs unweighted, plus Kish effective sample size. Corrects sample skew.
compute_index (survey_id, items, normalize, segment_by)
read
Build a composite index from chosen items (optional per-item weight/reverse/min-max, optional 0..100 normalization) and get its distribution overall and per segment. E.g. a wellbeing index from selected VAS questions.
auto_insights (survey_id, top_n)
read
Automatically scan every segmentation question × numeric question, ANOVA-test each, and return the significant differences ranked by effect size (eta²). The 'do the analysis for me' tool, guarded by significance.
get_verbatims (question_id, link_question_id, min_score, max_score, limit)
read
Free-text verbatims for a question (text answers, or the 'other' texts of a choice question), optionally linked to another numeric question's score and filtered by a score range (e.g. comments of the lowest scorers). Includes keyword frequency.
response_timeline (survey_id, bucket)
read
Response volume over the fielding period: started/completed per day or hour, cumulative and completion rate. Shows when responses came in (e.g. after a reminder) and where people abandon.
report_bundle (survey_id, driver_target)
read
One call returns a full analysis pack: overview results, per-cluster summary, scale reliability, data quality, funnel, and auto-insights (optionally key drivers for a target). Feeds a report/PDF directly.

05Prompts

Server‑hosted prompt templates the AI invokes directly. In Claude Code: /mcp__surveylane__<name>. One click gives you a full guided analysis instead of having to ask the right questions yourself.

analyze_survey Analyze a survey

Run a full analysis of a survey's results and write a report with findings and recommendations.

06Example prompts

Real questions you can paste into your AI client — from a quick summary to significance tests, key-driver analysis, cohorts, weighting and pre/post comparisons. The model decides which tools to call and chains them together; you stay in plain English.

“Which of my surveys have the most responses?”
“Give me the completion rate of each survey.”
“Which surveys are still in draft, and which are closed?”
“When did my Aanmelden interventieperiode survey last get a response?”

07From data to a polished report

Ask your AI for a full analysis and it reads the numbers straight from the MCP tools — then a small script turns them into a branded, board-ready PDF. Here’s the workflow and a sample.

  1. 1
    Ask in plain language

    “Run a full analysis and write a confidential, group-level report with findings and recommendations.”

  2. 2
    The AI calls the tools

    It chains report_bundle, key_drivers, compute_index, test_significance and more — all read-only, all scoped to your account.

  3. 3
    A script renders the PDF

    Hand the returned numbers to a small ReportLab (or HTML‑to‑PDF) script with your own colours and logo. Re-run it whenever the data changes.

Tools behind the sample: report_bundle, key_drivers, get_correlation_matrix, test_significance, compute_index, get_weighted_results, query_cohort, response_timeline.

SurveyLane · ANALYSIS REPORT
Workplace Vitality
Veldhoek Logistiek
Group-level insight into energy, focus, stress and recovery.
97started
86completed
89%completion
69.2wellbeing index
Wellbeing at a glance (0–100)
Social safety84
Motivation79
Focus72
Energy71
Sleep quality70
Stress (calm)64
Biggest opportunity

22% sit more than 8 hours a day and never do mobility work — a concrete cohort for the intervention. Movement and nutrition carry the most effect.

Generated via the SurveyLane MCP server · Confidential — group level only
Illustrative example — fictional company, group-level figures only.

08Rate limits

Per‑user, sliding 60‑second window. Hitting the limit returns a clean tool error with a retry_after_seconds hint — not an HTTP 429 — so your AI client can back off without breaking the conversation.

reads
120 / min

Counted across all of your tokens, so minting more tokens can’t multiply the budget. All tools are pure database reads.

scope
read v1

Read‑only this version. The scope column exists so write tools can be added later behind an explicit upgrade.

Backoff hints, not HTTP 429

The MCP SDK has no transport‑level retry semantics. AI clients DO read the error text — the rejected response includes a precise retry_after_seconds.

09FAQ

Open Settings → API access in SurveyLane and click revoke on the token row. It’s effective immediately — the next request from that token fails auth.
MCP traffic uses POST to this same root path. A browser GET (Accept: text/html) gets this help page; an MCP client’s standalone GET SSE stream (Accept: text/event-stream) is declined with 405, because our stateless transport sends no server-initiated notifications.
Only when the survey is not anonymous. For anonymous surveys, respondent names and e-mail addresses are never returned — the tools hand back aggregates and de-identified answers only. The privacy setting you chose on the survey is enforced server-side.
No. Every request is scoped to your own account via your personal token, and data only flows to the MCP client you connected (e.g. your own Claude). The server never returns another user’s surveys.
The server returns the raw 0–10 distribution as building blocks; the AI computes the NPS (promoters minus detractors). This keeps the server simple and lets the model reason over the numbers, paginate large result sets, and explain its working.
Not in this version — the MCP server is read-only and built for analysis. Tokens are issued with read scope. Authoring tools may arrive later behind a separate write scope.
Yes. Ask your AI for a full analysis and it pulls the numbers straight from the tools (report_bundle, key_drivers, compute_index …); a small script then turns those into a branded PDF. See the Reports section for a worked example.
Any MCP‑capable client over HTTP — Claude Code, Claude Desktop and Cursor are covered under Install, but anything that speaks the Model Context Protocol works.
No. The server only reads your data and hands it to the MCP client you connected; SurveyLane never sends it elsewhere or trains on it. Whatever you ask your AI client is governed by that client’s own provider terms.
Yes. The tools return your survey’s own content — Dutch, German, French or otherwise — and the AI analyses and writes up in whichever language you ask. This page itself is available in four languages.
Live. Every tool call reads the SurveyLane database at request time, so you always work with the latest responses — no syncing or exporting.