Guide · AWS Application Signals · MCP Observability
AWS Application Signals for MCP Server Observability — Service Health, Topology, and Auto-Instrumentation
AWS Application Signals is a CloudWatch feature that automatically instruments your application and surfaces service health metrics, dependency topology maps, and Service Level Objective tracking — without code changes. For MCP server operators, it answers the questions that matter most in production: which tool operations are slow, which downstream services are causing errors, and are you meeting your latency and availability goals? This guide covers how Application Signals works, how to enable it for Node.js MCP servers on ECS and Lambda, and how to query the service health API programmatically.
TL;DR
AWS Application Signals uses the AWS Distro for OpenTelemetry (ADOT) to automatically collect metrics and traces from your running application, then synthesizes them into per-operation latency, error rate, and throughput metrics stored in CloudWatch. Enable it by deploying an ADOT sidecar (ECS) or Lambda layer with OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true. Query discovered services with ListServicesCommand and operations with ListServiceOperationsCommand from @aws-sdk/client-application-signals. Define Service Level Objectives against those operations to track SLO attainment and error budgets. For ECS-specific setup, see the ECS instrumentation guide; for Lambda, see the Lambda instrumentation guide.
What Application Signals adds to MCP server observability
Standard CloudWatch gives you infrastructure metrics: CPU, memory, request count, invocation duration. Those metrics tell you that something is wrong but not which operation or downstream dependency caused it. Application Signals operates at a higher level — it understands the structure of your application.
When you enable Application Signals, the ADOT SDK automatically instruments every inbound HTTP request, every outbound SDK call (DynamoDB, S3, SQS, any AWS service), and every downstream HTTP call your MCP server makes. It maps these into a service topology: a graph of your MCP server as the root node, with edges to every service it calls and their latency/error distributions. When a tool operation is slow, the topology shows whether the bottleneck is in your MCP server code, in the DynamoDB query your tool depends on, or in the downstream API it proxies.
Application Signals surfaces four golden signals per service operation:
- Latency — P50, P90, P99 response times for each operation (e.g.,
tools/call, individual tool names) - Error rate — the percentage of requests that resulted in 4xx or 5xx responses
- Fault rate — the percentage of requests that resulted in 5xx errors specifically (server-side faults vs client errors)
- Throughput — requests per minute for each operation
These metrics are automatically stored in CloudWatch under the AWS/ApplicationSignals namespace and can be queried, alarmed on, and used as the basis for Service Level Objectives. The key operational advantage over hand-rolled CloudWatch metrics is that Application Signals correlates these signals with distributed traces (AWS X-Ray), so you can drill from "P99 latency is 4 seconds on the generate-report tool" directly into the traces that exceeded the threshold.
How auto-instrumentation works
Application Signals does not modify your MCP server code. Instead, it inserts a lightweight SDK layer at the Node.js process level that patches standard HTTP libraries and AWS SDK clients at startup.
For Node.js, the auto-instrumentation package is @aws/aws-distro-opentelemetry-node-autoinstrumentation. You load it via the NODE_OPTIONS environment variable:
NODE_OPTIONS=--require @aws/aws-distro-opentelemetry-node-autoinstrumentation/register
When the Node.js process starts, this register hook patches:
httpandhttps— captures all inbound MCP protocol requests and outbound API calls@aws-sdk/client-*packages — adds trace spans for every AWS SDK call with service, operation, and resource attributes- Common HTTP client libraries:
axios,node-fetch,undici - Database drivers:
pg,mysql2,redis,ioredis
The instrumentation does not require source code changes and works with the MCP SDK's built-in HTTP transport (StreamableHTTPServerTransport and SSEServerTransport) without modification. The traces are exported to X-Ray via the ADOT collector, and Application Signals reads those traces to synthesize per-operation metrics in CloudWatch.
The ADOT collector runs as a sidecar container (ECS) or is embedded in the Lambda execution environment. The collector configuration for Application Signals mode is managed automatically — you do not write an ADOT collector config file. Setting OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true switches the collector into the Application Signals pipeline, which routes spans to both X-Ray (for traces) and CloudWatch Metrics (for the golden signal aggregates).
Enabling Application Signals for a Node.js MCP server
The minimum configuration to get Application Signals working on any Node.js MCP server consists of three environment variables and the @aws/aws-distro-opentelemetry-node-autoinstrumentation package:
// Add to your MCP server's npm dependencies
// npm install @aws/aws-distro-opentelemetry-node-autoinstrumentation
// Environment variables required at runtime:
// NODE_OPTIONS=--require @aws/aws-distro-opentelemetry-node-autoinstrumentation/register
// OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true
// OTEL_RESOURCE_ATTRIBUTES=service.name=mcp-server,deployment.environment=production
// No code changes needed in your MCP server.
// The instrumentation registers itself via the NODE_OPTIONS hook.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import express from "express";
import { z } from "zod";
const server = new McpServer({
name: "my-mcp-server",
version: "1.0.0"
});
server.tool("generate-report", { query: z.string() }, async ({ query }) => {
// All HTTP calls, AWS SDK calls, and DB queries inside here
// are automatically traced by ADOT auto-instrumentation.
const result = await runReport(query);
return { content: [{ type: "text", text: result }] };
});
const app = express();
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: () => crypto.randomUUID() });
await server.connect(transport);
app.post("/mcp", (req, res) => transport.handleRequest(req, res, req.body));
app.listen(3000);
The service.name attribute in OTEL_RESOURCE_ATTRIBUTES is how Application Signals identifies your service in the service map and groups operations in the dashboard. Use a stable, human-readable name — this is what appears in the CloudWatch console and what you reference when creating SLOs. Use deployment.environment to distinguish production from staging so SLOs are not polluted by test traffic.
Application Signals requires the ADOT collector to be running and reachable. For ECS deployments, this is a sidecar container. For Lambda, it is a Lambda Layer. Both approaches are covered in depth in the platform-specific guides in this arc.
Querying the Application Signals API
Once your MCP server is instrumented and traffic is flowing, Application Signals automatically discovers and registers your service. You can query the discovery data and health status programmatically using the @aws-sdk/client-application-signals package:
import {
ApplicationSignalsClient,
ListServicesCommand,
GetServiceCommand,
ListServiceOperationsCommand
} from "@aws-sdk/client-application-signals";
const client = new ApplicationSignalsClient({ region: process.env.AWS_REGION });
async function getMcpServerHealth(serviceName: string, environment: string) {
const now = new Date();
const oneHourAgo = new Date(now.getTime() - 60 * 60 * 1000);
// List all services Application Signals has discovered
const servicesResponse = await client.send(new ListServicesCommand({
StartTime: oneHourAgo,
EndTime: now
}));
const mcpService = servicesResponse.ServiceSummaries?.find(s =>
s.KeyAttributes?.["Name"] === serviceName &&
s.KeyAttributes?.["Environment"] === environment
);
if (!mcpService) {
throw new Error(`Service '${serviceName}' not found in Application Signals`);
}
// Get detailed service health data
const serviceDetail = await client.send(new GetServiceCommand({
StartTime: oneHourAgo,
EndTime: now,
KeyAttributes: mcpService.KeyAttributes!
}));
// List individual operations (tool names, routes)
const operationsResponse = await client.send(new ListServiceOperationsCommand({
StartTime: oneHourAgo,
EndTime: now,
KeyAttributes: mcpService.KeyAttributes!
}));
return {
service: serviceDetail.Service,
operations: operationsResponse.ServiceOperations
};
}
// Usage:
const health = await getMcpServerHealth("mcp-server", "production");
console.log("Service operations:", health.operations?.map(op => ({
name: op.Name,
metricReferences: op.MetricReferences?.length
})));
The ListServicesCommand response requires a time window — Application Signals only returns services that have emitted telemetry within the requested period. Use a window of at least one hour to avoid missing services with low traffic. The KeyAttributes map identifies a service by its type, name, and environment; for a standard Node.js application this is {"Type": "Service", "Name": "mcp-server", "Environment": "production"}.
Service operations correspond to individual routes or tool call patterns that Application Signals detected in the traces. For MCP servers using HTTP transport, you will typically see operations like POST /mcp alongside any additional routes you expose (GET /health, GET /sse). The operation-level metrics are the basis for creating per-tool SLOs.
Reading service health metrics
Application Signals stores its synthesized metrics in CloudWatch under the AWS/ApplicationSignals namespace. You can read them directly with the CloudWatch Metrics API or through the Application Signals SDK. Each metric has the following dimensions:
Service— the service name fromOTEL_RESOURCE_ATTRIBUTESEnvironment— the deployment environmentOperation— the specific operation within the serviceRemoteService,RemoteOperation,RemoteEnvironment— the downstream service and operation for dependency edges
The key metric names are:
Latency— in milliseconds, as a histogram; use extended statistics (p50, p90, p99) for SLO trackingError— count of 4xx responses in the periodFault— count of 5xx responses in the period
import { CloudWatchClient, GetMetricStatisticsCommand } from "@aws-sdk/client-cloudwatch";
const cw = new CloudWatchClient({ region: process.env.AWS_REGION });
async function getP99Latency(serviceName: string, operation: string, environment: string) {
const now = new Date();
const oneHourAgo = new Date(now.getTime() - 60 * 60 * 1000);
const response = await cw.send(new GetMetricStatisticsCommand({
Namespace: "AWS/ApplicationSignals",
MetricName: "Latency",
Dimensions: [
{ Name: "Service", Value: serviceName },
{ Name: "Operation", Value: operation },
{ Name: "Environment", Value: environment }
],
StartTime: oneHourAgo,
EndTime: now,
Period: 300, // 5-minute aggregation periods
ExtendedStatistics: ["p99", "p95", "p50"]
}));
return response.Datapoints?.map(dp => ({
timestamp: dp.Timestamp,
p99Ms: dp.ExtendedStatistics?.["p99"],
p95Ms: dp.ExtendedStatistics?.["p95"],
p50Ms: dp.ExtendedStatistics?.["p50"]
})) ?? [];
}
async function getErrorRate(serviceName: string, operation: string, environment: string) {
const now = new Date();
const oneHourAgo = new Date(now.getTime() - 60 * 60 * 1000);
// Get fault count and total request count in the same period
const [faultResponse, latencyResponse] = await Promise.all([
cw.send(new GetMetricStatisticsCommand({
Namespace: "AWS/ApplicationSignals",
MetricName: "Fault",
Dimensions: [
{ Name: "Service", Value: serviceName },
{ Name: "Operation", Value: operation },
{ Name: "Environment", Value: environment }
],
StartTime: oneHourAgo,
EndTime: now,
Period: 3600,
Statistics: ["Sum"]
})),
cw.send(new GetMetricStatisticsCommand({
Namespace: "AWS/ApplicationSignals",
MetricName: "Latency",
Dimensions: [
{ Name: "Service", Value: serviceName },
{ Name: "Operation", Value: operation },
{ Name: "Environment", Value: environment }
],
StartTime: oneHourAgo,
EndTime: now,
Period: 3600,
Statistics: ["SampleCount"]
}))
]);
const faults = faultResponse.Datapoints?.[0]?.Sum ?? 0;
const total = latencyResponse.Datapoints?.[0]?.SampleCount ?? 0;
return total > 0 ? ((faults / total) * 100).toFixed(2) + "%" : "no data";
}
IAM permissions for Application Signals
Your MCP server's execution role needs two categories of permissions: one to export telemetry, and one to read service health data. The telemetry export permissions are needed at the application runtime level (ECS task role, Lambda execution role); the read permissions are needed in any code that queries the ApplicationSignals API.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"xray:PutTraceSegments",
"xray:PutTelemetryRecords",
"xray:GetSamplingRules",
"xray:GetSamplingTargets"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"cloudwatch:PutMetricData",
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:DescribeLogStreams"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"application-signals:BatchGetServiceLevelObjectiveBudgetReport",
"application-signals:GetServiceLevelObjective",
"application-signals:ListServiceLevelObjectives",
"application-signals:ListServices",
"application-signals:GetService",
"application-signals:ListServiceOperations",
"application-signals:ListServiceDependencies",
"application-signals:ListServiceDependents"
],
"Resource": "*"
}
]
}
The X-Ray permissions are required for the ADOT collector to export traces. Without them, the collector's trace exporter will fail silently — Application Signals will have no data to synthesize into metrics. If you are using an ECS task role, attach this policy to the task role (not the task execution role used for image pulls). For Lambda, attach it to the Lambda execution role.
The cloudwatch:PutMetricData permission is needed by the Application Signals CloudWatch Metrics exporter in the ADOT collector pipeline. This exporter writes directly to the AWS/ApplicationSignals namespace from the sidecar or Lambda environment. If you restrict PutMetricData by namespace in your permission boundaries, add a condition to allow the AWS/ApplicationSignals namespace explicitly.
Service topology for downstream dependency analysis
One of Application Signals' most useful features for MCP servers is the service dependency map — a graph that shows every downstream service your MCP server calls and the health metrics for each edge. For MCP servers that act as orchestration layers (calling DynamoDB, calling SQS, calling third-party APIs), the topology reveals which dependencies are contributing to latency or errors without requiring manual instrumentation at each call site.
import {
ApplicationSignalsClient,
ListServiceDependenciesCommand
} from "@aws-sdk/client-application-signals";
const client = new ApplicationSignalsClient({ region: process.env.AWS_REGION });
async function getMcpServerDependencies(keyAttributes: Record) {
const now = new Date();
const oneHourAgo = new Date(now.getTime() - 60 * 60 * 1000);
const response = await client.send(new ListServiceDependenciesCommand({
StartTime: oneHourAgo,
EndTime: now,
KeyAttributes: keyAttributes
}));
// Dependencies include AWS services (DynamoDB, S3, SQS) and
// any downstream HTTP services your MCP server calls
return response.ServiceDependencies?.map(dep => ({
remoteService: dep.KeyAttributes?.["Name"],
remoteType: dep.KeyAttributes?.["Type"],
operationName: dep.OperationName,
// MetricReferences contains Latency, Error, Fault metric configs
metricCount: dep.MetricReferences?.length
}));
}
const keyAttributes = {
"Type": "Service",
"Name": "mcp-server",
"Environment": "production"
};
const deps = await getMcpServerDependencies(keyAttributes);
console.log("MCP server dependencies:", deps);
// Example output:
// [
// { remoteService: "AWS::DynamoDB", remoteType: "AWS::DynamoDB::Table", operationName: "GetItem", metricCount: 3 },
// { remoteService: "AWS::S3", remoteType: "AWS::S3::Bucket", operationName: "GetObject", metricCount: 3 },
// { remoteService: "api.openai.com", remoteType: "RemoteService", operationName: "POST /v1/chat/completions", metricCount: 3 }
// ]
The topology is populated automatically as traces arrive — no manual registration is required. Each dependency edge carries the same four golden signal metrics (latency, error, fault, throughput). When a DynamoDB table starts throttling, you will see the DynamoDB edge's error rate spike on the topology before the MCP server's own metrics degrade, giving you earlier warning and clearer attribution.
Common failure patterns and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| No services appear in Application Signals console after deployment | OTEL_AWS_APPLICATION_SIGNALS_ENABLED not set, or ADOT collector not running |
Verify the environment variable is set to true (string, not boolean); confirm the ADOT collector sidecar is running and reachable at localhost:4316; check collector container logs for export errors |
| Service appears but shows no operations | Service name set but no HTTP traffic has flowed yet, or auto-instrumentation package not loading | Send at least one request through the MCP transport; confirm NODE_OPTIONS includes the register hook; check process startup logs for OTEL initialization messages |
| X-Ray traces appear but Application Signals metrics do not | Missing cloudwatch:PutMetricData permission, or Application Signals CloudWatch Metrics exporter disabled |
Add cloudwatch:PutMetricData to the task/execution role; verify OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true is set (this enables the CloudWatch Metrics exporter in the ADOT pipeline) |
| Operations show high latency but traces show individual calls are fast | Queueing time before the HTTP handler fires is not attributed to any span — could be Lambda cold starts or ECS task startup | Use Lambda SnapStart to reduce cold start latency; monitor InitDuration in Lambda metrics; for ECS, check container health check timing and ensure the ADOT sidecar starts before the app container begins serving traffic |
ListServicesCommand returns empty list despite active traffic |
Time window too narrow, or service emitting telemetry in a different region | Use a time window of at least 1 hour; verify the ApplicationSignalsClient region matches the region where your ECS/Lambda is running; Application Signals data is region-specific and not replicated across regions |
| Dependency edges missing for some downstream calls | Library not patched by ADOT auto-instrumentation (e.g., custom TCP client, non-standard HTTP library) | ADOT instruments standard Node.js http/https modules, so libraries that use those internally are covered; for custom TCP or gRPC clients, add manual span creation using the OpenTelemetry API |
Application Signals arc — related guides
This guide covers Application Signals concepts, the auto-instrumentation model, and the core APIs. The arc continues with platform-specific deployment and advanced SLO configuration:
- Service Level Objectives with Application Signals — defining SLOs on tool operation success rates and latency, error budgets, burn-rate alarms, and attainment reports
- Application Signals for ECS Fargate MCP servers — ADOT sidecar container configuration in ECS task definitions, environment variables, IAM task role, and generated metric dimensions
- Application Signals for Lambda-based MCP servers — ADOT Lambda layer ARN, handler wrapping, cold start tradeoffs, and function URL SSE patterns
For external uptime checks — detecting when your MCP server is completely unreachable before Application Signals can even report on it — AliveMCP provides active probe-based monitoring that fires Slack and email alerts the moment your endpoint stops responding.