Skip to main content
Glama
JSON MCP Server

JSON MCP Server

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

# 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

Related MCP server: Fetch JSONPath MCP

Components

Tools

  • query

    • Query JSON data using JSONPath syntax with extended operations

    • Input:

      • url (string): URL of the JSON data source

      • jsonPath (string): JSONPath expression with optional operations

  • filter

    • Filter JSON data using conditions

    • Input:

      • url (string): URL of the JSON data source

      • jsonPath (string): Base JSONPath expression

      • condition (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:

{
  "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"
    ]
  }
}

Development

Building from Source

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Notes

  1. All JSONPath expressions start with $ representing the root object

  2. Array indices are zero-based

  3. String values in operations should be wrapped in quotes

  4. Date operations support 'days', 'months', and 'years' units

  5. Numeric operations support basic arithmetic operators (+, -, *, /)

License

MIT

Available Tools

2 tools
filterC

Filter JSON data using conditions

Inputs: url (required), jsonPath (required), condition (required).

queryC

Query JSON data using JSONPath syntax

Inputs: url (required), jsonPath (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 2 tools

    Disambiguation3/5

    Both tools operate on JSON data to extract subsets, and 'filter' is essentially a restricted form of JSONPath querying, so an agent could reasonably pick either for a filtering need. The descriptions do differentiate them by mechanism (JSONPath syntax vs. conditions), which helps, but the boundary is fuzzy.

    Naming Consistency5/5

    Both names are single lowercase verbs (query, filter) following the exact same convention. There is no mixing of styles or verb forms.

    Tool Count3/5

    Two tools is thin for a server whose domain (JSON manipulation) typically involves parsing, validation, transformation, and mutation. It is defensible for a narrowly scoped read-only query server, but borderline.

    Completeness2/5

    The surface offers only read/extract operations; there is no parsing, validation, path construction, or any modification of JSON (set/merge/delete). Agents needing to inspect or transform JSON beyond querying and filtering will hit dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      F
      maintenance
      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.
      2
      90
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables efficient extraction of specific data from JSON APIs using JSONPath patterns, reducing token usage by up to 99% compared to fetching entire responses. Supports single and batch operations for both JSON extraction and raw text retrieval from URLs.
      4
      4
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides tools to validate, format, and query JSON strings via MCP. Enables AI agents to work with JSON data without needing keys or internet.
      70 npm
      MIT