Skip to main content
Glama

JSON MCP Server

MIT License
116
24
  • Apple
  • Linux

JSON MCP 服务器 (@gongrzhe/server-json-mcp@1.0.3)

用于查询和操作 JSON 数据的 JSON 模型上下文协议 (MCP) 服务器实现。该服务器使 LLM 能够通过一组标准化工具与 JSON 数据进行交互。

安装与使用

# 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

成分

工具

  • 询问
    • 使用 JSONPath 语法和扩展操作查询 JSON 数据
    • 输入:
      • url (字符串):JSON 数据源的 URL
      • jsonPath (字符串):带有可选操作的 JSONPath 表达式
  • 筛选
    • 使用条件过滤 JSON 数据
    • 输入:
      • url (字符串):JSON 数据源的 URL
      • jsonPath (字符串):基本 JSONPath 表达式
      • 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)

配置

与 Claude Desktop 一起使用

要将此服务器与 Claude Desktop 应用程序一起使用,请将以下配置添加到您的claude_desktop_config.json中:

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

或者,如果您已经安装了该包,则可以直接使用 node 命令:

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

发展

从源代码构建

  1. 克隆存储库
  2. 安装依赖项:
    npm install
  3. 构建项目:
    npm run build

笔记

  1. 所有 JSONPath 表达式都以$开头,表示根对象
  2. 数组索引从零开始
  3. 操作中的字符串值应该用引号引起来
  4. 日期操作支持‘天’、‘月’和‘年’单位
  5. 数字运算支持基本算术运算符(+、-、*、/)

执照

麻省理工学院

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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.

模型上下文协议服务器实现,使 LLM 能够使用 JSONPath 语法查询和操作 JSON 数据,并具有用于过滤、排序、转换和聚合数据的扩展操作。

  1. 安装与使用
    1. 成分
      1. 工具
      2. 支持的操作
    2. 配置
      1. 与 Claude Desktop 一起使用
    3. 发展
      1. 从源代码构建
    4. 笔记
      1. 执照

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A 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 -
          10
          77
          Python
          MIT License
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
          Last updated -
          733
          1
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          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.
          Last updated -
          5
          Python
          Apache 2.0
        • -
          security
          F
          license
          -
          quality
          A 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
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/GongRzhe/JSON-MCP-Server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server