# New in JSONsilo: schema lock and an MCP server

> Lock a silo to a JSON Schema so a bad write never reaches the apps reading it, and let Claude Code, Cursor or VS Code read and edit your silos over MCP.

URL: https://jsonsilo.com/blog/schema-lock-and-mcp  
Published: 2026-11-14  
Author: Jaironlanda  
Tags: update, mcp, json-schema

Until now, every JSONsilo release has rebuilt something that already existed. These two are
new. **Schema lock** keeps a silo in the shape your apps expect. The **MCP server** lets AI
tools read and edit your silos for you. Each one is useful alone, and they work well together:
the lock is what makes it safe to give an agent write access.

## Schema lock

A silo is easy to change, which is why people use it. That cuts both ways. One typo in the
console, or one script that sends `"price": "2"` instead of `"price": 2`, and every app reading
the silo gets data it didn't expect.

Schema lock fixes that. Attach a [JSON Schema](https://json-schema.org) to a silo and lock it.
Any write that doesn't match is rejected, and the stored data stays as it was. Apps keep
reading the last good version.

### Setting it up

You don't have to write the schema yourself. Open a silo, go to **Data & schema**, and turn the
schema on. JSONsilo generates one from the data that's already there, in one of two modes:

- **Loose:** existing fields have to keep their types, and new fields are allowed. Removing or
  retyping a field fails. Most silos should start here.
- **Strict:** only the fields in your data today are allowed. This adds
  `additionalProperties: false` throughout.

A field is marked required only when every object at that position has it. So if one product
in your catalog has no `sku`, the generated schema won't require `sku` either.

The editor shows the schema next to your data and checks the data against it as you type. Edit
the schema if you want to, save it, and lock it when you're ready. JSONsilo won't let you lock
a schema your current data already breaks, so you can't lock yourself out of your own silo.

Supported drafts are `draft-04`, `draft-07`, `2019-09` and `2020-12`. Without a `$schema`
keyword, 2020-12 is assumed.

### What a rejected write looks like

Say `product-catalog` is locked, and a script sends a manage-key `PATCH` with the second
product's price as a string. The server answers `422` and names the field that failed:

```json
{
  "message": "Silo data does not match its locked schema.",
  "errors": [
    {
      "path": "/1/price",
      "message": "Instance type \"string\" is invalid. Expected \"number\"."
    }
  ]
}
```

`path` is a JSON Pointer to the exact spot, so the person or script that sent the write can fix
it without guessing. The error lists only the first, deepest failure, not every one.

The lock covers every write that replaces a silo's data: saving in the console, a manage-key
`PATCH`, and the MCP write tools below.

### Scripts can't loosen it

Manage keys have no schema routes at all. You can only change or remove a schema from the
console, while signed in. That's deliberate: the lock exists to stop automated writers, so an
automated writer must not be able to switch it off.

Unlocking keeps the schema. Writes go unchecked, but the editor still flags data that doesn't
fit, and you can lock again whenever you like.

## An MCP server for your silos

[Model Context Protocol](https://modelcontextprotocol.io) is how AI tools like Claude Code,
Cursor and VS Code connect to outside services. JSONsilo now runs a remote MCP server at:

```text
https://mcp.jsonsilo.com/mcp
```

Once your tool is connected, you can ask for things in plain language: "list my silos", "what
are the three most expensive products in product-catalog?", or "add a Stapler at $4 to the
catalog". The model picks the right tool, and you never have to open the console.

### Connect a client

Go to **Keys → MCP keys** in the console and create a key. Choose:

- **Access:** *Read & write*, or *Read only*. A read-only key gets the five read tools only. The
  write tools aren't registered at all, so the model never sees them.
- **Duration:** how long the key stays valid. Trial keys last one month, and paid plans can
  create longer-lived ones.

The key starts with `jsmcp_` and is shown once. JSONsilo keeps only a hash of it, so copy it or
one of the setup snippets before you close the dialog.

For Claude Code, run:

```bash
claude mcp add --transport http jsonsilo \
  https://mcp.jsonsilo.com/mcp \
  --header "Authorization: Bearer jsmcp_YOUR_KEY"
```

Add `--scope user` to make it available in every project.

For Cursor, add this to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "jsonsilo": {
      "url": "https://mcp.jsonsilo.com/mcp",
      "headers": { "Authorization": "Bearer jsmcp_YOUR_KEY" }
    }
  }
}
```

For VS Code, run **MCP: Open User Configuration** from the Command Palette and add:

```json
{
  "servers": {
    "jsonsilo": {
      "type": "http",
      "url": "https://mcp.jsonsilo.com/mcp",
      "headers": { "Authorization": "Bearer jsmcp_YOUR_KEY" }
    }
  }
}
```

Any other client that supports Streamable HTTP and custom headers works the same way: the
server URL plus an `Authorization: Bearer` header. These snippets contain your key, so keep
them out of files you commit.

### The tools

| Tool | Access | What it does |
| --- | --- | --- |
| `list_silos` | read | Lists your silos, newest first |
| `get_silo_meta` | read | Name, size, visibility, region and schema-lock state, without the data |
| `read_silo` | read | Returns the whole silo, or a summary and preview if it's over 100 KB |
| `query_silo` | read | Runs the [query engine](https://docs.jsonsilo.com/features/query-silo-data): `path`, `idx` or filters |
| `get_silo_schema` | read | Returns the silo's JSON Schema, and whether it's locked |
| `create_silo` | read & write | Creates a silo, within your plan's limits |
| `update_silo` | read & write | Renames a silo, changes its visibility, or replaces its data |
| `patch_silo` | read & write | Applies [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) operations |
| `delete_silo` | read & write | Deletes a silo permanently |

Silos are also exposed as MCP resources at `jsonsilo://silo/{uuid}`, for clients that attach
resources rather than call tools.

