jq-mcp
by kolodny
README.md
# jq-mcp
[](https://www.npmjs.com/package/jq-mcp)
[](https://www.npmjs.com/package/jq-mcp)
An MCP server that exposes a single tool, `jq`, for running jq filters against JSON files on disk.
## Use
Add to your MCP client config:
```json
{
"mcpServers": {
"jq-mcp": {
"command": "npx",
"args": ["jq-mcp@latest"]
}
}
}
```
The `jq` tool takes `file` and `query` and returns the stdout of `jq <query> <file>`. By default it can read files under the server's working directory and `/tmp`.
## Advanced: custom allowlist
Set `ALLOWED_PATHS` (comma-separated directories) in the server's `env` to override the default `<cwd>,/tmp`:
```json
"env": { "ALLOWED_PATHS": "/path/to/allow,/another/path" }
```
Path matching normalizes the input before comparing, so:
- `..` segments cannot escape an allowed directory.
- Sibling directories that share a string prefix (e.g. `/foo/bar-evil` vs `/foo/bar`) are rejected — the check is path-boundary aware, not a naive `startsWith`.
## Develop
```sh
npm test # node:test suite
npm run build
```
TDQS
A3.6/5.0
Scored across 1 tool
Disambiguation5/5
With only one tool, there is no possibility of confusion or overlap between tools. The single tool has a clear, singular purpose.
Naming Consistency4/5
The sole tool is named 'jq', which is concise and directly reflects its function. While it does not follow a verb_noun pattern, there is no inconsistency since there is only one tool.
Tool Count4/5
A single tool for running jq queries is slightly below the typical 3-15 range, but it is reasonable for a focused utility that performs one specific operation.
Completeness3/5
The server provides the core jq query functionality, but lacks supporting tools such as listing available files or directories, which may cause agent failures when needing to discover inputs.
Maintenance
ActivityInactive
ResponsivenessNo issues