Prototype · Preview: every server in the official registry, synced every 30 minutes. Reviews and accounts come in a later step.
PopNx MCPMCP servers for people who use AI · explained in plain words

JSON Contracts

by json-contractsversion 0.1.2i★ –iRuns on your computer
Registry nameio.github.json-contracts/json-contracts

Install

Overview

Description from the maker (original English)

JSON contract registry and validator for structured LLM and agent outputs.

PopNx MCP’s three pillars

These three are never merged into one score: opinions, measurements and popularity are different things.

What you can do with it

We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.

  • Connection: Runs on your computer
  • Transport: stdio
  • Category: Search & AI memory

Install

Pick the AI app you use, then copy the settings.

Before you install

  • Basic checks: 1 of 1 passed
  • Runs on your computer with your user’s permissions (files, network, apps).
  • You fill in yourself: JSON_CONTRACTS_DIR

You need

  • npmNode.js installed (for the npx command)

Which app do you use?

Pick your app above. We remember it, so next time the button says “Install in …”.

Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json

{
  "mcpServers": {
    "json-contracts": {
      "command": "npx",
      "args": [
        "-y",
        "json-contracts"
      ],
      "env": {
        "JSON_CONTRACTS_DIR": "your-value"
      }
    }
  }
}

Run this in your terminal

claude mcp add json-contracts --env JSON_CONTRACTS_DIR=your-value -- npx -y json-contracts

Fill in the empty values before running it.

Open in Cursor

Or copy the settings yourself

Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json

