Skip to content

MCP Input Examples

MCP JSON Inputs

Back to main README

This directory contains example JSON-RPC requests that can be sent to the MCP server over stdio.

Each file contains a single line of JSON (NDJSON-ready), so you can pipe it directly to the executable.

Target Project: These inputs are designed to work with the demo project located at docs/fixtures/demo_project.

Running the Examples

From the repository root:

exe/cov-loupe -m mcp < examples/mcp-inputs/coverage_summary.json
exe/cov-loupe -m mcp < examples/mcp-inputs/uncovered_lines.json

If cov-loupe is installed globally and available on your PATH:

cov-loupe -m mcp < examples/mcp-inputs/coverage_summary.json

Formatting Tips (jq and rexe)

You can use tools like jq or rexe to format the JSON input and output, which is especially helpful for debugging.

Pretty-print an input file:

Using jq:

jq . examples/mcp-inputs/coverage_summary.json

Using Ruby:

ruby -r json -e '
  puts JSON.pretty_generate(JSON.parse(File.read("examples/mcp-inputs/coverage_summary.json")))
'

Using rexe:

rexe -f examples/mcp-inputs/coverage_summary.json -oJ

Pretty-print the MCP server's JSON response (NDJSON):

Using jq:

exe/cov-loupe -m mcp < examples/mcp-inputs/coverage_summary.json | jq .

Using Ruby:

exe/cov-loupe -m mcp < examples/mcp-inputs/coverage_summary.json | ruby -r json -e '
  puts JSON.pretty_generate(JSON.parse($stdin.read))
'

Using rexe:

exe/cov-loupe -m mcp < examples/mcp-inputs/coverage_summary.json | rexe -ml -ij -oJ