### Edits that can't clobber each other

The tool to watch is `patch_silo`. Rather than rewriting a whole document to change one price,
the model sends a small list of changes:

```json
[
  { "op": "test", "path": "/1/name", "value": "Pen" },
  { "op": "replace", "path": "/1/price", "value": 2.5 }
]
```

Three things make this safe:

- **It's atomic.** The operations run against a copy. If one fails, for example the `test`
  above finds a different product at `/1`, nothing is saved.
- **It won't overwrite someone else's change.** If the silo changed between the model's read and
  its write, the patch is refused and the model is told to read the silo again and retry.
- **It answers to the schema lock.** A patched silo goes through the same check as any other
  write. If the model sets a price to `"2.5"`, the tool returns the failing path and the model
  can correct itself.

Reads skip the edge cache, so an agent that writes and then reads sees its own change. Every MCP
write is recorded in your activity log, marked `(MCP)`.

## Better together

You can use either feature on its own, but the combination is the point. A locked silo with a
read & write MCP key means you can let an agent maintain your data while the shape stays fixed.
The agent can add a product, fix a typo or reorder a list. It can't break the contract your app
depends on, and if it tries, it gets an error it can act on.

Start with a read-only key if you want to see how your tool uses the server before giving it
write access.

## Plans and limits

Both features are included in the [free trial](https://console.jsonsilo.com) and every paid
plan.

- **Downgrading** never traps you. An existing schema lock still applies after a downgrade, and
  you can always remove it. MCP keys stop working until you upgrade again, but they aren't
  deleted.
- **MCP has its own rate limit**, separate from your manage-key traffic, so an enthusiastic
  agent won't starve your scripts.
- **On the trial,** only actual tool calls and resource reads count toward the 1,000-request cap.
  The connection handshake and tool listing don't.
- **Validation cost** is about 40 ms per MB of silo, whatever the schema looks like. You won't
  notice it on a typical config silo, but a 20 MB write takes about 0.8 s longer.

## What's not here yet

The MCP server currently authenticates with a static key in a header. claude.ai and ChatGPT need
OAuth to connect, and that isn't built yet. For now, use Claude Code, Cursor, VS Code, Windsurf
or any client that can send a custom header.

## Try it

Open a silo in the [console](https://console.jsonsilo.com), turn on its schema, and lock it.
Then create an MCP key and ask your editor what's in it. The
[schema lock](https://docs.jsonsilo.com/features/schema-lock) and
[MCP](https://docs.jsonsilo.com/mcp/overview) docs have the full reference. If something looks
off, [let us know](https://x.com/JaironDevNull).
