Back to Browse

Json MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Read, write, query (JSONPath) and validate JSON files; streams large arrays. stdio server.

About

Read, write, query (JSONPath) and validate JSON files; streams large arrays. stdio server.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.

9 files analyzed ยท No issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

Shell Command Execution

Runs commands on your machine. Be cautious โ€” only use if you trust this plugin.

How to Install

Install command not verified. See the repository for install instructions.

View repository

Documentation

View on GitHub

From the project's GitHub README.

JSON MCP Server

A high-performance Rust-based Model Context Protocol (MCP) server that provides comprehensive JSON file operations optimized for LLM interactions. This server enables LLMs to efficiently read, write, query, and manipulate JSON files with JSONPath querying and paged reads; a top-level array in a large file is streamed rather than loaded whole.

MCP Registry name (checked on crates.io at publish):

mcp-name: io.github.ciresnave/json-mcp-server

๐Ÿš€ Features

Core JSON Tools

  • ๐Ÿ“– json-read: Read JSON files with optional JSONPath filtering and pagination
  • โœ๏ธ json-write: Write or update JSON files with multiple merge strategies
  • ๐Ÿ” json-query: Execute complex JSONPath queries with various output formats
  • โœ… json-validate: Validate JSON structure and syntax with detailed diagnostics
  • โ“ json-help: Interactive help system with comprehensive examples and troubleshooting

Key Capabilities

  • Large File Support: Pagination for any JSON file; a top-level array is streamed element by element and stops at limit; line-delimited JSON is streamed line by line; a single large object or JSONPath over a whole document is parsed whole
  • JSONPath Querying: Full JSONPath support for complex data extraction and filtering
  • Flexible Writing: Three modes (replace, merge, append)
  • LLM-Optimized: Detailed error messages and usage examples for optimal LLM interaction
  • Bounded Output: Pagination (limit/offset) keeps each response small
  • MCP: tools-only server over stdio; speaks MCP revision 2026-07-28 (stateless, server/discover) and the handshake revisions 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05. Not implemented: pagination cursors on tools/list (all five tools come back in one page), outputSchema, subscriptions/listen
  • Debug Logging: Set MCP_DEBUG_LOG=<file> to log every message to a file (off by default; stdout stays clean JSON-RPC)

๐Ÿ“ฆ Installation

Quick Install

Via Cargo (Recommended)
cargo install json-mcp-server
Via Installation Script
# Linux/macOS
curl -fsSL https://raw.githubusercontent.com/ciresnave/json-mcp-server/main/scripts/install.sh | bash

# Windows PowerShell  
iwr https://raw.githubusercontent.com/ciresnave/json-mcp-server/main/scripts/install.ps1 | iex
Pre-built Binaries

Download platform-specific binaries from GitHub Releases:

  • Windows: json-mcp-server-v{version}-x86_64-pc-windows-msvc.zip
  • macOS: json-mcp-server-v{version}-x86_64-apple-darwin.tar.gz
  • Linux: json-mcp-server-v{version}-x86_64-unknown-linux-gnu.tar.gz

Package Managers

Debian/Ubuntu (.deb packages)
# Download and install .deb package
wget https://github.com/ciresnave/json-mcp-server/releases/latest/download/json-mcp-server_*_amd64.deb
sudo dpkg -i json-mcp-server_*_amd64.deb
RHEL/Fedora/CentOS (.rpm packages)
# Download and install .rpm package
wget https://github.com/ciresnave/json-mcp-server/releases/latest/download/json-mcp-server-*.x86_64.rpm
sudo rpm -i json-mcp-server-*.x86_64.rpm
Arch Linux (AUR)
# Manual install using PKGBUILD
wget https://github.com/ciresnave/json-mcp-server/releases/latest/download/PKGBUILD
makepkg -si

Building from Source

# Clone the repository
git clone https://github.com/ciresnave/json-mcp-server.git
cd json-mcp-server

# Build the project
cargo build --release

# Run the server
cargo run

Verification

After installation, verify it works:

json-mcp-server --version
json-mcp-server --help

Usage

