Skip to main content
Glama

JSON 多协议

锻造徽章

模型上下文协议 (MCP)服务器使LLM能够高效地与 JSON 文件交互。使用 JSON MCP,您可以根据定义的条件在 JSON 文件中拆分、合并、查找特定数据并进行验证。



🌟 主要特点

✅快速、轻量
✅ LLM 友好功能


Related MCP server: mcp-server-test

🎥 演示

下面是展示split功能的演示:

演示:拆分 JSON


🔧 用例(工具)

split

将 JSON 文件拆分为指定数量的对象。

**注意:**必须提供文件路径。

提示示例:

Split JSON file from /Users/json-mcp/tests/merged.json
5 objects per file

2. merge

将 JSON 文件合并为一个 JSON 文件

**注意:**需要提供文件夹路径

提示示例:

Merge json files from /Users/json-mcp/tests

⚙️ 配置

VS Code 手动配置

要在 VS Code 中手动配置 JSON MCP 服务器,请更新**用户设置(JSON)**文件:

{
  "mcp": {
    "servers": {
      "json-mcp-server": {
        "command": "npx",
        "args": ["json-mcp-server@latest"]
      }
    }
  }
}

在 VS Code 中安装

您可以使用 VS Code CLI 安装 JSON MCP 服务器:

# For VS Code
code --add-mcp '{"name":"json-mcp-server","command":"npx","args": ["json-mcp-server@latest"]}'

安装后,JSON MCP 服务器将可与 VS Code 中的 GitHub Copilot 代理一起使用。

克劳德桌面

要通过Smithery自动为 Claude Desktop 安装 json-mcp:

npx -y @smithery/cli install @VadimNastoyashchy/json-mcp --client claude

⚙️ 安装服务器

全局安装

npm install -g json-mcp-server@latest

全局安装后运行

json-mcp-server

使用最新版本的 npx(推荐)

npx json-mcp-server@latest

Available Tools

2 tools
mergeC

Merge JSON files into a one JSON file

Inputs: path (required).

splitB

Split a JSON file into a specified number of objects

Inputs: path (required), numObjects (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 2 tools

    Disambiguation5/5

    Merge and split are clearly opposite operations. An agent can easily distinguish their purposes without ambiguity.

    Naming Consistency5/5

    Both tools use concise, single-word verbs (merge, split) following a consistent pattern.

    Tool Count4/5

    Two tools is slightly below the typical well-scoped range, but the server's narrow focus on merge/split operations justifies this minimal set.

    Completeness4/5

    The server covers the core merge and split operations for JSON files. Minor gaps like transform or validate exist, but the surface is complete for its stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers