Home Expressions
Docs
Drivers Gateway SDKs MCP Benchmarks
Changelog
GitHub
Blog Status Roadmap

Model Context Protocol

QAIL now speaks MCP

A remote MCP server that lets any AI agent learn QAIL in depth — and validate the QAIL it writes against the real qail-core parser, running at the edge. Point your client at one URL; no install, no database, no keys.

https://dev.qail.io/mcp
Streamable HTTP Protocol 2025-06-18 11 tools · 7 resources Read-only · no auth Live status →

Connect

Any MCP client that speaks Streamable HTTP can connect directly. Stdio-only clients bridge through mcp-remote.

Claude Code

One command adds it over HTTP.

claude mcp add --transport http qail https://dev.qail.io/mcp

Any Streamable-HTTP client

Cursor, Windsurf, and other MCP clients — add to your server config.

{
  "mcpServers": {
    "qail": {
      "type": "http",
      "url": "https://dev.qail.io/mcp"
    }
  }
}

Stdio-only clients

Bridge a local stdio transport to the remote endpoint.

npx mcp-remote https://dev.qail.io/mcp

Try it with curl

The server is a plain JSON-RPC endpoint — no client required.

curl -s -X POST https://dev.qail.io/mcp \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0", "id": 1, "method": "tools/call",
    "params": {
      "name": "qail_parse_query",
      "arguments": { "query": "get users fields id, email where active = true limit 10" }
    }
  }'
# -> SELECT id, email FROM users WHERE active = true LIMIT 10

What an agent can do

Two halves of one server. Compute tools run the real parser and transpiler, so an agent can check the QAIL it writes rather than guess. Knowledge tools let it learn the language and the codebase from a corpus generated straight from the qail.rs repository.

Compute — verify what you write

  • qail_parse_queryParse QAIL into the typed AST and the SQL it produces — or a parse error.
  • qail_transpile_queryTranspile QAIL to SQL without executing anything.
  • qail_explain_queryBreak a query down by action, table, columns, filters, ordering.
  • qail_format_queryPretty-print a QAIL query through the canonical formatter.
  • qail_schema_summaryParse a schema.qail document into tables, columns, indexes, policies.
  • qail_builder_cookbookRust AST-builder recipes for the qail-core kernel.

Knowledge — learn the language

  • qail_mapRepository orientation — start here when you don't know where to look.
  • qail_syntaxGrammar card for a construct (where, join, with, conflict, order …).
  • qail_examplesVerified queries paired with the SQL they actually transpile to.
  • qail_searchFull-text search across docs, crate READMEs, and grammar productions.
  • qail_docFetch a documentation chunk in full by id or repo path.

How it works