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])
- Map:
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:Copy
- Build the project:Copy
Notes
- All JSONPath expressions start with
$
representing the root object - Array 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
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A 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.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.Last updated -1053PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.Last updated -5361MIT License
- -securityAlicense-qualityA 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.Last updated -5PythonApache 2.0
- -securityFlicense-qualityA Model Context Protocol server that enables LLMs to fetch and process web content in multiple formats (HTML, JSON, Markdown, text) with automatic format detection.Last updated -TypeScript