Provides specific configuration instructions for integrating with Claude Desktop on macOS systems through the macOS configuration file.
Leverages quicktype to convert JSON samples into TypeScript type definitions, enabling type safety and improved code structure when working with JSON data.
Generates TypeScript type definitions from JSON files, providing type safety and better code structure when working with JSON data in TypeScript environments.
JSON MCP Filter
A Model Context Protocol (MCP) server that provides JSON schema generation and filtering tools. This server uses quicktype to convert JSON samples into TypeScript type definitions and offers JSON data filtering capabilities.
Particulary helpful for JSON files that are on the larger side which contains data you don't want included in your LLM context.
Features
- JSON Schema Generation: Convert JSON files into TypeScript type definitions using quicktype-core
- JSON Filtering: Extract specific fields from JSON data using shape-based filtering
- MCP Integration: Seamlessly integrates with Claude Desktop and Claude Code
- Type Safety: Built with TypeScript and includes comprehensive error handling
Tools Provided
json_schema
Generates TypeScript type definitions from JSON files.
Parameters:
filePath
: Path to the JSON file to analyze
Example:
Generates TypeScript interfaces with proper typing.
json_filter
Extracts specific fields from JSON data using a shape definition.
Parameters:
filePath
: Path to the JSON file to filtershape
: Shape object defining which fields to extract
Shape Examples:
Installation
Quick Start (Recommended)
From Source
- Clone this repository:
- Install dependencies:
- Build the server:
Setup for Claude Desktop
Add this server to your Claude Desktop configuration file:
macOS
Setup for Claude Code
Add this server to your Claude Code MCP settings:
Add a new server with:
- Name:
json-mcp-filter
- Command:
node
- Args:
["/path/to/json-mcp-filter/build/index.js"]
Or, use the npx
method for easier setup:
Or claude mcp add json-mcp-filter node /path/to/json-mcp-filter/build/index.js
Development
Scripts
npm run build
- Compile TypeScript and make executablenpm run start
- Run the compiled servernpm run inspect
- Run with MCP inspector for debuggingnpx tsc --noEmit
- Type check without emitting files
Testing
Test the server using the MCP inspector:
This will start the server with the MCP inspector interface for interactive testing.
Project Structure
Error Handling
The server includes error handling for:
- File not found errors
- Invalid JSON format
- Quicktype processing errors
- Shape filtering errors
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Query only the data you need from your JSON file and keep your context clean
- Features
- Tools Provided
- Installation
- Setup for Claude Desktop
- Setup for Claude Code
- Development
- Project Structure
- Error Handling
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server implementation that enables LLMs to query and manipulate JSON data using JSONPath syntax with extended operations for filtering, sorting, transforming, and aggregating data.Last updated -252267JavaScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server for querying large JSON files using JSONPath expressions, enabling LLMs to efficiently search and extract information from large JSON data.Last updated -35TypeScript
- AsecurityAlicenseAqualityExtract content from URLs, documents, videos, and audio files using intelligent auto-engine selection. Supports web pages, PDFs, Word docs, YouTube transcripts, and more with structured JSON responses.Last updated -133MIT License
- -securityFlicense-qualityProvides powerful JSON manipulation tools through Model Context Protocol, enabling complex queries, schema generation, and validation with jq notation and native Node.js operations.Last updated -129JavaScript