Model Context Protocol
Operate Askery from any AI agent.
A thin MCP bridge over the public API. Drop it into Claude Desktop, Cursor, or any MCP-capable client and your agent can build forms, fetch responses, and codegen Decision Engines - by name.

What it is
The Askery MCP server is a tiny stdio program that exposes the public REST API as a catalog of typed tools. The agent calls askery_generate_form with a brief; the server forwards it to POST /api/v1/forms/ai/generate with your API key; the JSON response goes back to the agent. Same API, same permissions, same audit trail as everything else you do on Askery.
Every tool maps 1:1 to a documented endpoint, so the behaviour is identical whether you use the tool, curl, or the dashboard. There's no second contract to learn.
Install
One snippet, every MCP-capable client. Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Cline, Zed, Goose, JetBrains AI, Codex CLI, and Gemini CLI all consume the same shape:
{
"mcpServers": {
"askery": {
"command": "npx",
"args": ["-y", "@askeryforms/mcp"],
"env": {
"ASKERY_API_KEY": "ak_live_..."
}
}
}
}The exact paths and per-agent gotchas (root-key differences for VS Code, Zed, and Goose; TOML for Codex; YAML for Continue) are spelled out on the setup guide.
Mint a key at /dashboard/api-keys. Pick the scopes that match the tools you intend to expose; the server returns clean errors when a tool is called without the required scope, so you don't need to over-grant up front.
Test it
The Model Context Protocol team ships an interactive inspector. Run it pointed at the Askery server and you can list, call, and explore every tool:
bunx @modelcontextprotocol/inspector \ bun /path/to/askery/mcp/server.ts
Tool catalog
25 tools, organised by what they touch. Required scope is shown so you know what to enable on the key.
| Tool | Scope | What it does |
|---|---|---|
| askery_list_forms | forms:read | List forms in the workspace. |
| askery_get_form | forms:read | Fetch one form's full canonical definition. |
| askery_create_form | forms:write | Create a form from a FormDefinition. |
| askery_generate_form | ai:run | Generate a form from a natural-language brief. |
| askery_edit_form | ai:run | AI-edit a stored form. Supports preview mode. |
| askery_publish_form | forms:write | Publish a form (auto-generates a slug if needed). |
| askery_archive_form | forms:write | Archive a form (status → closed). |
| askery_duplicate_form | forms:write | Make a fresh draft copy of a form. |
| askery_list_responses | responses:read | List responses (with status, since, until, email filters and cursor pagination). |
| askery_get_response | responses:read | Fetch one response with answers folded in. |
| askery_export_responses_csv | responses:read | Pull all responses as CSV text. |
| askery_get_intelligence | forms:read | Read Form Intelligence config (mode, rules, decision code, sections). |
| askery_save_decision_code | forms:write | Save Decision Engine code (with validation). |
| askery_generate_decision_code | ai:run | Codegen Decision Engine code from a brief (IR → render → critique). |
| askery_test_decision_code | intelligence:run | Run DE code in the WASM sandbox against synthetic answers. 0 credits. |
| askery_regenerate_result | intelligence:run | Clear the cached AI outcome on a response and recompute. |
| askery_list_webhooks | forms:read | List webhook subscriptions. |
| askery_create_webhook | webhooks:write | Create a webhook subscription; secret returned once. |
| askery_delete_webhook | webhooks:write | Delete a webhook subscription. |
| askery_import_form | imports:run | Pull a canonical form definition from any third-party form URL. |
| askery_prefill_link | forms:read | Build a respondent URL with answer values pre-loaded into matching questions. |
| askery_workspace | workspace:read | Workspace identity, plan, credit balance. |
| askery_usage | workspace:read | Credit balance + recent ledger entries. |
| askery_audit_log | workspace:read | Workspace activity log (with filters). |
| askery_form_analytics | forms:read | Per-form analytics: views, starts, completions, funnel, per-question summaries. |
Worked example
A typical agent conversation, after MCP is wired up:
You: Build me a 5-question NPS survey for our enterprise customers.
Agent → askery_generate_form({ brief: "...", save: true, status: "draft" })
← { id, slug, definition, ... }
You: Publish it.
Agent → askery_publish_form({ id: "..." })
← { id, status: "published", slug: "..." }
You: How are responses coming in?
Agent → askery_form_analytics({ id: "..." })
← { summary: { views, completions, completionRate, ... } }
You: Anyone score below 6? Show their answers.
Agent → askery_list_responses({ id, ... })
← filters in-app, returns the rows with answers folded in.Errors
When a tool call fails, the server returns the API's structured error envelope verbatim. The agent sees the code, the human message, the request_id for support, and (when relevant) a docs_url. That's enough for the agent to decide whether to retry, ask you, or escalate.
Beyond MCP - the underlying API
The MCP server is a convenience. The same operations are available via the public REST API for traditional integrations (cron jobs, internal tools, BI pipelines, Lambdas). Full spec at /api/v1/openapi.json and /developers.