Skip to main content
Glama
JSON MCP Server

JSON MCP Server

by GongRzhe

Servidor JSON MCP (@gongrzhe/server-json-mcp@1.0.3)

Implementación de un servidor del Protocolo de Contexto de Modelo (MCP) JSON para consultar y manipular datos JSON. Este servidor permite a los LLM interactuar con datos JSON mediante un conjunto de herramientas estandarizadas.

Instalación y uso

# 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: MCP Database Server

Componentes

Herramientas

  • consulta

    • Consultar datos JSON utilizando la sintaxis JSONPath con operaciones extendidas

    • Aporte:

      • url (cadena): URL de la fuente de datos JSON

      • jsonPath (cadena): expresión JSONPath con operaciones opcionales

  • filtrar

    • Filtrar datos JSON mediante condiciones

    • Aporte:

      • url (cadena): URL de la fuente de datos JSON

      • jsonPath (cadena): expresión base JSONPath

      • condition (cadena): condición de filtro

Operaciones apoyadas

Operaciones de matriz

  • Corte : $[0:5] , $[-3:] , $[1:4]

  • Ordenación : $.sort(price) , $.sort(-price)

  • Distinto : $.distinct()

  • Transformaciones :

    • Mapa: $.map(fieldName)

    • Aplanar: $.flatten()

    • Unión: $.union([1,2,3])

    • Intersección: $.intersection([1,2,3])

Operaciones con cadenas

  • Caso : $.toLowerCase() , $.toUpperCase()

  • Pruebas : $.startsWith('test') , $.endsWith('test')

  • Buscar : $.contains('test') , $.matches('pattern')

Operaciones numéricas

  • Matemáticas : $.math(+10) , $.pow2()

  • Redondeo : $.round() , $.floor() , $.ceil()

  • Funciones : $.abs() , $.sqrt()

Operaciones de fecha

  • Formato : $.format('YYYY-MM-DD')

  • Comprobar : $.isToday()

  • Modificar : $.add(1, 'days')

Operaciones de agregación

  • Grupo : $.groupBy(category)

  • Estadísticas : $.sum(price) , $.avg(price) , $.min(price) , $.max(price)

Configuración

Uso con Claude Desktop

Para utilizar este servidor con la aplicación Claude Desktop, agregue la siguiente configuración a su claude_desktop_config.json :

{
  "json": {
    "command": "npx",
    "args": [
      "@gongrzhe/server-json-mcp@1.0.3"
    ]
  }
}

Alternativamente, puede utilizar el comando node directamente si tiene el paquete instalado:

{
  "json": {
    "command": "node",
    "args": [
      "path/to/build/index.js"
    ]
  }
}

Desarrollo

Construyendo desde la fuente

  1. Clonar el repositorio

  2. Instalar dependencias:

    npm install
  3. Construir el proyecto:

    npm run build

Notas

  1. Todas las expresiones JSONPath comienzan con $ que representa el objeto raíz

  2. Los índices de matriz se basan en cero

  3. Los valores de cadena en las operaciones deben estar entre comillas

  4. Las operaciones de fecha admiten unidades de "días", "meses" y "años".

  5. Las operaciones numéricas admiten operadores aritméticos básicos (+, -, *, /)

Licencia

Instituto Tecnológico de Massachusetts (MIT)

Available Tools

2 tools
filterC

Filter JSON data using conditions

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

queryC

Query JSON data using JSONPath syntax

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 2 tools

    Disambiguation3/5

    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.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness2/5

    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.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      6
      Apache 2.0
    • A
      license
      D
      quality
      D
      maintenance
      A 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.
      5
      14 npm
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A 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.
      9
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server for querying large JSON files using JSONPath expressions, enabling LLMs to efficiently search and extract information from large JSON data.
      3
      11
      MIT