modelcontextprotocol / modelcontextprotocol/inspector
CLI has no way to export/save a tool call result to a file
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 1.5k
- Avg merge
- 6h 17m
- Merged PRs (30d)
- 151
Description
Which client?
CLI
The problem
When running mcp-inspector --cli to call a tool, the only way to get the result out is to eyeball terminal output or manually pipe/redirect stdout. There's no structured --output <file> flag, and no format selection (raw vs. pretty JSON) the way the web client's ToolResultPanel export offers (clients/web/src/components/groups/ToolResultPanel/ToolResultPanel.tsx + toolResultUtils.ts). The TUI has the same gap on its result view -- no keybinding to write the currently-displayed result to a file.
This makes it awkward to script comparisons or archive results from CLI/TUI sessions, whereas the same result is one click away in the web client.
Solution you have in mind (optional)
Add --output <path> (with --format raw|json) to the CLI's tool-call/method commands, and a w keybinding on the TUI result view that prompts for (or defaults to) a filename and writes the current result there.
Alternatives or workarounds you have tried
No response
Already built it locally?
No response
Before you submit
- I searched existing issues and this is not a duplicate.
- This is a request for the Inspector itself, not for the MCP specification or an SDK.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading clients/web/src/components/groups/ToolResultPanel/ToolResultPanel.tsx and toolResultUtils.ts to understand the existing export behavior. Then locate the CLI tool-call or method commands and the TUI result view; done means CLI output and format options, plus the TUI save action, work for current tool results with coverage for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100