
JSON Filter MCP
Query only the data you need from your JSON file and keep your context clean
Tools
json_schema
Generate TypeScript schema for a JSON file. Provide the file path as the only parameter.
json_filter
Filter JSON data using a shape object to extract only the fields you want. Provide filePath and shape parameters.
README
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:
{"name": "John", "age": 30, "city": "New York"}
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:
// Extract single field
{"name": true}
// Extract multiple fields
{"name": true, "age": true}
// Extract nested fields
{"user": {"name": true, "email": true}}
// Extract from arrays (applies to each item)
{"users": {"name": true, "age": true}}
Installation
Quick Start (Recommended)
# Using npx (no installation required)
npx json-mcp-filter@latest
# Or install globally
npm install -g json-mcp-filter@latest
json-mcp-server
From Source
- Clone this repository:
git clone <repository-url>
cd json-mcp-filter
- Install dependencies:
npm install
- Build the server:
npm run build
Setup for Claude Desktop
Add this server to your Claude Desktop configuration file:
macOS
{
"mcpServers": {
"json-mcp-filter": {
"command": "node",
"args": ["/path/to/json-mcp-filter/build/index.js"]
}
}
}
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:
{
"mcpServers": {
"json-mcp-filter": {
"command": "npx",
"args": ["-y", "json-mcp-filter@latest"]
}
}
}
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:
npm run inspect
This will start the server with the MCP inspector interface for interactive testing.
Project Structure
src/
index.ts # Main server implementation with tools
test/
test.json # Sample JSON file for testing
build/ # Compiled TypeScript output
Error Handling
The server includes error handling for:
- File not found errors
- Invalid JSON format
- Quicktype processing errors
- Shape filtering errors
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。