JSON Analyser MCP
A memory-efficient MCP server for analyzing large JSON files with streaming, querying, schema detection, and chunk processing.
README
JSON Analyser MCP
A specialized Model Context Protocol (MCP) server for analyzing large JSON files with memory-efficient streaming capabilities.
Features
- Memory-Efficient Streaming: Process gigabyte-sized JSON files without loading them entirely into memory
- Advanced Querying: Search JSON data with multiple operators and conditions
- Schema Detection: Automatically analyze JSON structure and field types
- Chunk Processing: Iterate through large datasets in manageable chunks
- Multi-Field Queries: Complex queries with AND logic across multiple fields
- Unique Value Analysis: Extract unique values for any field
- Performance Tracking: Monitor processing times and memory usage
Installation
npm install -g json-analyser-mcp
Usage
As MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"JSON Analyser MCP": {
"command": "npx",
"args": ["-y", "json-analyser-mcp", "--stdio"]
}
}
}
Available Tools
1. read_json
Get an overview and preview of a JSON file.
{
"filePath": "path/to/data.json",
"fields": ["field1", "field2"], // optional
"detectSchema": true // optional, analyzes field types
}
2. query_json
Search for specific data with various operators.
{
"filePath": "path/to/data.json",
"query": {
"field": "trading_symbol",
"operator": "contains", // contains, equals, startsWith, endsWith, regex, gt, lt, gte, lte
"value": "TITAN",
"caseSensitive": false // optional
},
"maxResults": 1000 // optional
}
3. get_json_chunk
Process JSON data in sequential chunks.
{
"filePath": "path/to/data.json",
"fields": ["field1", "field2"], // optional
"start": 0,
"limit": 1000
}
4. multi_query_json
Execute multiple queries with AND logic.
{
"filePath": "path/to/data.json",
"queries": [
{
"field": "category",
"operator": "equals",
"value": "technology"
},
{
"field": "price",
"operator": "gt",
"value": 100
}
],
"maxResults": 500
}
5. get_unique_values
Extract unique values for a specific field.
{
"filePath": "path/to/data.json",
"field": "category",
"maxValues": 1000
}
Query Operators
- contains: Field value contains the search string
- equals: Exact match
- startsWith: Field value starts with the search string
- endsWith: Field value ends with the search string
- regex: Regular expression matching
- gt: Greater than (numeric)
- lt: Less than (numeric)
- gte: Greater than or equal (numeric)
- lte: Less than or equal (numeric)
Performance Benefits
- Streaming Architecture: Uses
stream-jsonfor memory-efficient processing - Large File Support: Can handle multi-gigabyte JSON files
- Fast Searches: Optimized for quick data retrieval
- Minimal Memory Footprint: Processes data without loading entire files
Use Cases
- Data Analysis: Explore large datasets without memory constraints
- Log Processing: Search through application logs efficiently
- API Response Analysis: Process large API response files
- Data Migration: Extract and transform data from JSON exports
- Research: Analyze research datasets and survey responses
Example Workflows
Analyzing Trading Data
// 1. First, get an overview
read_json({ filePath: "NSE.json", detectSchema: true })
// 2. Search for specific stocks
query_json({
filePath: "NSE.json",
query: { field: "trading_symbol", operator: "contains", value: "TITAN" }
})
// 3. Get unique sectors
get_unique_values({ filePath: "NSE.json", field: "sector" })
Processing Support Tickets
// 1. Get overview
read_json({ filePath: "tickets.json" })
// 2. Find high-priority open tickets
multi_query_json({
filePath: "tickets.json",
queries: [
{ field: "status", operator: "equals", value: "open" },
{ field: "priority", operator: "equals", value: "high" }
]
})
// 3. Process all tickets in chunks
get_json_chunk({ filePath: "tickets.json", start: 0, limit: 1000 })
Requirements
- Node.js >= 18.0.0
- Memory: Minimal (streams data)
- Disk: Sufficient space for input JSON files
License
MIT
Contributing
Contributions welcome! Please open issues and pull requests on GitHub.
Support
For issues and questions, please use the GitHub issue tracker.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。