npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sylphlab/tools-json-mcp

v0.5.1

Published

MCP server providing JSON tools

Downloads

12

Readme

@sylphlab/tools-json-mcp

NPM version

Manipulate JSON data remotely via the Model Context Protocol (MCP).

This package provides a ready-to-run MCP server that exposes JSON processing functionalities (like parsing, stringifying, potentially diff/patch) based on the tools defined in @sylphlab/tools-json.

Purpose

This server allows MCP clients (like AI agents, data processing pipelines, or development tools) to remotely perform operations on JSON data. It acts as a secure interface, taking the core JSON logic from @sylphlab/tools-json, adapting it using @sylphlab/tools-adaptor-mcp, and serving it over the MCP standard (stdio). This enables clients to work with JSON without needing local JSON parsing libraries or handling complex data transformations directly.

Features

  • MCP Server: Implements the Model Context Protocol for tool execution.
  • Exposes JSON Tools: Provides tools for:
    • Parsing JSON strings into objects/values.
    • Stringifying JavaScript objects/values into JSON strings.
    • (Potentially) Diffing and patching JSON objects.
  • Executable: Provides a binary (mcp-json) for easy execution.

Installation

This package is intended to be used as a standalone server.

Using npm/pnpm/yarn (Recommended)

Install as a dependency or globally:

# Globally
npm install -g @sylphlab/tools-json-mcp
# Or in a project
pnpm add @sylphlab/tools-json-mcp

Configure your MCP host (e.g., mcp_settings.json) to use npx or the installed binary path:

// Using npx
{
  "mcpServers": {
    "json-mcp": {
      "command": "npx",
      "args": ["@sylphlab/tools-json-mcp"],
      "name": "JSON Tools (npx)"
    }
  }
}

// Or using global install path
{
  "mcpServers": {
    "json-mcp": {
      "command": "mcp-json", // If in PATH
      "name": "JSON Tools (Global)"
    }
  }
}

Using Docker (If Available)

(Requires a Docker image sylphlab/tools-json-mcp:latest to be published)

docker pull sylphlab/tools-json-mcp:latest

Configure your MCP host:

{
  "mcpServers": {
    "json-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i", // Essential for stdio communication
        "--rm",
        "sylphlab/tools-json-mcp:latest"
      ],
      "name": "JSON Tools (Docker)"
    }
  }
}

Local Build (For Development)

  1. Build: From the monorepo root: pnpm build --filter @sylphlab/tools-json-mcp
  2. Configure MCP Host:
    {
      "mcpServers": {
        "json-mcp": {
          "command": "node",
          // Adjust path as needed
          "args": ["./packages/tools-json-mcp/dist/index.js"],
          "name": "JSON Tools (Local Build)"
        }
      }
    }

Usage

Once the server is running and configured in your MCP host, clients can send requests to process JSON data.

MCP Request Example (Parse JSON String):

{
  "tool_name": "parseJson", // Specific tool name might vary
  "arguments": {
    "jsonString": "{\"name\": \"Example\", \"value\": 42}"
  }
}

Expected Response Snippet:

{
  "result": {
    "success": true,
    "parsedObject": {
      "name": "Example",
      "value": 42
    }
  }
}

MCP Request Example (Stringify Object):

{
  "tool_name": "stringifyJson", // Specific tool name might vary
  "arguments": {
    "object": { "name": "Example", "value": 42 },
    "pretty": true // Optional formatting
  }
}

Expected Response Snippet:

{
  "result": {
    "success": true,
    "jsonString": "{\n  \"name\": \"Example\",\n  \"value\": 42\n}"
  }
}

Dependencies

  • @modelcontextprotocol/sdk: For creating the MCP server instance.
  • @sylphlab/tools-adaptor-mcp: To adapt the core tool definitions to MCP format.
  • @sylphlab/tools-json: Contains the actual logic for JSON operations.
  • @sylphlab/tools-core: Provides the base tool definition structure.

Developed by Sylph Lab.