JSON MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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:
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 wholeJSONPath 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 smallMCP: 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 ontools/list(all five tools come back in one page),outputSchema,subscriptions/listenDebug Logging: Set
MCP_DEBUG_LOG=<file>to log every message to a file (off by default; stdout stays clean JSON-RPC)
Related MCP server: Universal JSON Agent MCP
š¦ Installation
Quick Install
Via Cargo (Recommended)
cargo install json-mcp-serverVia 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 | iexPre-built Binaries
Download platform-specific binaries from GitHub Releases:
Windows:
json-mcp-server-v{version}-x86_64-pc-windows-msvc.zipmacOS:
json-mcp-server-v{version}-x86_64-apple-darwin.tar.gzLinux:
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.debRHEL/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.rpmArch Linux (AUR)
# Manual install using PKGBUILD
wget https://github.com/ciresnave/json-mcp-server/releases/latest/download/PKGBUILD
makepkg -siBuilding 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 runVerification
After installation, verify it works:
json-mcp-server --version
json-mcp-server --helpUsage
The JSON MCP Server communicates via JSON-RPC over stdin/stdout following the Model Context Protocol specification.
Getting Started
Start the server:
cargo runGet help: Use the
json-helptool 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 filequery(string, optional): JSONPath expression for filteringoffset(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 filedata(any JSON value, required): JSON data to writemode(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 filequery(string, required): JSONPath query expressionformat(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 validateschema(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)].namePerformance 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
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
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 fileBuilding
# Development build
cargo build
# Release build
cargo build --release
# Run tests
cargo test
# Check for issues
cargo checkDependencies
tokio: Async runtimeserde/serde_json: JSON serializationjsonpath-rust: JSONPath query supportanyhow: Error handlingclap: Command line parsing
License
This project is licensed under the MIT OR Apache-2.0 license.
Contributing
Contributions are welcome! Please ensure:
Code follows Rust conventions
All tests pass
New features include appropriate tests
Documentation is updated for new functionality
Support
For issues, questions, or contributions, please refer to the project repository.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic JSON repair, validate, example-gen, schema-coerce for agents. Zero LLM, sub-10ms.
Zero-key temporary JSON database for agents: one tool call, no signup, no OAuth, no API keys.
Validate and convert JSONL fine-tuning data across 11 AI providers. 13 tools.
Repair broken LLM JSON and check it against a JSON Schema. Flags cut-off output. Free trial.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server for querying large JSON files using JSONPath expressions, enabling LLMs to efficiently search and extract information from large JSON data.311MIT
- AlicenseBqualityBmaintenanceEnables natural language interaction with JSON files, providing tools to load, query, aggregate, transform, and export data directly from AI editors.2622 PyPI3MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read, write, query, and manage JSON data files with automatic ID and timestamp generation.614 npm1MIT
- AlicenseNot gradedqualityBmaintenanceLets agents and CLI users inspect the shape of large JSON and JSONL files and extract exactly the values they need using jq-like expressions, returning compact bounded results instead of flooding context.1MIT