JSON Query MCP
# JSON Query MCP
A Model Context Protocol (MCP) server for querying large JSON files.
This server provides tools for working with large JSON data that can be used by LLM models implementing the [Model Context Protocol](https://modelcontextprotocol.io).
## Features
- Query JSON files using JSONPath expressions
- Search for keys similar to a query string
- Search for values similar to a query string
## Example
Here is an example of the Cursor Agent using the tool to read a a very large (>1M character) JSON Swagger
definition, and extracting a small portion to write a typescript interface.

## Usage
npx json-query-mcp
## Installation in Cursor
Add the following to your cursor mcp json
(on macOS this is `/Users/$USER/.cursor/mcp.json`)
```mcp.json
{
"mcpServers": {
... other mcp servers
"json-query": {
"command": "npx",
"args": [<local path to this repo>],
},
}
}
```
## Development
```bash
# Run in development mode
npm run dev
# Run tests
npm test
# Format code
npm run format
# Lint code
npm run lint
# Fix lints
npm run fix
```
## License
MIT
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: json_query_jsonpath targets precise path-based queries, json_query_search_keys focuses on key discovery, and json_query_search_values handles value discovery. There is no overlap in functionality, making it easy for an agent to select the correct tool based on the query need.
All tool names follow a consistent verb_noun pattern with 'json_query_' as a prefix, followed by specific descriptors (jsonpath, search_keys, search_values). This uniformity enhances readability and predictability across the tool set.
With 3 tools, the server is well-scoped for JSON querying, covering path-based queries, key searches, and value searches. However, it might be slightly thin if more advanced operations like filtering or transformation are expected, but it reasonably covers core query needs.
The tools provide comprehensive coverage for querying JSON files, including precise path queries and exploratory searches for keys and values. A minor gap exists in lacking tools for JSON manipulation (e.g., update or delete), but this is acceptable given the server's focus on querying rather than editing.