About ajv-validator-mcp-server
ajv-validator-mcp-server is a minimal MCP server for validating JSON data against JSON Schema with AJV. It is intended for MCP-compatible clients that need validation results or error details.
Key features
- 01Validate JSON data against JSON Schema
- 02Use ajv-formats for format checks
- 03Return validation results or errors
- 04Build and run as a TypeScript project
Use cases
- 01Check JSON payloads against a schema
- 02Identify schema validation errors
- 03Test validation interactively with MCP SDK Inspector
MCP support
It exposes the `ajv-validator` tool to MCP clients, accepting a schema and data and returning a result message or validation errors.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEajv-validator-mcp-server
This project provides a minimal Model Context Protocol (MCP) server for validating JSON data against JSON Schema using AJV.
Features
- Exposes an MCP tool
ajv-validatorfor validating JSON data against a provided schema. - Integrates ajv-formats for extended format validation.
- Designed for easy integration with MCP-compatible clients and tools.
Usage
-
Build the project: Install dependencies and compile TypeScript sources.
-
Configure MCP server: Copy and edit the example configuration file to specify the Node.js binary and the built server entrypoint.
-
Start the server: Use
npm startor run the built file directly with Node.js.
Tool API
ajv-validator
- Description: Validates JSON data against a provided JSON Schema using AJV.
- Parameters:
schema(object): The JSON Schema definition.data(object): The JSON data to validate.
- Returns: Validation result message or a list of errors.
Development
- Written in TypeScript (
src/), output indist/. - Main MCP server entrypoint:
src/index.ts. - Includes scripts for building, starting, and watching the project.
MCP SDK Inspector
The project is compatible with the MCP SDK Inspector, a tool for exploring and testing MCP servers and tools. Use the Inspector to:
- Discover and invoke the
ajv-validatortool interactively. - Inspect tool parameters, responses, and error messages.
- Debug and validate your MCP server integration.
Running the MCP SDK Inspector
To start the MCP SDK Inspector for this project, run:
npm run inspector
This command launches the Inspector and connects it to your built MCP server, allowing you to interactively test and debug the ajv-validator tool.
License
MIT -->
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.