Skip to main content
Version: Next

Using with AI agents

React Query Builder provides several resources that help coding agents (Claude Code, opencode, Cursor, Codex, GitHub Copilot, etc.) use the library correctly.

Agent skill​

The agent skill teaches agents setup, UI packages, export formats, parsers, validation, server-side usage, and common pitfalls. Install it with the skills CLI:

npx skills add react-querybuilder/react-querybuilder --skill react-querybuilder

The skill is a standard SKILL.md directory, so any installer works, or you can copy it manually:

  • From node_modules: react-querybuilder and @react-querybuilder/core ship the skill at node_modules/<package>/skills/react-querybuilder/, matching the installed version. Copy or symlink that directory into your agent's skills directory (e.g. .claude/skills/, .agents/skills/).
  • From GitHub: skills/react-querybuilder.

MCP server​

@react-querybuilder/mcp is a local (stdio) Model Context Protocol server. Its tools format, parse, convert, and validate queries using the real library code, generate JSON Schemas for queries, and search these docs (pinned to the installed version).

ToolPurpose
format_queryQuery object → any non-ORM export format (incl. natural_language)
parse_querySQL, CEL, MongoDB, JsonLogic, SpEL, JSONata, Cypher, GQL, Gremlin, SPARQL → query object
convert_queryParse + format in one step
validate_queryCheck a query against a fields config
get_query_schemagetQueryJsonSchema output
search_docsSearch these docs
get_docFetch a docs page/section as markdown

It also exposes docs pages (rqb://docs/{slug}) and key type declarations (rqb://types/{name}) as resources, plus setup_query_builder and convert_filter prompts. Requires Node.js 20+.

claude mcp add rqb -- npx -y @react-querybuilder/mcp

LLM-friendly docs​

  • /llms.txt: index of all documentation pages, with a markdown version of each page.
  • /llms-full.txt: full documentation in one file (excludes the API reference, changelog, and migration guides).
  • /llms-api.txt: condensed API reference, one line per exported symbol of every package.

Append .md to any documentation URL for its markdown version (e.g. /docs/utils/export.md).

Recipes​

The Recipes page shows the shortest working snippet and the exact output for every export format and import parser. The outputs are generated from the library source, so they're a reliable reference for agents.