The JSON MCP Server communicates via JSON-RPC over stdin/stdout following the Model Context Protocol specification.

Getting Started

  1. Start the server:

    cargo run
    
  2. Get help: Use the json-help tool to learn about available functionality:

    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "tools/call",
      "params": {
        "name": "json-help",
        "arguments": {"topic": "overview"}
      }
    }
    

Example Usage

Reading JSON Files
{
  "name": "json-read",
  "arguments": {
    "file_path": "./data.json",
    "query": "$.users[*].name"
  }
}
Writing JSON Data
{
  "name": "json-write", 
  "arguments": {
    "file_path": "./config.json",
    "data": {"setting": "value", "enabled": true},
    "mode": "merge"
  }
}
Querying with JSONPath
{
  "name": "json-query",
  "arguments": {
    "file_path": "./products.json", 
    "query": "$.products[?(@.price > 100)].name",
    "format": "table"
  }
}
Processing Large Files
{
  "name": "json-read",
  "arguments": {
    "file_path": "./large-dataset.json",
    "query": "$.records[*].id",
    "limit": 1000,
    "offset": 0
  }
}

Tool Reference

json-read

Read and parse JSON files with optional JSONPath filtering and pagination.

Parameters:

  • file_path (string, required): Path to JSON file
  • query (string, optional): JSONPath expression for filtering
  • offset (integer, optional): Number of results to skip (default: 0)
  • limit (integer, optional): Maximum results to return (default: 1000, max 10000)

json-write

Write or update JSON files with flexible merge strategies.

Parameters:

  • file_path (string, required): Path to JSON file
  • data (any JSON value, required): JSON data to write
  • mode (string, optional): "replace", "merge" (shallow object merge) or "append" (array append) (default: "replace")
  • create_dirs (boolean, optional): Create parent directories (default: true)
  • pretty (boolean, optional): Indent the output (default: true)

json-query

Execute JSONPath queries on JSON files with various output formats.

Parameters:

  • file_path (string, required): Path to JSON file
  • query (string, required): JSONPath query expression
  • format (string, optional): "json", "text" or "table" (default: "json")

json-validate

Validate JSON file structure and syntax.

Parameters:

  • file_path (string, required): Path to JSON file to validate
  • schema (any JSON value, optional): JSON schema to validate against

json-help

Get usage guidance for the tools.

Parameters:

  • topic (string, optional): Help topic - "overview", "reading", "writing", "querying", "streaming", "examples", "tools" (default: "overview")

JSONPath Support

The server supports full JSONPath syntax for querying JSON data:

  • $ - Root element
  • .field - Child field access
  • [index] - Array index access
  • [*] - All array elements
  • ..field - Recursive descent
  • [?(@.field > value)] - Filter expressions
  • {field1, field2} - Projection

JSONPath Examples

# Get all user names
$.users[*].name

# Filter users over 25
$.users[?(@.age > 25)]

# Get nested data
$.data.items[*].details.price

# All prices anywhere in document  
$..price

# Complex filtering
$.products[?(@.category == 'electronics' && @.price < 500)].name

Performance Notes

Large File Handling

  • Line-delimited JSON: detected from the first lines of the file and read record by record
  • A top-level JSON array is read element by element and reading stops at limit (memory not measured); any other single large JSON document is parsed whole before paging

Best Practices

  • Use specific JSONPath queries to filter data early
  • Set reasonable limits when processing large datasets
  • Use offset for pagination through large result sets

Error Handling

The server provides detailed error messages to help diagnose issues:

  • File not found: Clear path resolution guidance
  • JSON syntax errors: Line and column information when available
  • JSONPath errors: Syntax validation and suggestions
  • Memory issues: Guidance on using streaming alternatives

MCP Client Configuration

The JSON MCP Server works with any MCP-compatible client. Detailed configuration guides are available in the examples/mcp_clients/ directory:

Supported Clients

Quick Setup

VS Code + GitHub Copilot:

{
  "mcp.servers": {
    "json-mcp-server": {
      "path": "json-mcp-server"
    }
  }
}

Claude Desktop:

