JSON Schema Validator MCP Server

JSON Schema Validator MCP Server

jsonshema_mcp•byeienwolf

An MCP server that validates JSON data against JSON Schema Draft 2020-12, with stored schema collections, external reference resolution, and a companion SSE server for web clients.

License: Custom Non-Commercial License•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Validates JSON data against a supplied schema or against schemas stored in collections.
  • •Manages schema collections with add/update, delete, get, and list operations.
  • •Generates JSON Schema automatically from sample JSON data.
  • •Resolves external schema references and stores schemas in PostgreSQL with a local-file fallback.

BEST FOR

  • •Checking that JSON payloads conform to a given schema during AI-assisted development.
  • •Keeping reusable schema collections and validating data against stored schemas.
  • •Bootstrapping a schema from example JSON documents.

ABOUT JSONSHEMA_MCP

JSON Schema Validator MCP Server is cataloged as an MCP server attributed to eienwolf. An MCP server that validates JSON data against JSON Schema Draft 2020-12, with stored schema collections, external reference resolution, and a companion SSE server for web clients. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Custom Non-Commercial License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for JSON Schema Validator MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which JSON Schema draft does the validator support?

It supports JSON Schema Draft 2020-12 with full compliance.

Does the server require PostgreSQL to work?

PostgreSQL is optional; the server falls back to local file storage when the database is unavailable.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 986786a7021f · 采集于 2026-11-13 13:26:00 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

JSON Schema Validator MCP Server

A comprehensive JSON Schema validation server implementing the Model Context Protocol (MCP) with support for JSON Schema Draft 2020-12, external references, and real-time streaming validation.

🚀 Features

  • JSON Schema Draft 2020-12 Support: Full compliance with the latest JSON Schema specification
  • External Reference Resolution: Automatic resolution of external schema references via HTTP/HTTPS, database, or local files
  • Dual Server Architecture:
    • MCP Server for stdio communication with AI assistants
    • SSE Server for web clients with real-time streaming
  • Schema Management: Complete CRUD operations for schema collections
  • Data Storage Flexibility: PostgreSQL database with local file fallback
  • Schema Generation: Automatic JSON Schema generation from sample JSON data
  • Docker Support: Containerized deployment ready

🏗️ Architecture

Core Components

  • MCP Server (mcp_server.py): Primary server for AI assistant integration
  • SSE Server (sse_server.py): HTTP server with Server-Sent Events for web clients
  • Validation Engine (tools/JSONSchemaValidator.py): JSON Schema Draft 2020-12 validator
  • Data Manager (utils/DataManager.py): Multi-source data resolution with fallback strategy
  • Schema Generator (utils/SchemaGenerator.py): Automatic schema generation from JSON data

Data Resolution Strategy

  1. PostgreSQL Database (schemas/data_storage tables)
  2. Local Files (final fallback)

📦 Installation

Prerequisites

  • Python 3.8+
  • PostgreSQL (optional, for database storage)

Quick Start

  1. Clone the repository

    git clone https://github.com/EienWolf/jsonshema_mcp.git
    cd jsonschema_mcp
    
  2. Install dependencies

    pip install -r requirements.txt
    
  3. Run the MCP server

    python mcp_server.py
    
  4. Run the SSE server (optional)

    python sse_server.py
    

🔧 Configuration

Environment Variables

Create a .env file:

# PostgreSQL Configuration
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DATABASE=jsonschema_mcp
POSTGRES_USER=your_username
POSTGRES_PASSWORD=your_password

# Schema Management
POSTGRES_AUTO_CREATE_SCHEMA=true   # Auto-create tables if missing
POSTGRES_AUTO_RESET=false          # WARNING: Drops all data!

🛠️ Available MCP Tools

Validation Tools

  • validate_json_schema: Direct validation with provided schema
  • validate_json_from_collections: Validation using stored schemas
  • get_validation_info: Validator capabilities and information

Schema Management Tools

  • add_update_schema: Add or update schemas in collections
  • delete_schema: Delete schemas from collections
  • get_schema: Retrieve schema content
  • list_schemas: List all available schemas
  • generate_schema: Generate schema from JSON data

🐳 Docker Deployment

Build and Run

# Build image
docker build -t jsonschema-mcp-server:1.0.0 .

# Run container
docker run -i jsonschema-mcp-server:1.0.0

# Run with persistent schema storage
docker run -i -v ./schemas:/app/.schemas jsonschema-mcp-server:1.0.0

Docker Features

  • Multi-stage build optimization
  • Non-root user security
  • Health check monitoring
  • Volume support for data persistence
  • Automatic dependency management

🤖 MCP Server Configuration

Claude Desktop Integration

Method 1: Direct Python Execution

Add to your Claude Desktop configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "jsonschema-validator": {
      "command": "python",
      "args": ["C:\\path\\to\\jsonschema_mcp\\mcp_server.py"],
      "env": {
        "POSTGRES_HOST": "localhost",
        "POSTGRES_PORT": "5432",
        "POSTGRES_DATABASE": "jsonschema_mcp",
        "POSTGRES_USER": "your_username",
        "POSTGRES_PASSWORD": "your_password"
      }
    }
  }
}

Linux/macOS Example:

{
  "mcpServers": {
    "jsonschema-validator": {
      "command": "python3",
      "args": ["/path/to/jsonschema_mcp/mcp_server.py"],
      "env": {
        "POSTGRES_HOST": "localhost",
        "POSTGRES_PORT": "5432",
        "POSTGRES_DATABASE": "jsonschema_mcp",
        "POSTGRES_USER": "your_username",
        "POSTGRES_PASSWORD": "your_password"
      }
    }
  }
}

