JSON MCP Server

by ciresnave

Not rated
GitHub

About

A high-performance MCP server for comprehensive JSON file operations, including reading, writing, and advanced querying, optimized for LLM interactions.

Details

Author
ciresnave
Categories
File Management, Other, Developer Tools

Setup

Install JSON MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/ciresnave/json-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

A high-performance MCP server for comprehensive JSON file operations, including reading, writing, and advanced querying, optimized for LLM interactions.

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 support for extremely large datasets and advanced querying capabilities.

- πŸ“– 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

- Large File Support: Efficient pagination and streaming for files of any size
- JSONPath Querying: Full JSONPath support for complex data extraction and filtering
- Flexible Writing: Multiple modes (replace, merge_shallow, merge_deep, append) with backup options
- LLM-Optimized: Detailed error messages and usage examples for optimal LLM interaction
- Memory Efficient: Smart pagination prevents memory overflow on large datasets
- MCP Compliant: Full Model Context Protocol support with proper error handling
- Debug Logging: File-based debug logging for troubleshooting without violating MCP protocol

# 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

Download platform-specific binaries fromGitHub 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

# 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
# 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
# Manual install using PKGBUILD wget https://github.com/ciresnave/json-mcp-server/releases/latest/download/PKGBUILD makepkg -si
# 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
json-mcp-server --version json-mcp-server --help

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

Get help: Use thejson-helptool to learn about available functionality:

{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "json-help", "arguments": {"topic": "overview"} } }
{ "name": "json-read", "arguments": { "file_path": "./data.json", "json_path": "$.users[].name", "format": "pretty" } }
{ "name": "json-write", "arguments": { "file_path": "./config.json", "data": {"setting": "value", "enabled": true}, "mode": "merge" } }
{ "name": "json-query", "arguments": { "file_path": "./products.json", "query": "$.products[?(@.price > 100)].name", "format": "table" } }
{ "name": "json-read", "arguments": { "file_path": "./large-dataset.json", "json_path": "$.records[].id", "limit": 1000, "offset": 0 } }

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

- file_path(string, required): Path to JSON file
- json_path(string, optional): JSONPath expression for filtering
- start_index(integer, optional): Starting index for pagination (default: 0)
- limit(integer, optional): Maximum items to return (default: 1000)
- output_format(string, optional): Output format - "json", "pretty", "compact" (default: "json")

Write or update JSON files with flexible merge strategies.

- file_path(string, required): Path to JSON file
- content(string, required): JSON content to write
- mode(string, optional): Write mode - "replace", "merge_shallow", "merge_deep", "append" (default: "replace")

Execute JSONPath queries on JSON files with various output formats.

- file_path(string, required): Path to JSON file
- json_path(string, required): JSONPath query expression
- output_format(string, optional): Output format - "json", "pretty", "compact", "csv", "markdown" (default: "json")

Validate JSON file structure and syntax.

- file_path(string, required): Path to JSON file to validate

Get comprehensive help about available tools and JSONPath syntax.

- topic(string, optional): Help topic - "overview", "tools", "jsonpath", "examples", "troubleshooting" (default: "overview")

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

# 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

- Files of any size: Thejson-readtool automatically uses streaming for memory efficiency
- Line-delimited JSON: Automatically detected and processed efficiently
- Memory usage: Streaming keeps memory usage constant regardless of file size

- Use specific JSONPath queries to filter data early
- Set reasonable limits when processing large datasets
- Use offset for pagination through large result sets
- The server automatically optimizes for file size and available memory

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

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

- VS Code with GitHub Copilot- Complete setup guide
-
Claude Desktop- Configuration and usage examples
-
Generic MCP Client- Universal configuration guide
-
Custom Implementation- Build your own client

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

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

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
# Development build cargo build # Release build cargo build --release # Run tests cargo test # Check for issues cargo check

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

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

Contributions are welcome! Please ensure:
- Code follows Rust conventions
- All tests pass
- New features include appropriate tests
- Documentation is updated for new functionality

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

A local server that allows AI to execute Windows CMD commands, read/write files, and manage directories within a specified path.

Securely browse and read files within an Android project, with built-in validation and access controls for sensitive directories.

An MCP server for viewing, editing, and creating text files, based on the Claude built-in text editor tool.

A cross-platform filesystem server for Linux, macOS, and Windows with secure path restrictions.

A server for processing PDF files, allowing text and table extraction, metadata retrieval, and file listing within a specific directory.

Visualize directory structures with real-time updates, configurable depth, and smart exclusions for efficient project navigation.

A Node.js MCP server for managing local files, processes, and terminal sessions.

Read and analyze Excel (.xlsx) and CSV (.csv) files with scalable, chunked, and column-specific data access, ideal for large datasets.

An MCP server for manipulating and managing Excel files.

A high-performance Model Context Protocol (MCP) server that provides secure filesystem access and AI-optimized code development tools for Claude and other AI assistants.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.