{
  "mcpServers": {
    "json-mcp-server": {
      "command": "json-mcp-server",
      "args": []
    }
  }
}

Gemini CLI (.gemini/settings.json) and Cline use the same shape:

{
  "mcpServers": {
    "json-mcp-server": { "command": "json-mcp-server", "args": [] }
  }
}

If a client cannot connect, add "env": { "MCP_DEBUG_LOG": "/tmp/json-mcp.log" } to the server entry and read the log of every message exchanged.

For detailed setup instructions, troubleshooting, and advanced configurations, see the respective client guides in the examples/mcp_clients/ directory.

Development

Project Structure

json-mcp-server/
โ”œโ”€โ”€ src/                    # Source code
โ”‚   โ”œโ”€โ”€ main.rs            # Application entry point and MCP server
โ”‚   โ”œโ”€โ”€ lib.rs             # Library exports for testing
โ”‚   โ”œโ”€โ”€ mcp/               # MCP protocol implementation
โ”‚   โ”‚   โ”œโ”€โ”€ mod.rs
โ”‚   โ”‚   โ”œโ”€โ”€ protocol.rs    # Protocol definitions and types
โ”‚   โ”‚   โ””โ”€โ”€ server.rs      # MCP server implementation
โ”‚   โ””โ”€โ”€ json_tools/        # JSON tool implementations
โ”‚       โ”œโ”€โ”€ mod.rs
โ”‚       โ”œโ”€โ”€ handler.rs     # Tool coordination and help system
โ”‚       โ”œโ”€โ”€ operations.rs  # Read/write/validate operations
โ”‚       โ”œโ”€โ”€ query.rs       # JSONPath querying with multiple formats
โ”‚       โ””โ”€โ”€ streaming.rs   # Large file streaming and pagination
โ”œโ”€โ”€ tests/                 # Integration tests
โ”‚   โ””โ”€โ”€ integration_tests.rs
โ”œโ”€โ”€ examples/              # Example configurations and data
โ”‚   โ”œโ”€โ”€ mcp_clients/       # Client configuration guides
โ”‚   โ”‚   โ”œโ”€โ”€ vscode.md      # VS Code setup
โ”‚   โ”‚   โ”œโ”€โ”€ claude-desktop.md
โ”‚   โ”‚   โ”œโ”€โ”€ github-copilot.md
โ”‚   โ”‚   โ”œโ”€โ”€ generic.md     # Generic MCP client setup
โ”‚   โ”‚   โ”œโ”€โ”€ client_implementation.md
โ”‚   โ”‚   โ””โ”€โ”€ python_client.py
โ”‚   โ”œโ”€โ”€ sample-data.json   # Sample test data
โ”‚   โ”œโ”€โ”€ test-commands.jsonl
โ”‚   โ””โ”€โ”€ test-output.json
โ”œโ”€โ”€ dev_tools/             # Development and testing utilities
โ”‚   โ”œโ”€โ”€ README.md          # Development tools documentation
โ”‚   โ””โ”€โ”€ testing/           # Test scripts and utilities
โ”‚       โ”œโ”€โ”€ test_all_tools.py
โ”‚       โ”œโ”€โ”€ test_multiple_instances.py
โ”‚       โ”œโ”€โ”€ test_json_help.py
โ”‚       โ””โ”€โ”€ [other test files]
โ”œโ”€โ”€ Cargo.toml            # Rust project configuration
โ””โ”€โ”€ README.md             # This file

Building

# Development build
cargo build

# Release build  
cargo build --release

# Run tests
cargo test

# Check for issues
cargo check

Dependencies

  • tokio: Async runtime
  • serde/serde_json: JSON serialization
  • jsonpath-rust: JSONPath query support
  • anyhow: Error handling
  • clap: Command line parsing

License

This project is licensed under the MIT OR Apache-2.0 license.

Contributing

Contributions are welcome! Please ensure:

  1. Code follows Rust conventions
  2. All tests pass
  3. New features include appropriate tests
  4. Documentation is updated for new functionality

Support

For issues, questions, or contributions, please refer to the project repository.

Reviews

No reviews yet

Be the first to review this server!