Overview
The SNS+SQS transport combines AWS Simple Notification Service (SNS) topics with SQS queues to provide powerful pub/sub messaging with fanout capabilities. Perfect for broadcasting messages to multiple consumers and event-driven architectures.SNS+SQS transport uses topic-based routing where servers subscribe to topics and clients can broadcast messages to multiple subscribers simultaneously.
Examples
View complete working examples in the GitHub repository:Quick Start
Basic Usage
Configuration
Server Configuration
Class:SnsSqsServerConfig
URL of the SQS queue where the server receives messages from SNS topic.Example:
https://sqs.us-east-1.amazonaws.com/123456789/mcp-server-queue
Maximum messages to retrieve per poll (1-10).
Long polling duration (0-20) for SQS.
Seconds a message remains invisible after retrieval.
Seconds between queue polling attempts.
Custom attributes to include with messages.
Client Configuration
Class:SnsSqsClientConfig
URL of the client’s SQS queue for receiving responses.Example:
https://sqs.us-east-1.amazonaws.com/123456789/mcp-client-queue
ARN of the SNS topic for publishing requests.Example:
arn:aws:sns:us-east-1:123456789:mcp-requests
Unique client identifier. Auto-generated if not provided.
Custom attributes to include with messages.