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 powerful Model Context Protocol (MCP) server that provides JSON schema generation and filtering tools for local files and remote HTTP/HTTPS endpoints. Built with quicktype for robust TypeScript type generation.
Perfect for: Filtering large JSON files and API responses to extract only relevant data for LLM context, while maintaining type safety.
✨ Key Features
- 🔄 Schema Generation - Convert JSON to TypeScript interfaces using quicktype
- 🎯 Smart Filtering - Extract specific fields with shape-based filtering
- 🌐 Remote Support - Works with HTTP/HTTPS URLs and API endpoints
- 📦 Auto Chunking - Handles large datasets with automatic 400KB chunking
- 🛡️ Size Protection - Built-in 50MB limit with memory safety
- ⚡ MCP Ready - Seamless integration with Claude Desktop and Claude Code
- 🚨 Smart Errors - Clear, actionable error messages with debugging info
🛠️ Available Tools
json_schema
Generates TypeScript interfaces from JSON data.
Parameters:
filePath
: Local file path or HTTP/HTTPS URL
Example:
json_filter
Extracts specific fields using shape-based filtering with automatic chunking for large datasets.
Parameters:
filePath
: Local file path or HTTP/HTTPS URLshape
: Object defining which fields to extractchunkIndex
(optional): Chunk index for large datasets (0-based)
Auto-Chunking:
- ≤400KB: Returns all data
400KB: Auto-chunks with metadata
json_dry_run
Analyzes data size and provides chunking recommendations before filtering.
Parameters:
filePath
: Local file path or HTTP/HTTPS URLshape
: Object defining what to analyze
Returns: Size breakdown and chunk recommendations
📋 Usage Examples
Basic Filtering
Shape Patterns
Large Dataset Workflow
🔒 Security Notice
Remote Data Fetching: This tool fetches data from HTTP/HTTPS URLs. Users are responsible for:
✅ Safe Practices:
- Verify URLs point to legitimate endpoints
- Use trusted, public APIs only
- Respect API rate limits and terms of service
- Review data sources before processing
❌ Maintainers Not Responsible For:
- External URL content
- Privacy implications of remote requests
- Third-party API abuse or violations
💡 Recommendation: Only use trusted, public data sources.
🚀 Quick Start
Option 1: NPX (Recommended)
Option 2: Global Install
Option 3: From Source
⚙️ MCP Integration
Claude Desktop
Add to your configuration file:
Claude Code
Or add manually:
- Name:
json-mcp-filter
- Command:
npx
- Args:
["-y", "json-mcp-filter@latest"]
🔧 Development
Commands
Testing
📁 Project Structure
🚨 Error Handling
Comprehensive Coverage
- Local Files: Not found, permissions, invalid JSON
- Remote URLs: Network failures, auth errors (401/403), server errors (500+)
- Content Size: Auto-reject >50MB with clear messages
- Format Detection: Smart detection of HTML/XML with guidance
- Rate Limiting: 429 responses with retry instructions
- Processing: Quicktype errors, shape filtering issues
All errors include actionable debugging information.
⚡ Performance
Processing Times
File Size | Processing Time |
---|---|
< 100 KB | < 10ms |
1-10 MB | 100ms - 1s |
10-50 MB | 1s - 5s |
> 50 MB | Blocked |
Size Protection
- 50MB maximum for all sources
- Pre-download checking via Content-Length
- Memory safety prevents OOM errors
- Clear error messages with actual vs. limit sizes
Best Practices
- Use
json_dry_run
first for large files - Filter with
json_filter
before schema generation - Focus shapes on essential fields only
🌐 Supported Sources
- Public APIs - REST endpoints with JSON responses
- Static Files - JSON files on web servers
- Local Dev -
http://localhost
during development - Local Files - File system access
💡 Common Workflows
LLM Integration:
- API returns large response
json_filter
extracts relevant fields- Process clean data without noise
json_schema
generates types for safety
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
- ✨ Key Features
- 🛠️ Available Tools
- 📋 Usage Examples
- 🔒 Security Notice
- 🚀 Quick Start
- ⚙️ MCP Integration
- 🔧 Development
- 📁 Project Structure
- 🚨 Error Handling
- ⚡ Performance
- 🌐 Supported Sources
- 💡 Common Workflows
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 -259070MIT License
- -securityFlicense-qualityExtract structured data from any website with a simple SDK call. No scraping code, no headless browsers - just prompt and get JSON.Last updated -38
- 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 -36
- -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 -13