jq-mcp
v0.0.1
Published
mcp server wrapping jq
Readme
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:
{
"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:
"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-evilvs/foo/bar) are rejected — the check is path-boundary aware, not a naivestartsWith.
Develop
npm test # node:test suite
npm run build