by GongRzhe
JSON-MCP-Server is a JSON Model Context Protocol (MCP) server that enables Large Language Models (LLMs) to query and manipulate JSON data. It provides advanced data interaction capabilities through standardized tools and JSONPath syntax.
JSON-MCP-Server is a JSON Model Context Protocol (MCP) server implementation designed for querying and manipulating JSON data. It enables Large Language Models (LLMs) to interact with JSON data through a set of standardized tools, providing advanced query capabilities using JSONPath syntax and supporting various operations on arrays, strings, numbers, and dates.
JSON-MCP-Server can be used by installing it globally via npm or by using npx
for specific versions. Once installed, it can be run from the command line. For integration with Claude Desktop, specific configurations can be added to claude_desktop_config.json
to define the command and arguments for running the server.
# 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-mcp
{
"json": {
"command": "npx",
"args": [
"@gongrzhe/server-json-mcp@1.0.3"
]
}
}
JSON-MCP-Server provides powerful tools for JSON data manipulation:
$[0:5]
), Sorting ($.sort(price)
), Distinct ($.distinct()
), Transformations (Map, Flatten, Union, Intersection).$.toLowerCase()
), Tests ($.startsWith('test')
), Search ($.contains('test')
).$.math(+10)
), Rounding ($.round()
), Functions ($.abs()
).$.format('YYYY-MM-DD')
), Check ($.isToday()
), Modify ($.add(1, 'days')
).$.groupBy(category)
), Statistical calculations (Sum, Avg, Min, Max).$
representing the root object.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.
# 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-mcp
query
url
(string): URL of the JSON data sourcejsonPath
(string): JSONPath expression with optional operationsfilter
url
(string): URL of the JSON data sourcejsonPath
(string): Base JSONPath expressioncondition
(string): Filter 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)
To use this server with the Claude Desktop app, add the following configuration to your claude_desktop_config.json
:
{
"json": {
"command": "npx",
"args": [
"@gongrzhe/server-json-mcp@1.0.3"
]
}
}
Alternatively, you can use the node command directly if you have the package installed:
{
"json": {
"command": "node",
"args": [
"path/to/build/index.js"
]
}
}
npm install
npm run build
$
representing the root objectMIT
Reviews feature coming soon
Stay tuned for community discussions and feedback