JSON MCP Server
JSON MCP 服务器 (@gongrzhe/server-json-mcp@1.0.3)
用于查询和操作 JSON 数据的 JSON 模型上下文协议 (MCP) 服务器实现。该服务器使 LLM 能够通过一组标准化工具与 JSON 数据进行交互。
安装与使用
# Using npx with specific version (recommended)
npx @gongrzhe/server-json-mcp@1.0.3
# Install specific version globally
npm install -g @gongrzhe/server-json-mcp@1.0.3
# Run after global installation
server-json-mcpRelated MCP server: MCP Database Server
成分
工具
询问
使用 JSONPath 语法和扩展操作查询 JSON 数据
输入:
url(字符串):JSON 数据源的 URLjsonPath(字符串):带有可选操作的 JSONPath 表达式
筛选
使用条件过滤 JSON 数据
输入:
url(字符串):JSON 数据源的 URLjsonPath(字符串):基本 JSONPath 表达式condition(字符串):过滤条件
支持的操作
数组操作
切片:
$[0:5]、$[-3:]、$[1:4]排序:
$.sort(price)、$.sort(-price)不同:
$.distinct()转变:
地图:
$.map(fieldName)展平:
$.flatten()联合:
$.union([1,2,3])交集:
$.intersection([1,2,3])
字符串操作
大小写:
$.toLowerCase(),$.toUpperCase()测试:
$.startsWith('test')、$.endsWith('test')搜索:
$.contains('test')、$.matches('pattern')
数值运算
数学:
$.math(+10)、$.pow2()四舍五入:
$.round()、$.floor()、$.ceil()函数:
$.abs()、$.sqrt()
日期操作
格式:
$.format('YYYY-MM-DD')检查:
$.isToday()修改:
$.add(1, 'days')
聚合操作
组:
$.groupBy(category)统计数据:
$.sum(price)、$.avg(price)、$.min(price)、$.max(price)
配置
与 Claude Desktop 一起使用
要将此服务器与 Claude Desktop 应用程序一起使用,请将以下配置添加到您的claude_desktop_config.json中:
{
"json": {
"command": "npx",
"args": [
"@gongrzhe/server-json-mcp@1.0.3"
]
}
}或者,如果您已经安装了该包,则可以直接使用 node 命令:
{
"json": {
"command": "node",
"args": [
"path/to/build/index.js"
]
}
}发展
从源代码构建
克隆存储库
安装依赖项:
npm install构建项目:
npm run build
笔记
所有 JSONPath 表达式都以
$开头,表示根对象数组索引从零开始
操作中的字符串值应该用引号引起来
日期操作支持‘天’、‘月’和‘年’单位
数字运算支持基本算术运算符(+、-、*、/)
执照
麻省理工学院
Available Tools
2 toolsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The tools 'filter' and 'query' both operate on JSON data, which creates some overlap in purpose, as filtering can be seen as a subset of querying. However, the descriptions differentiate them: 'filter' uses conditions (likely simpler, boolean-based operations), while 'query' uses JSONPath syntax (a more expressive, path-based language). This distinction helps reduce confusion, but an agent might still struggle to choose between them for certain tasks.
Both tool names follow a consistent pattern: they are single, lowercase verbs ('filter' and 'query') that clearly indicate actions. There are no deviations in style (e.g., no mixing with snake_case or camelCase), making the naming predictable and easy to understand across the set.
With only 2 tools, this server feels thin for a JSON processing domain, which typically involves operations like parsing, transforming, validating, or merging JSON. The limited scope may force agents to work around gaps, as basic tasks like reading or writing JSON files are not covered, making it under-scoped for a general-purpose JSON server.
The tool set is severely incomplete for JSON processing. While 'filter' and 'query' handle retrieval and selection, there are no tools for creating, updating, validating, or manipulating JSON structures (e.g., add, remove, merge). This leaves significant gaps that will likely cause agent failures when trying to perform common JSON operations beyond simple queries.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.6Apache 2.0
- AlicenseDqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.514 npmMIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides standardized interfaces for interacting with Ollama API, offering JSON responses, error handling, and intelligent guidance for LLM-based API calls.9MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server for querying large JSON files using JSONPath expressions, enabling LLMs to efficiently search and extract information from large JSON data.311MIT