The Model Context Protocol (MCP) lets AI assistants and coding agents use tools. JSONPad has two MCP servers:
They work best together: the API server does the work, and the docs server explains it and checks rules and flows without spending any of your requests.
The docs server is hosted at https://mcp.jsonpad.io/docs (Streamable HTTP). Add it to your agent with that URL. In Claude Desktop and on claude.ai, go to Settings, then Connectors, and add a custom connector with the URL. In other clients:
claude mcp add --transport http jsonpad-docs https://mcp.jsonpad.io/docsThe hosted server is always up to date: it's deployed with these docs, so it describes exactly what's live.
The same server is also the @basementuniverse/jsonpad-docs-mcp npm package, which runs on your own machine over stdio. It needs Node.js 22.12 or later.
claude mcp add jsonpad-docs -- npx -y @basementuniverse/jsonpad-docs-mcpA local copy carries a snapshot of the docs from when it was published. When JSONPad upgrades the engines that run write rules and flows, it adds a warning to its checks until you update it.
Reading the docs:
search_docs searches these docs, the SDK references and the command line tool reference. Exact identifiers work well: error names, headers, SDK methods, commands and variables.read_doc reads a page, or one section of it, as markdown, and list_docs lists the pages.list_api_endpoints and get_api_endpoint give an endpoint's full contract: parameters, headers, request body, responses, and the SDK method that calls it.get_sdk_method and get_cli_command give a method's signature and example, or a command's options.lookup_error explains an error code, and get_plan_limits gives each plan's limits.Checking your work:
check_write_rules compiles write rules and runs their tests.eval_write_rule tries one write against some rules, and shows what every rule evaluated to.check_flow compiles a flow and runs its tests against in-memory data.validate_sync_document checks a schema sync document, and every rule set and flow in it.validate_token_permissions checks token permissions, and warns about rules that probably don't do what you meant.It also has prompts for common jobs (getting started, designing a schema document, writing rules or a flow, explaining an error, planning token permissions, recovering lost data), and resources for every page and JSON schema.
The checkers use the same engines as the API, at the same versions, so rules and flows that pass here behave the same way when you save them. They run on what you send and nothing else: rule lookups and flow reads find the items in the test document, never your data, and checking doesn't count against your request allowance.
You don't need to call them yourself. Ask your agent for what you want, and it can write, check and fix until the tests pass:
Write rules for my "moves" list so that only a game's players can add a move,
and only on their turn. Add tests, and check them with the JSONPad docs server
until they pass.
Check jsonpad-schema.json and the rules and flow files it references.
Why would this write be refused? Rules: rules/games.rules. The write: an update
by identity "bob" that changes /turn from "alice" to "bob".rulesFile, flowFile and their tests) can only be checked if the agent sends their contents too, which it can do when it has your files open.The API server talks to the JSONPad API with one of your API tokens, so it can do exactly what that token can: the token's permissions, your plan's limits and every list's write rules apply to it as they do to your own apps. Every call it makes counts against your request allowance, like any other request.
The API server is hosted at https://mcp.jsonpad.io/api (Streamable HTTP). Add it with the URL. In Claude Desktop and on claude.ai, go to Settings, then Connectors, and add a custom connector with the URL. In other clients:
claude mcp add --transport http jsonpad https://mcp.jsonpad.io/apiThe first time it connects, your client opens a JSONPad page in your browser (log in first, if you aren't). It shows which app is asking and where it will send you back to, and you choose what it may do:
You can limit Read only and Read and write to some of your lists, and choose when access ends. Allowing creates an API token for the app, which appears in your tokens, tagged oauth. Delete it there to take the app's access away; it will ask you to connect again. Connecting the same app again replaces its token, and the token counts towards your plan's token limit.
You can also use one of your own API tokens, as a bearer token in the Authorization header. The hosted server passes it to the API with each request, and never stores it.
claude mcp add --transport http jsonpad https://mcp.jsonpad.io/api --header "Authorization: Bearer <YOUR TOKEN>"sync-schema if it should manage lists and indexes. A token that can only view your lists is a safe way to start. A token that's allowed everything can also create and run flows, which can do anything you can.The API server is also the @basementuniverse/jsonpad-mcp npm package, which runs on your own machine over stdio, with your token in the JSONPAD_API_TOKEN environment variable. It needs Node.js 22.12 or later.
claude mcp add jsonpad --env "JSONPAD_API_TOKEN=<YOUR TOKEN>" -- npx -y @basementuniverse/jsonpad-mcpUse the npm package for a token with an IP allowlist: requests from the hosted server come from its address, not yours.
On the hosted server, options go in the URL's query string, e.g. https://mcp.jsonpad.io/api?readOnly=true. For the npm package, they're environment variables.
readOnly=true, JSONPAD_READ_ONLY=true) gives the agent only the tools that change nothing.toolsets=, JSONPAD_TOOLSETS) chooses which groups of tools to offer, separated by commas. The default is lists,items,indexes,history,rules,schema; add flows to call your flows, and identities to manage your app's identities.x-identity-token and x-identity-group headers, or JSONPAD_IDENTITY_TOKEN and JSONPAD_IDENTITY_GROUP) makes every request as one of your app's identities, which is handy for testing write rules and what each user can see.flows toolset): call your endpoint flows.identities toolset): list, create, update and delete them.It also has prompts (designing a backend, writing rules for a list, finding out why a write was refused, inspecting a list, undoing changes), and resources for your lists, their schemas and rules, and your items.
Some things to ask an agent that has it:
Set up a backend for my recipe app as a schema sync document: recipes with a
title, ingredients and an author, searchable by title. Show me the plan before
you apply it.
Why does my game get 403s when players move? Check the denials on the "moves"
list and tell me which rule refused them.
Mark every task in "tasks" that was due before today as late.
I deleted the wrong item from "orders" this morning. Find it and put it back.The hosted servers allow about 120 requests a minute between them from each IP address, and the docs server 30 checks. A check can take up to 10 seconds, and its input can be up to 512 KB. The npm package has no limits of its own.
Each API server tool call makes one or more requests to the API, so your plan's rate limits and request allowance apply as usual.
We log which tools are used and what's searched for, so we can tell where the docs fall short. For the API server, we log only which tools are called and whether they worked: never what you send or get back. The logs don't include your IP address, your token, or anything you send to the checkers. See the privacy policy.