The practical answer

For an indie developer operating an MCP server, start with one correlated request record plus a small set of metrics. Log each MCP request and tool invocation with a request ID, tool name, outcome, duration, and a safe error category. Aggregate those records into metrics for volume, failures, latency, and retries.

Add distributed tracing only when a failure crosses several processes or services and you cannot reconstruct the sequence from logs. Tracing is valuable, but it is rarely the first thing a small team needs.

The goal is not “collect everything.” The goal is to answer three customer-facing questions quickly:

  1. Is the MCP server healthy?
  2. Which tool calls are failing or becoming slow?
  3. Did the server complete the requested work, even when the client ultimately reported a failed agent workflow?

That last distinction matters. A request can return valid JSON, produce no server error, and still represent a broken workflow—for example, a tool returns incomplete data and the agent cannot finish the task. Transport health alone will hide that failure.

Understand what you are monitoring

MCP servers sit between an AI client and external systems. A typical request may involve:

  • the client opening or using an MCP session;
  • the client listing available tools;
  • the model selecting a tool;
  • the server validating arguments;
  • the server calling a database, API, queue, or model provider;
  • the server returning a tool result;
  • the agent deciding whether the workflow is complete.

Only the MCP server observes part of that chain directly. It can confidently record what happened inside its own boundary. It may know little about what the model did after receiving the result.

That boundary should shape your data model. Label each event with its source:

  • server-observed: the MCP server received, rejected, or completed the request;
  • upstream-observed: a dependency returned an error or took unusually long;
  • client-reported: the client or agent supplied a failure signal;
  • inferred: your system concluded that the workflow failed from the available evidence.

Do not present an inference as a server error. If a tool succeeds but the agent reports that it could not use the result, track two events: the successful tool call and the failed client workflow.

Start with five groups of metrics

1. Request volume and method mix

Count requests by method and status:

  • total requests;
  • requests per minute and active sessions;
  • tools/list versus tools/call volume;
  • transport type, such as stdio or HTTP;
  • client or tenant identifier, where available and safe to collect.

Method mix helps distinguish a failing endpoint from changing traffic. A sudden increase in tools/list may indicate discovery loops. A burst of tools/call requests may reflect agent retries.

Do not use raw request volume as a health signal by itself. A zero-request period might mean healthy silence, a disconnected client, broken discovery, or an outage upstream of your server.

2. Tool-call outcomes

For each tool, record:

  • calls started;
  • calls completed successfully;
  • calls rejected before execution;
  • calls that timed out;
  • calls cancelled by the client;
  • calls retried;
  • calls whose result was explicitly marked as an error.

Track validation failures separately from execution failures. An invalid argument points toward a client, schema, prompt, or model-selection issue. A dependency timeout points toward the upstream system or network path.

Also count tools by result class, not merely by HTTP status. JSON-RPC responses can represent application errors inside a successful protocol exchange, and tool results may contain their own status information. Preserve the distinction between:

  • transport failure;
  • JSON-RPC error;
  • tool-result error;
  • successful tool execution with unusable or incomplete output.

3. Latency and concurrency

Measure duration separately for these stages:

  1. total MCP request duration;
  2. tool handler duration;
  3. upstream dependency duration;
  4. time spent before execution, including validation or queueing;
  5. time spent producing and serializing the response.

Report at least median and a high percentile such as p95. Averages hide slow customers. For a small service, a lightweight percentile calculation may be enough; avoid deploying a sophisticated telemetry stack before the volume justifies it.

Track concurrency and queue depth as well. Rising latency with stable concurrency often points to a slow dependency. Rising latency and concurrency together can point to saturation or retry amplification.

4. Token and model usage

If your MCP server invokes a model, records, or transforms model output, collect:

  • input tokens;
  • output tokens;
  • cached tokens, if the provider reports them;
  • estimated or billed cost;
  • model and provider;
  • tool-definition size;
  • context size carried into each call;
  • retries and token usage per workflow.

A single expensive tool call may be less important than an agent loop that repeats the same call with a growing context. Segment token and cost metrics by workflow, client, tenant, and tool where privacy permits.

Do not place raw prompts, model outputs, secrets, or sensitive tool arguments into metrics labels. Labels are identifiers and dimensions, not data dumps.

5. Workflow completion and error categories

This is the metric most likely to prevent false reassurance. A server can be healthy while users still fail.

Define workflow success using observable evidence:

  • the required tool calls completed;
  • the final result met the contract advertised by the tool;
  • no required downstream action was skipped;
  • the client did not report an unusable result;
  • the workflow finished within the expected deadline.

Classify errors into stable operational categories:

  • invalid input;
  • authentication or authorization;
  • permission denied;
  • dependency unavailable;
  • dependency timeout;
  • rate limited;
  • resource exhausted;
  • internal server error;
  • serialization or protocol error;
  • client cancellation;
  • unknown.

Avoid using an exception class name as the only category. It is useful in a log, but it is not a stable business or alerting dimension.

A minimum useful log record

One structured event per request can become the backbone of your observability system. A practical shape is:

{
  "timestamp": "2026-02-18T10:14:32.481Z",
  "request_id": "req_01J...") ,
  "session_id": "session_123",
  "client_id": "client_456",
  "transport": "http",
  "method": "tools/call",
  "tool_name": "create_invoice",
  "attempt": 1,
  "outcome": "tool_error",
  "error_category": "dependency_timeout",
  "duration_ms": 8421,
  "upstream": "billing_api",
  "upstream_status": 504,
  "input_tokens": 1840,
  "output_tokens": 260,
  "is_retry": false
}

Keep the raw event useful for investigation, but redact it. Tool arguments may contain customer records, credentials, or personal information. Store hashes, lengths, selected non-sensitive fields, or schema-derived classifications instead of complete payloads.

The sample is illustrative rather than a required schema. The important fields are the correlation identifiers, operation, duration, outcome, error category, and retry context.

Distinguish healthy traffic from failed agent workflows

Use a layered health model rather than a single success percentage.

Layer 1: Protocol and transport health

This answers: “Can clients talk to the server?”

Look for connection failures, malformed messages, invalid JSON-RPC requests, unsupported methods, authentication failures, and response serialization errors.

Layer 2: Tool execution health

This answers: “Does each tool execute as designed?”

Look for validation failures, dependency errors, timeouts, cancellations, and successful calls with error-shaped results.

Layer 3: Agent workflow health

This answers: “Did the customer’s task get completed?”

Look for successful calls followed by missing required calls, repeated retries, explicit client errors, incomplete outputs, or a final result that violates the tool contract.

An alert on only Layer 1 can report a green system while users lose work. An alert on every Layer 3 failure can create noise because some failures belong to the client or model. Route each layer to the owner best able to act:

  • transport and protocol failures to the server owner;
  • dependency failures to the service or integration owner;
  • schema and tool-selection failures to the product or agent owner;
  • workflow-level regressions to the team that owns the end-to-end use case.

Use logs as the source of truth first

Logs are sufficient when the workflow is contained in one process, the main failure modes are visible in structured events, and an operator can follow one request using a request ID. They are also sufficient when failures are rare enough to inspect manually and no cross-service timing puzzle needs solving.

A practical first-stage setup is:

  1. Generate a request ID at ingress when the client does not supply one.
  2. Propagate it through every tool handler and dependency call.
  3. Emit one completion event with duration and outcome.
  4. Emit separate events for retries, cancellations, and progress.
  5. Aggregate structured events into metrics.
  6. Keep a bounded retention window for detailed records.

MCP’s logging utility can deliver structured severity messages to clients, but client-facing logs are not a substitute for server-side telemetry. Some clients control verbosity, and transport details differ by implementation. Keep operational logs where your team can query and retain them independently.

Protocol version also matters. The MCP draft specification marks the logging feature as deprecated in favor of stderr for stdio and OpenTelemetry for structured observability. New implementations should not treat client-delivered log notifications as their primary monitoring system.

When tracing is worth adding

Add tracing when logs answer “what happened” but cannot reliably answer “where did the time go” across boundaries.

Typical reasons include:

  • a tool call fans out to several services;
  • retries cross gateways and queues;
  • one customer request includes multiple model and tool calls;
  • latency must be attributed to specific dependencies;
  • distributed failures reproduce only intermittently;
  • you need to see causal ordering across independently deployed processes.

A useful MCP trace should preserve the same correlation identifiers used in logs and attach spans around tool invocation and important upstream operations. Avoid tracing every internal function. The useful unit is usually the externally meaningful operation: one tool call, one upstream request, one model call, and the overall workflow.

Keep request IDs across both systems. If logs use request_id and traces use a different identifier, incident triage becomes slower rather than easier.

Do not add tracing merely because it appears sophisticated. Distributed tracing adds instrumentation work, cardinality management, storage, sampling decisions, and another query interface. If one server plus one database can be debugged with correlated structured logs, tracing may be premature.

Progress notifications are not observability

For long-running tools, MCP progress notifications can improve client experience by showing that work is still active. The client supplies a progress token, and the server may emit progress updates before the final result. These updates should increase, be rate-limited, and stop when the request completes.

Progress tells the caller that the request is alive. It does not prove that the final result is correct, and clients may not display notifications consistently. Treat progress as user experience and weak liveness evidence—not as the source of truth for workflow success.

Record the final outcome separately, and count calls that stalled without producing a final result. That distinction helps identify silent failures and timeouts.

A practical alert ladder

Start with a small number of actionable alerts:

Page immediately

  • authentication failures are affecting all clients;
  • the server cannot accept or respond to requests;
  • a critical write tool fails broadly;
  • error volume is sustained at a clearly abnormal level;
  • there is evidence of data corruption or duplicate writes.

Investigate during business hours

  • one tool’s p95 latency has risen materially;
  • one client or tenant dominates errors;
  • retries and cancellations are increasing;
  • token cost per successful workflow is growing;
  • discovery requests are much higher than tool calls.

Review periodically

  • success rates by tool;
  • workflow completion rates;
  • token consumption and cost per workflow;
  • slow-tail behavior;
  • unused or rarely selected tools.

Choose baselines from your own traffic and service commitments. Avoid universal percentages or latency thresholds presented as best practice; a read-only lookup and a write operation have different obligations.

Redaction and retention checklist

Before enabling detailed logging, make five decisions:

  1. What is collected? Prefer identifiers, counts, durations, schema fields, and status categories over full payloads.
  2. Who can see it? Apply the same access controls to logs, metrics, traces, and error-reporting tools.
  3. How long is it retained? Match detail to investigation needs; keep aggregate metrics longer where appropriate.
  4. How is it deleted? Ensure deletion and account-offboarding processes cover telemetry stores.
  5. What is excluded? Tokens, credentials, session cookies, payment data, and unrestricted prompts should not enter routine telemetry.

Sensitive values in exception messages can bypass a careful schema. Inspect the actual logging libraries and HTTP client configurations rather than assuming structured output is automatically safe.

A 30-day implementation plan

Days 1–3: Define the outcome vocabulary

Write down the server’s tools, expected result contract, known dependencies, and the definition of a completed customer workflow. Decide the stable error categories before choosing dashboards.

Days 4–7: Instrument the boundary

Add request IDs, structured request completion events, tool-level durations, outcome classification, and dependency timing. Redact inputs before they reach the logging pipeline.

Days 8–12: Add the minimum dashboard

Create panels for request volume, tool outcomes, p50/p95 latency, error categories, concurrency, and workflow completion. Add token and cost views only if your server makes model calls.

Days 13–20: Test the diagnosis path

Simulate invalid arguments, dependency timeouts, rate limits, client cancellation, and retries. Confirm that one request ID can explain each case without reading source code.

Days 21–30: Decide whether tracing earns its cost

Add tracing only if real failure cases remain ambiguous across service boundaries. If they are not ambiguous, keep the stack small and improve the quality of the logs.

The result should be an observability system that shortens customer-impact diagnosis, not merely a dashboard that looks busy.

Frequently asked questions

Should I use MCP log notifications instead of a logging platform?

No. MCP log notifications can pass structured messages to a capable client, but they are request-scoped, depend on client support and verbosity settings, and are not a durable operational store. The current MCP draft also deprecates the logging feature in favor of transport-appropriate logging and OpenTelemetry-style structured observability. Use protocol logging for client-visible diagnostics when useful, not as your incident record.

Is a 200 response enough to mark a tool call successful?

No. A successful protocol response only proves that the server returned a response. The tool result may still contain an application error, incomplete data, or a result the agent cannot use. Classify the protocol exchange, tool execution, and end-to-end workflow separately.

When are request logs enough without tracing?

Logs are usually enough when the relevant work occurs in one process, failures are represented by structured events, and a request ID provides enough context. Add tracing when you need causal ordering or latency attribution across independently deployed services.

How much detail should I retain?

Retain enough to reconstruct the operation without storing unnecessary customer content. Prefer metadata, classifications, durations, and safe identifiers over raw arguments and outputs. Set an explicit retention period and test that sensitive-data deletion reaches every telemetry backend.

The bottom line

The smallest useful MCP observability stack is usually:

  • correlated structured logs;
  • request, tool, latency, error, token, and workflow metrics;
  • explicit separation between server errors and downstream workflow failures;
  • a decision to add tracing only when request logs cannot explain cross-service behavior.

That approach gives a small team something more valuable than expensive telemetry: faster answers, clearer ownership, and fewer customer workflows that fail invisibly.

Sources