{
  "mcpServers": {
    "json-contracts": {
      "command": "npx",
      "args": [
        "-y",
        "json-contracts"
      ],
      "env": {
        "JSON_CONTRACTS_DIR": "your-value"
      }
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

Open in VS Code

Or copy the settings yourself

Paste into .vscode/mcp.json in your project

{
  "servers": {
    "json-contracts": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "json-contracts"
      ],
      "env": {
        "JSON_CONTRACTS_DIR": "your-value"
      }
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.

Your choice stays on this device in a cookie; no account needed.

Values you fill in

  • JSON_CONTRACTS_DIR env
    Folder containing JSON contract files. Defaults to ./json-contracts.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 6, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account json-contracts, which owns the repo

  • … Not checked yet

    Still maintained

    We have not read this repo from GitHub yet

  • … Not checked yet

    Has a licence

    We have not read this repo from GitHub yet

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Compared with others in Search & AI memoryi

  • More stars than 0% of the other 7233 servers in this category
  • Published to the registry more recently than 11% of the other 7233 servers in this category
  • Basic checks equal to or better than 100% of the other 7233 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is JSON Contracts safe?

It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed –, and the latest version (0.1.2) reached the registry 6 months ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: Context7, Codebase Memory, Exa

Alternatives

Servers in the same category from other makers, sorted by stars.

Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Context7

by upstash

Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.

Computer or cloud★ 64,224MITUpdated 3 days ago
Install

Codebase Memory

by DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

Runs on your computer★ 48,148MITUpdated 20 days ago
Install

Exa

by exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

Runs in the cloud★ 5,213MITUpdated 44 days ago
Install

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

JSON Contracts MCP Server

JSON Contracts is a local MCP contract server for natural-language-to-JSON workflows. It gives agents Git-controlled JSON contracts, rules, examples, and JSON Schema validation tools so any model can reliably convert natural-language requests into schema-valid JSON.

The MCP server does not call an LLM provider. The MCP server does not need API keys. The MCP server does not use BAML, LangChain, Markdown, or a DSL. The MCP server does not use MCP sampling. The MCP server does not generate JSON by itself.

The optional Studio is a separate package/repo for live demos and local contract testing. The MCP stdio server itself does not call LLM providers.

Your user provides natural language. Your agent chooses the model. Your agent performs the natural-language-to-JSON conversion. json-contracts provides the contract and validates the result.

Correct mental model

Not this:

json-contracts = generator

This:

json-contracts = schema contract registry + validator

Like TypeScript:

developer writes code

TypeScript validates it

With json-contracts:

agent writes JSON

json-contracts validates it

Architecture

User

↓ Agent using whatever model the user picked ↓ json-contracts MCP server

  • lists available JSON contracts
  • returns schemas, rules, examples, and instructions
  • validates agent-produced JSON
  • returns repair contracts when validation fails ↓

Agent generates or repairs JSON itself ↓ App consumes valid JSON

The MCP server never performs natural-language-to-JSON conversion itself. It only provides contracts, validation, and repair guidance.

Install

Install globally:

npm install -g json-contracts

json-contracts --help

Or run without installing:

npx -y json-contracts@latest

The npm package is json-contracts; the installed CLI binary is still json-contracts.

30-second setup

Create a starter contract folder and validate it:

mkdir my-json-contracts

cd my-json-contracts npx -y json-contracts@latest init npx -y json-contracts@latest validate

Then add the MCP config below to your agent host. Point JSON_CONTRACTS_DIR at the json-contracts folder that init created.

Validate contracts in CI without starting MCP:

npx -y json-contracts@latest validate --contracts ./json-contracts

npx -y json-contracts@latest lint --strict --contracts ./json-contracts

By default, the server starts as a local stdio MCP server and loads contracts from:

./json-contracts

MCP config

{

"mcpServers": { "json-contracts": { "command": "npx", "args": ["-y", "json-contracts@latest"], "env": { "JSON_CONTRACTS_DIR": "./json-contracts" } } } }

Adding a new behavior only requires adding a new .json file to the contracts folder. No MCP config change is required.

MCP host config snippets

Most MCP hosts use the same stdio shape. Adapt paths for your machine and point JSON_CONTRACTS_DIR at your app-owned contracts folder.

Claude Desktop
{

"mcpServers": { "json-contracts": { "command": "npx", "args": ["-y", "json-contracts@latest"], "env": { "JSON_CONTRACTS_DIR": "/absolute/path/to/json-contracts" } } } }

Cursor / Windsurf / VS Code MCP-compatible hosts
{

"mcpServers": { "json-contracts": { "command": "npx", "args": ["-y", "json-contracts@latest"], "env": { "JSON_CONTRACTS_DIR": "./json-contracts" } } } }

Continue or generic stdio MCP clients
{

"name": "json-contracts", "command": "npx", "args": ["-y", "json-contracts@latest"], "env": { "JSON_CONTRACTS_DIR": "./json-contracts" } }

If npx startup is too slow or your host requires explicit executables, install globally and use:

{

"command": "json-contracts", "args": [] }

Adopt in your agent/app

Use json-contracts as a local contract/validation tool beside the model your app already uses.

1. Add the MCP server

If your agent host supports MCP, add the server config above and point JSON_CONTRACTS_DIR at the contracts folder your app owns.

If your app has its own agent runtime, connect to the same MCP stdio server and call the tools directly. The important part is the flow, not the host.

2. Write one contract per JSON behavior

Create files such as:

json-contracts/support-ticket.json

json-contracts/real-estate-lead.json json-contracts/chart-generation.json

Each file contains:

  • schema for the final JSON shape
  • rules for app-specific mapping behavior
  • examples for model guidance
  • optional operations for create/edit behavior
3. Pass app/system variables as context

Do not hide runtime variables in the user prompt. Pass them as context:

{

"contract": "real-estate-lead", "input": "I'm pre-approved for a 4 bedroom house in Durham NC up to 900k.", "context": { "current_datetime": "2026-05-03T00:00:00Z", "email": "JohnnyAppleseed@gmail.com", "source": "website-lead-form" } }

json-contracts passes context through unchanged. Contracts decide how to use it through rules/examples. The final JSON still must match the schema.

4. Give your agent this tool policy

Use this as the system/developer instruction for your agent:

When converting natural language into app JSON, use json-contracts.

Create flow:

  1. Call get_json_contract with contract, input, and context.
  2. Generate JSON using the returned schema, rules, examples, input, and context.
  3. Call validate_json.
  4. If invalid, call get_repair_contract, repair the JSON, and validate again.
  5. Return only validated JSON to the app.

Edit flow:

  1. Call get_edit_contract with contract, currentJson, input, and context.
  2. Return the complete updated object, not a patch.
  3. Call validate_json.
  4. Repair and validate again if needed.

Never skip validation. Never add fields that are not allowed by the schema. Do not copy context fields into output unless the schema allows them and the contract rules say to use them.

5. Runtime loop in your app

At request time, your app should do:

user input + app context

-> get_json_contract or get_edit_contract -> your chosen model generates JSON -> validate_json -> if invalid: get_repair_contract -> model repairs -> validate_json -> app consumes valid JSON

The MCP server does not call the model and does not mutate output. Your app/agent remains in control of model choice, provider keys, context, and business defaults.

Contract files

Each contract is one .json file in json-contracts/.

The contract name is derived from the filename:

json-contracts/support-ticket.json -> support-ticket

There is no manifest file and no manually maintained resources file. Git handles versioning.

Contract shape
{

"description": "Convert natural language into a support ticket object.", "rules": [ "If the user says urgent, severity must be critical.", "Summary must be under 80 characters.", "Category must be authentication, billing, bug, feature_request, or other." ], "operations": { "create": { "enabled": true }, "edit": { "enabled": true, "return": "full_object", "rules": [ "Start from currentJson.", "Apply only the user's requested change.", "Preserve all unspecified fields exactly.", "Return the complete updated JSON object." ] } }, "schema": { "type": "object", "additionalProperties": false, "properties": { "summary": { "type": "string", "maxLength": 80 }, "severity": { "type": "string", "enum": ["low", "medium", "high", "critical"] }, "category": { "type": "string", "enum": ["authentication", "billing", "bug", "feature_request", "other"] } }, "required": ["summary", "severity", "category"] }, "examples": [ { "input": "Urgent, users cannot log in after SSO update.", "output": { "summary": "Users cannot log in after SSO update", "severity": "critical", "category": "authentication" } } ] }

Rules:

  • schema is required and must be valid JSON Schema. Omit $schema for the default 2020-12 validator, or set $schema to draft-07 or 2020-12 explicitly.
  • description is optional but recommended.
  • rules is optional and defaults to [].
  • examples is optional and defaults to []. Example output values must validate against schema.
  • operations is optional and defaults to enabled create and edit operations. Operation metadata belongs at the top level, not inside the JSON Schema.
  • name is optional, but the filename is the source of truth.
  • A version field is rejected; use Git for versioning.
  • Contract files are plain JSON.

Included example contracts

The default json-contracts/ folder includes examples from different app categories where teams commonly rebuild the same AI glue code:

ContractIndustry/app patternConverts natural language into
support-ticketSaaS supportTriage-ready support tickets.
create-filterInternal tools/API buildersAPI filter objects.
chart-generationBI/analytics toolsDashboard chart generation specs.
patient-intakeHealthcare intakeTriage and appointment-routing objects.
ecommerce-returnEcommerce supportReturn, refund, exchange, and warranty requests.
real-estate-leadReal estate CRMBuyer, renter, seller, and lease lead profiles.
legal-client-intakeLegal tech intakeMatter routing and conflict-check data.
expense-reportFinance/expense appsReimbursement and expense line items.

Each one uses the same MCP tools: read the contract, let the model create or edit JSON, validate it, and repair if needed. New apps should not need a new bespoke prompt framework just to get reliable JSON.

MCP resources

Every loaded contract is exposed dynamically as:

json-contract://{contractName}

Examples:

json-contract://support-ticket

json-contract://create-filter json-contract://chart-generation

resources/list returns all loaded contracts. resources/read returns the normalized full contract JSON.

Stable MCP tools

list_contracts

Input:

{}

Output:

{

"contracts": [ { "name": "support-ticket", "description": "Convert natural language into a support ticket object.", "contractHash": "sha256:...", "schemaHash": "sha256:..." } ] }

read_contract

Input:

{

"contract": "support-ticket" }

Returns the selected contract's description, rules, operations, schema, examples, contractHash, and schemaHash.

Hashes are deterministic SHA-256 values over the normalized contract/schema payload. They are for logging, cache keys, and audit trails; contract files still use Git for versioning.

get_json_contract

Input:

{

"contract": "support-ticket", "input": "Urgent, users cannot log in after SSO update.", "context": {} }

Output:

{

"contract": "support-ticket", "contractHash": "sha256:...", "schemaHash": "sha256:...", "operation": "create", "instructions": [ "Convert the input into JSON.", "Return JSON only.", "Do not return markdown.", "Do not include commentary.", "Do not include extra keys.", "Match the schema exactly.", "Use enum values exactly.", "Follow all rules.", "Use examples as guidance." ], "description": "Convert natural language into a support ticket object.", "rules": [ "If the user says urgent, severity must be critical.", "Summary must be under 80 characters.", "Category must

Only the beginning is shown; read the rest in the repo

Ask PopNx