Skip to main content
Glama
kolodny
by kolodny

jq-mcp

npm version npm downloads

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.

Related MCP server: mcp-json-reader

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-evil vs /foo/bar) are rejected — the check is path-boundary aware, not a naive startsWith.

Develop

npm test     # node:test suite
npm run build

Available Tools

1 tool
jqA

Runs a jq query against a JSON file, gated by an allowlist of directories.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the JSON file (absolute, or resolved against cwd).
queryYesA jq filter expression.

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the allowlist gating, which is important behavioral context. However, it omits details about error handling, return format, or read-only nature.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that efficiently conveys the core function and the key constraint. Every word serves a purpose, with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool, the description covers purpose and a constraint. However, it lacks any mention of return values or behavior in failure cases, which would be expected given no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides full descriptions for both parameters (file path and query). The tool description adds no extra meaning beyond the schema; thus, baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it runs a jq query on a JSON file, with a specific constraint (allowlist). The verb 'runs' and resource 'jq query against a JSON file' are precise. No sibling tools exist to differentiate, so 4 is appropriate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through its function but does not explicitly state when to use or avoid this tool. The 'gated by allowlist' gives a condition, but no alternatives or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.6/5.0
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
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Local MCP server that registers restricted Python filters and runs them against local JSON, YAML, and TXT files, enabling safe data filtering and file conversion.
    3
    6
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A minimal, zero-dependency MCP server that enables defining and running tools over stdio transport, without extra features like HTTP or resources.
    56
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kolodny/jq-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server