{"_id":"@ahmedshaikh/schema-validate-mcp","name":"@ahmedshaikh/schema-validate-mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@ahmedshaikh/schema-validate-mcp","version":"0.1.0","type":"module","description":"Validate JSON or YAML against a JSON Schema as an MCP server — structured error paths (which field failed and why), draft-07 and 2020-12, with format checks. No shelling out to ajv-cli or python jsonschema.","bin":{"agent-validate":"dist/cli.js"},"engines":{"node":">=18"},"scripts":{"serve":"tsx src/server.ts","validate":"tsx src/cli.ts","build":"tsc","test":"node --import tsx --test --test-force-exit test/*.test.ts","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","ajv":"^8.17.0","ajv-formats":"^3.0.1","yaml":"^2.5.0","zod":"^3.23.8"},"devDependencies":{"@types/node":"^20.11.0","tsx":"^4.7.0","typescript":"^5.4.0"},"license":"MIT","author":{"name":"ahmedshaikh"},"keywords":["mcp","model-context-protocol","claude","agent","ai","json-schema","validation","ajv","yaml"],"repository":{"type":"git","url":"git+https://github.com/RaziStuff/schema-validate-mcp.git"},"homepage":"https://github.com/RaziStuff/schema-validate-mcp#readme","bugs":{"url":"https://github.com/RaziStuff/schema-validate-mcp/issues"},"publishConfig":{"access":"public"},"gitHead":"26f2f5b28cf25599de9c6cfb52ebc8e1b1298e69","_id":"@ahmedshaikh/schema-validate-mcp@0.1.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-xL25A4b9vYwcVWd5ncVqEszOTaWjBYNB1rUd8/OfIk+ER2ibLVpIeebcSb4eYQv2cObnt4BMbO2sjtc3v7hAyw==","shasum":"d657013a80a96cdd02cd13898f6230a113c0b20b","tarball":"https://registry.npmjs.org/@ahmedshaikh/schema-validate-mcp/-/schema-validate-mcp-0.1.0.tgz","fileCount":6,"unpackedSize":9152,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDM/csKtEh31kxIjzjex4B7LInXvBQ4gw9+Fz1p8YNUfAiEA0D1Vs7/KpEMW2I33O74Czfc11PXKkCwHE7bM+bgJRss="}]},"_npmUser":{"name":"ahmedshaikh","email":"ahmed@shaikh1.com"},"directories":{},"maintainers":[{"name":"ahmedshaikh","email":"ahmed@shaikh1.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/schema-validate-mcp_0.1.0_1782701047480_0.6350537614687011"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-29T02:44:07.307Z","0.1.0":"2026-06-29T02:44:07.626Z","modified":"2026-06-29T02:44:07.859Z"},"maintainers":[{"name":"ahmedshaikh","email":"ahmed@shaikh1.com"}],"description":"Validate JSON or YAML against a JSON Schema as an MCP server — structured error paths (which field failed and why), draft-07 and 2020-12, with format checks. No shelling out to ajv-cli or python jsonschema.","homepage":"https://github.com/RaziStuff/schema-validate-mcp#readme","keywords":["mcp","model-context-protocol","claude","agent","ai","json-schema","validation","ajv","yaml"],"repository":{"type":"git","url":"git+https://github.com/RaziStuff/schema-validate-mcp.git"},"author":{"name":"ahmedshaikh"},"bugs":{"url":"https://github.com/RaziStuff/schema-validate-mcp/issues"},"license":"MIT","readme":"# schema-validate\n\nValidate **JSON or YAML against a JSON Schema** and get back the *exact field path*\nof every failure — instead of shelling out to `ajv-cli` / `python -m jsonschema`\nand parsing their text. Built on [ajv](https://ajv.js.org) (draft-07 & 2020-12).\n\n```\nvalidate({ schema, data: { users: [{ email: 5 }] } })\n→ { valid: false, error_count: 1,\n    errors: [ { path: \"/users/0/email\", message: \"must be string\", keyword: \"type\" } ] }\n```\n\n## Tools\n\n- **`validate(schema, data, data_format?)`** — `schema`/`data` as objects or strings.\n  Returns `{ valid, error_count, errors: [{ path, message, keyword, allowed?, missing? }] }`.\n  Set `data_format: \"yaml\"` when `data` is a YAML string.\n- **`validate_file(schema_path, data_path)`** — validate one file against another (format auto-detected by extension).\n- **`check_schema(schema)`** — is the schema *itself* valid (compiles against the meta-schema)?\n\nError paths use JSON Pointer (`/users/0/email`). `allErrors` is on, so you get\n*every* failure at once. `format` keywords (email, date-time, uri, …) are enabled.\n\n## Setup\n\n```bash\nnpm install\nnpm test\n```\n\n```bash\nclaude mcp add schema-validate -- node /abs/path/schema-validate/dist/server.js\n# CLI: agent-validate schema.json config.yaml\n```\n\n## Honest limits\n\n- JSON Schema only (draft-07 by default; 2019-09/2020-12 auto-selected from the\n  schema's `$schema`). Not other schema languages (Joi, Zod, protobuf).\n- `strict: false` — unknown keywords are ignored rather than erroring, so odd\n  schemas still run.\n- YAML is parsed to plain JS then validated; YAML-specific tags aren't schema-checked.\n","readmeFilename":"README.md","_rev":"1-b24af61caf79567326c7ec8a032d3f83"}