JSON Contracts MCP server
io.github.json-contracts/json-contracts·v0.1.2·1 starsJSON contract registry and validator for structured LLM and agent outputs.
1 stars64 downloads/wk
Reviews
Write oneNobody has reviewed JSON Contracts yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
JSON Contracts tools (8)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
get_edit_contractReturn schema, rules, current JSON, edit instructions, and input so the agent/model can edit existing JSON.
get_json_contractReturn schema, rules, examples, instructions, and input so the agent/model can produce JSON.
get_repair_contractReturn schema, rules, previous invalid JSON, validation errors, and repair instructions.
list_contractsList currently loaded JSON contracts.
read_contractRead a loaded JSON contract.
reload_contractsRescan the JSON contracts directory and reload valid contracts.
statusReturn json-contracts MCP server status and loaded contract metadata.
validate_jsonValidate agent-produced JSON against a contract schema.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan38 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 145 days ago8/15
- Maintainer identityregistry namespace matches repository owner7/10
How JSON Contracts compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 80/100
- higher than 60% of 4,460 AI and agents servers
- Tools
- 8
- the typical AI and agents server has 6
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 1
- more than 50% of 2,711 AI and agents servers
- Downloads a week
- 64
- more than 51% of 1,538 AI and agents servers with a package
What its tools let an agent do: 8 read
Install JSON Contracts in Claude Code, Cursor or VS Code
Runs npx -y json-contracts on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add json-contracts -- npx -y json-contracts
What the publisher says
From the JSON Contracts repository's README, as published. We do not edit it. Read it on GitHub
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 = generatorThis:
json-contracts = schema contract registry + validatorLike TypeScript:
developer writes code
TypeScript validates itWith json-contracts:
agent writes JSON
json-contracts validates itArchitecture
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 JSONThe 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 --helpOr run without installing:
npx -y json-contracts@latestThe 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 validateThen add the MCP config below to your agent host. Point JSONCONTRACTSDIR 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-contractsBy default, the server starts as a local stdio MCP server and loads contracts from:
./json-contractsMCP 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 JSONCONTRACTSDIR 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": []
}Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
JSON Contracts: common questions
- Is JSON Contracts MCP server safe?
- Mostly: it is graded B (80/100). Read the JSON Contracts safety report
- How do I install JSON Contracts?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does JSON Contracts need an API key?
- No secret keys are declared. It reads 1 setting from the environment.
- Is JSON Contracts maintained?
- The last commit was 183 days ago (2026-05-05). The latest release is v0.1.2.
- What can I use instead of JSON Contracts?
- Servers from other publishers that do the same job: Agent-Native Plan MCP server, DCC-MCP Core MCP server and llmtrim MCP server.
- How does JSON Contracts compare with other AI and agents MCP servers?
- safety score 80/100 (higher than 60% of 4,460 AI and agents servers); tools 8 (the typical AI and agents server has 6); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to JSON Contracts
Same job from other publishers: the closest match first, then the best rated.
- Agent-Native PlanStructured visual plans and PR recaps with diagrams, prototypes, annotations, and sharingnot reviewedEstablishedA
- DCC-MCP CoreAgent control plane for DCC and engine hosts: one MCP endpoint, one tool contract.not reviewedEstablishedA
- llmtrimMCP server and proxy that compresses LLM prompts, tool output, and replies to cut token cost.not reviewedEstablishedA
- CharlotteRenders web pages into structured, agent-readable representations using headless Chromium.not reviewedEstablishedA