Method 2: Docker Container

{
  "mcpServers": {
    "jsonschema-validator": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "./schemas:/app/.schemas",
        "-e", "POSTGRES_HOST=host.docker.internal",
        "-e", "POSTGRES_PORT=5432",
        "-e", "POSTGRES_DATABASE=jsonschema_mcp",
        "-e", "POSTGRES_USER=your_username",
        "-e", "POSTGRES_PASSWORD=your_password",
        "jsonschema-mcp-server:1.0.0"
      ]
    }
  }
}

GitHub Copilot Integration

Method 1: Direct Python Execution

Create or update your MCP configuration file:

File: ~/.mcp/config.json (Linux/macOS) or %USERPROFILE%\.mcp\config.json (Windows)

{
  "servers": {
    "jsonschema-validator": {
      "command": "python",
      "args": ["C:\\path\\to\\jsonschema_mcp\\mcp_server.py"],
      "env": {
        "POSTGRES_HOST": "localhost",
        "POSTGRES_PORT": "5432", 
        "POSTGRES_DATABASE": "jsonschema_mcp",
        "POSTGRES_USER": "your_username",
        "POSTGRES_PASSWORD": "your_password"
      }
    }
  }
}

Linux/macOS Example:

{
  "servers": {
    "jsonschema-validator": {
      "command": "python3",
      "args": ["/path/to/jsonschema_mcp/mcp_server.py"],
      "env": {
        "POSTGRES_HOST": "localhost",
        "POSTGRES_PORT": "5432",
        "POSTGRES_DATABASE": "jsonschema_mcp", 
        "POSTGRES_USER": "your_username",
        "POSTGRES_PASSWORD": "your_password"
      }
    }
  }
}

Method 2: Docker Container

{
  "servers": {
    "jsonschema-validator": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "./schemas:/app/.schemas",
        "-e", "POSTGRES_HOST=host.docker.internal",
        "-e", "POSTGRES_PORT=5432",
        "-e", "POSTGRES_DATABASE=jsonschema_mcp",
        "-e", "POSTGRES_USER=your_username", 
        "-e", "POSTGRES_PASSWORD=your_password",
        "jsonschema-mcp-server:1.0.0"
      ]
    }
  }
}

Configuration Notes

  1. Database Configuration:

    • Environment variables are optional
    • Server automatically falls back to local file storage if database is unavailable
    • For file-only mode, omit all POSTGRES_* environment variables
  2. Path Requirements:

    • Use absolute paths for mcp_server.py
    • Ensure Python is in your system PATH
    • For Docker, ensure the image is built: docker build -t jsonschema-mcp-server:1.0.0 .
  3. Permissions:

    • Ensure the server has write permissions to the schemas directory
    • For Docker on Windows, use WSL2 backend for better volume mounting
  4. Testing Configuration:

    # Test direct execution
    python mcp_server.py
    
    # Test Docker execution  
    docker run -i jsonschema-mcp-server:1.0.0
    
  5. File-Only Configuration (No Database):

    {
      "mcpServers": {
        "jsonschema-validator": {
          "command": "python",
          "args": ["C:\\path\\to\\jsonschema_mcp\\mcp_server.py"]
        }
      }
    }
    

🌐 Web Client

The repository includes a complete web client (client_example.html) demonstrating:

  • Real-time validation with Server-Sent Events
  • Schema management interface
  • Interactive testing environment
  • Progress tracking and error reporting

🔒 Security Features

  • Input Validation: Schema ID format validation with Linux path requirements
  • Path Security: Prevention of directory traversal attacks
  • Confirmation Requirements: Explicit confirmation for destructive operations
  • Error Handling: Detailed error messages without sensitive information exposure
  • Non-root Execution: Docker containers run as non-privileged user

📋 Requirements

  • jsonschema>=4.25.0 - JSON Schema validation
  • mcp>=1.0.0 - Model Context Protocol
  • psycopg2-binary>=2.9.0 - PostgreSQL adapter
  • fastapi>=0.104.0 - SSE server framework
  • uvicorn>=0.24.0 - ASGI server
  • pydantic>=2.5.0 - Data validation
  • ruff>=0.8.0 - Code linting and formatting

🆘 Troubleshooting

Common Issues

  1. Database Connection Failed

    • Check PostgreSQL is running
    • Verify credentials in .env
    • Server falls back to file storage automatically
  2. Permission Denied

    • Ensure write permissions for .schemas directory
    • Check Docker volume mounting
  3. Schema Not Found

    • Verify schema ID format (must end with .json)
    • Check schema exists with list_schemas tool

🗺️ Roadmap

See our ROADMAP.md for planned features and future development directions, including DXT package integration, enhanced schema generation, and AI-powered capabilities.

📄 License

This project is licensed under a Custom Non-Commercial License. See the LICENSE file for details.

🙏 Acknowledgments

  • Built on the Model Context Protocol (MCP) specification
  • Uses the jsonschema library for validation
  • Inspired by modern API design patterns
  • Designed for integration with AI assistants

📞 Support

For issues, questions, or contributions:

  1. Check the troubleshooting section above
  2. Review existing issues and documentation
  3. Create a detailed issue report with:
    • Error messages
    • Steps to reproduce
    • Environment details
    • Expected vs actual behavior

Made with ❤️ for the AI and developer community

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for JSON Schema Validator MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/jsonshema_mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools