LESSON 14 / 18·2 min readIntermediate

Testing, Inspector, Logging, and Evaluation

Must knowConcept lesson
01 Understand02 Recall03 Prepare

Test pyramid

  1. Unit: Service policy, validation, and mapping.
  2. Protocol integration: List/call behavior through an in-memory client-server connection.
  3. Transport integration: The real stdio or HTTP boundary.
  4. End-to-end: A compatible host with approval and a model loop.
  5. Security: Cross-tenant access, injection payloads, path traversal, and oversized input.

Inspector workflow

Shell
npx @modelcontextprotocol/inspector node dist/index.js

Use the Inspector to examine capabilities, tools, schemas, inputs, results, and logs. Also test actual target clients to verify production client compatibility.

Observability fields

  • Request/correlation ID, tool name, authenticated subject, duration, and result status.
  • Dependency timing and retry count.
  • Approval outcome for sensitive actions.
  • Never log tokens, secrets, complete personal records, or raw confidential prompts by default.

Agent evaluation

Do not measure only server uptime. Also evaluate correct tool selection, argument accuracy, rejection of unauthorized calls, loop rate, recovery success, latency, and user approval rate.

PAUSE & RECALL

Can you explain it without the notes?

Testing, Inspector, Logging, and Evaluation

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

Test pyramid

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Advanced Capabilities and Multiple-Server Architecture

Adapted from 20_MCP_SERVER.md · “14. Testing, Inspector, Logging, and Evaluation”. Examples are study fragments; framework behavior can depend on your version.