Skip to content

Document a reliable MCP Inspector CLI workflow #29

Description

@autocarl

Summary

MCP Inspector CLI is useful for verifying Repl-generated MCP tools/resources/prompts, but direct command-line invocation is easy to get wrong when passing both inspector options and target process arguments.

Observed friction

This kind of invocation can accidentally let --tool-arg consume target command tokens such as dotnet:

npx --yes @modelcontextprotocol/inspector --cli \
  --method tools/call \
  --tool-name ops_deploy_plan \
  --tool-arg service=checkout \
  --transport stdio \
  dotnet run -- mcp serve

A reliable pattern was to add a wrapper script:

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
exec dotnet run -- mcp serve

Then call:

npx --yes @modelcontextprotocol/inspector --cli ./run-mcp.sh \
  --method tools/list

npx --yes @modelcontextprotocol/inspector --cli ./run-mcp.sh \
  --method tools/call \
  --tool-name ops_deploy_plan \
  --tool-arg service=checkout

Documentation suggestion

Add a short “Verify with MCP Inspector” section that covers both:

  1. source/dev mode, using dotnet run or a wrapper script;
  2. packaged/compiled mode, using the installed app executable.

Why this matters

This gives coding agents and users a deterministic way to verify the generated MCP surface before configuring an actual client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions