JSON Contracts MCP Server

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

Local serverstdioTypeScript

What is the JSON Contracts MCP Server?

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

The short version

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.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_contracts
read_contractReturns the selected contract's description, rules, operations, schema, examples, contractHash, and schemaHash.
get_json_contractThe agent/model uses this contract to produce JSON. The MCP server does not produce it.
get_edit_contractThe agent/model uses this edit contract to return the complete updated JSON object. The MCP server first validates currentJson against the selected contract, and the agent should validate the edited object with validate_
validate_jsonvalid is never true unless Ajv validates the JSON against the contract schema.
get_repair_contractThe agent/model uses this repair contract to produce corrected JSON. The MCP server does not repair by calling a model. When validation errors are available, instructions also includes deterministic field-specific repair
statusUse this to debug host configuration, loaded contracts, and the exact contract/schema hashes in use.
reload_contracts

How to install the JSON Contracts MCP Server

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

Configuration

VariableDescriptionRequired
JSON_CONTRACTS_DIRFilesystem location the server is allowed to use.Optional
API_AUTH_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • “Use JSON Contracts to list contracts.”
  • “Use JSON Contracts to read contract.”
  • “Use JSON Contracts to get json contract.”

Frequently asked questions

JSON contract registry and validator for structured LLM and agent outputs. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.