Skip to content

MCP Debugging

Unit tests on helper functions are necessary, but they are not sufficient for MCP servers. A tool can be:

  • defined in the source tree,
  • validated correctly in isolation,
  • even listed by tools/list,

…and still fail when a real MCP client calls it through the server entrypoint.

This repository has direct coverage for workspace helpers in src/tests/tools/workspace-tools.test.ts, but the safer guardrail is an end-to-end client check that exercises the same path used by Copilot, Claude Desktop, or any other MCP host.


The fastest contributor workflow is the official Inspector CLI — it avoids custom JSON-RPC framing and uses the real MCP client path.

Terminal window
npm run build
npx -y @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list
Terminal window
npx -y @modelcontextprotocol/inspector --cli node dist/index.js \
--method tools/call \
--tool-name document \
--tool-arg 'request="Document this pseudocode in short markdown."'
Terminal window
npx -y @modelcontextprotocol/inspector --cli node dist/index.js \
--method tools/call \
--tool-name workspace-read \
--tool-arg 'scope="source"' \
--tool-arg 'path="README.md"'

These commands are intended for repeatable verification during development and CI:

Terminal window
npm run test:mcp:ts
npm run test:mcp:py:inspector
npm run test:mcp:smoke:inspector
CommandPurpose
npm run test:mcp:tsFast unit-level coverage for workspace tools and mock MCP envelopes
npm run test:mcp:py:inspectorBlack-box smoke test via the official Inspector CLI
npm run test:mcp:smoke:inspectorCombined local regression pass

SymptomLikely cause
Tool missing from tools/listRegistration or build-generation issue
Tool is listed but tools/call returns Unknown instruction toolRouting/dispatch mismatch
Validation error — missing required fieldSchema or argument-shape mismatch
Initialize or call timeoutStartup, transport, or long-running tool behavior

tools/list advertises the namespaced workspace surface:

  • workspace-list
  • workspace-read
  • workspace-artifact
  • workspace-fetch
  • workspace-compare

The server also accepts legacy bare aliases (list, read, artifact, fetch, compare) as a compatibility path, but new tests and manual checks should prefer the namespaced public names so tools/list and tools/call stay aligned.


The Inspector proxy can spawn local processes.