The JSON MCP Server enables querying and manipulating JSON data using JSONPath syntax and various operations:
Query JSON data: Extract specific data from JSON sources using JSONPath
Filter JSON data: Apply conditions to narrow down results based on criteria
Array Operations: Slice, sort, transform (map, flatten, union, intersection) and deduplicate arrays
String Operations: Transform case, test patterns (contains, matches, starts/ends with)
Numeric Operations: Perform calculations, rounding, and mathematical functions
Date Operations: Format, validate, and modify date values
Aggregation Operations: Group data and compute statistics (sum, avg, min, max)
Integration: Works with external tools like Claude Desktop
JSON MCP Server (@gongrzhe/server-json-mcp@1.0.3)
A JSON Model Context Protocol (MCP) server implementation for querying and manipulating JSON data. This server enables LLMs to interact with JSON data through a set of standardized tools.
Installation & Usage
Components
Tools
query
Query JSON data using JSONPath syntax with extended operations
Input:
url(string): URL of the JSON data sourcejsonPath(string): JSONPath expression with optional operations
filter
Filter JSON data using conditions
Input:
url(string): URL of the JSON data sourcejsonPath(string): Base JSONPath expressioncondition(string): Filter condition
Supported Operations
Array Operations
Slicing:
$[0:5],$[-3:],$[1:4]Sorting:
$.sort(price),$.sort(-price)Distinct:
$.distinct()Transformations:
Map:
$.map(fieldName)Flatten:
$.flatten()Union:
$.union([1,2,3])Intersection:
$.intersection([1,2,3])
String Operations
Case:
$.toLowerCase(),$.toUpperCase()Tests:
$.startsWith('test'),$.endsWith('test')Search:
$.contains('test'),$.matches('pattern')
Numeric Operations
Math:
$.math(+10),$.pow2()Rounding:
$.round(),$.floor(),$.ceil()Functions:
$.abs(),$.sqrt()
Date Operations
Format:
$.format('YYYY-MM-DD')Check:
$.isToday()Modify:
$.add(1, 'days')
Aggregation Operations
Group:
$.groupBy(category)Stats:
$.sum(price),$.avg(price),$.min(price),$.max(price)
Configuration
Usage with Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to your claude_desktop_config.json:
Alternatively, you can use the node command directly if you have the package installed:
Development
Building from Source
Clone the repository
Install dependencies:
npm installBuild the project:
npm run build
Notes
All JSONPath expressions start with
$representing the root objectArray indices are zero-based
String values in operations should be wrapped in quotes
Date operations support 'days', 'months', and 'years' units
Numeric operations support basic arithmetic operators (+, -, *, /)
License
MIT
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.Last updated -1181MIT License
- -security-license-qualityA Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.Last updated -118MIT License
- -security-license-qualityA 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.Last updated -MIT License
- Asecurity-licenseAqualityA 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 -37