JSON Query MCP

JSON 查询 MCP

用于查询大型 JSON 文件的模型上下文协议 (MCP) 服务器。该服务器提供处理大型 JSON 数据的工具,可供实现模型上下文协议的LLM 模型使用。

特征

  • 使用 JSONPath 表达式查询 JSON 文件
  • 搜索与查询字符串相似的键
  • 搜索与查询字符串相似的值

例子

下面是一个 Cursor Agent 使用工具读取一个非常大(>1M 个字符)的 JSON Swagger 定义,并提取一小部分来编写 typescript 接口的示例。

用法

npx json-query-mcp

在 Cursor 中安装

将以下内容添加到您的游标 mcp json 中(在 macOS 上这是/Users/$USER/.cursor/mcp.json

{ "mcpServers": { ... other mcp servers "json-query": { "command": "npx", "args": [<local path to this repo>], }, } }

发展

# Run in development mode npm run dev # Run tests npm test # Format code npm run format # Lint code npm run lint # Fix lints npm run fix

执照

麻省理工学院

-
security - not tested
-
license - not tested
-
quality - not tested

使用 JSONPath 表达式查询大型 JSON 文件的模型上下文协议服务器,使 LLM 能够高效地从大型 JSON 数据中搜索和提取信息。

  1. Features
    1. Example
      1. Usage
        1. Installation in Cursor
          1. Development
            1. License
              ID: ah5njqu08p