A Model Context Protocol server for Amazon SNS and SQS to provision and manage your messaging services
Project description
Amazon SNS / SQS MCP Server
A Model Context Protocol (MCP) server for Amazon SNS / SQS that enables generative AI models to manage SNS Topics and SQS Queues through MCP tools.
Features
This MCP server acts as a bridge between MCP clients and Amazon SNS / SQS, allowing generative AI models to create, configure, and manage Topics / Queues. The server provides a secure way to interact with Amazon SNS / SQS resources while maintaining proper access controls and resource tagging.
graph LR
A[Model] <--> B[MCP Client]
B <--> C["Amazon SNS / SQS MCP Server"]
C <--> D[Amazon SNS / SQS Service]
style A fill:#f9f,stroke:#333,stroke-width:2px
style B fill:#bbf,stroke:#333,stroke-width:2px
style C fill:#bfb,stroke:#333,stroke-width:4px
style D fill:#fbb,stroke:#333,stroke-width:2px
From a security perspective, this server implements resource tagging to ensure that only resources created through the MCP server can be modified by it. This prevents unauthorized modifications to existing Amazon MQ resources that were not created by the MCP server.
Key Capabilities
This MCP server provides tools to:
- Create, list, and manage Amazon SNS topics
- Create, list, and manage Amazon SNS subscriptions
- Create, list, and manage Amazon SQS queues
- Send and receive messages using SNS and SQS
Prerequisites
- Install
uvfrom Astral or the GitHub README - Install Python using
uv python install 3.10 - AWS account with permissions to create and manage Amazon SNS / SQS resources
Setup
IAM Configuration
- Provision a user in your AWS account IAM
- Attach ONLY
AmazonSNSFullAccessandAmazonSQSFullAccessto the new user - Use
aws configureon your environment to configure the credentials (access ID and access key)
Installation
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit ~/.aws/amazonq/mcp.json):
{
"mcpServers": {
"awslabs.amazon-sns-sqs-mcp-server": {
"command": "uvx",
"args": ["awslabs.amazon-sns-sqs-mcp-server@latest"],
"env": {
"AWS_PROFILE": "your-aws-profile",
"AWS_REGION": "us-east-1"
}
}
}
}
or docker after a succesful docker build -t awslabs/amazon-sns-sqs-mcp-server.:
# ficticious `.env` file with AWS temporary credentials
AWS_ACCESS_KEY_ID=<from the profile you set up>
AWS_SECRET_ACCESS_KEY=<from the profile you set up>
AWS_SESSION_TOKEN=<from the profile you set up>
{
"mcpServers": {
"awslabs.lambda-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"--env-file",
"/full/path/to/file/above/.env",
"awslabs/amazon-sns-sqs-mcp-server:latest"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
Server Configuration Options
The Amazon SNS / SQS MCP Server supports several command-line arguments that can be used to configure its behavior:
--sse
Use Server-Sent Events (SSE) transport instead of stdio. Default is False.
Example:
uv run awslabs.amazon-sns-sqs-mcp-server --sse
--port PORT
Specifies the port number on which the server will listen. Default is 6274.
Example:
uv run awslabs.amazon-sns-sqs-mcp-server --port 9000
--allow-resource-creation
Enables tools that create resources in the user's AWS account. When this flag is not enabled, the create new resources tools will be hidden from the MCP client, preventing the creation of new Amazon SNS / SQS resources. Default is False.
This flag is particularly useful for:
- Testing environments where resource creation should be restricted
- Limiting the scope of actions available to the AI model
Example:
uv run awslabs.amazon-sns-sqs-mcp-server --disallow-resource-creation
Security Features
The MCP server implements a security mechanism that only allows modification of resources that were created by the MCP server itself. This is achieved by:
- Automatically tagging all created resources with a
mcp_server_versiontag - Validating this tag before allowing any mutative actions (update, delete, reboot)
- Rejecting operations on resources that don't have the appropriate tag
- A2P Mutative Operations are not enabled
Best Practices
- Use descriptive broker names to easily identify resources
- Follow the principle of least privilege when setting up IAM permissions
- Use separate AWS profiles for different environments (dev, test, prod)
- Monitor broker metrics and logs for performance and issues
- Implement proper error handling in your client applications
Security Considerations
When using this MCP server, consider:
- The MCP server needs permissions to create and manage Amazon SNS / SQS resources
- Only resources created by the MCP server can be modified by it
Troubleshooting
- If you encounter permission errors, verify your IAM user has the correct policies attached
- For connection issues, check network configurations and security groups
- If resource modification fails with a tag validation error, it means the resource was not created by the MCP server
- For general Amazon SNS / SQS issues, consult the Amazon SNS documentation , Amazon SQS documentation
Version
Current MCP server version: 0.0.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awslabs_amazon_sns_sqs_mcp_server-1.0.1.tar.gz.
File metadata
- Download URL: awslabs_amazon_sns_sqs_mcp_server-1.0.1.tar.gz
- Upload date:
- Size: 88.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c61db43d1fcabb1e40c953d77b3b837f75d7bc3d74a10905aadb9fafd2cad41
|
|
| MD5 |
a0dca74b562b337c4974ed74c459c49c
|
|
| BLAKE2b-256 |
1cc4c73d6bfed595a839588f0a7594c8c8cd381430393e6cee71244e5eab9045
|
Provenance
The following attestation bundles were made for awslabs_amazon_sns_sqs_mcp_server-1.0.1.tar.gz:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_amazon_sns_sqs_mcp_server-1.0.1.tar.gz -
Subject digest:
4c61db43d1fcabb1e40c953d77b3b837f75d7bc3d74a10905aadb9fafd2cad41 - Sigstore transparency entry: 212496085
- Sigstore integration time:
-
Permalink:
awslabs/mcp@0f8f4b6e98c70f29411c46a73d3ae16b335adc0f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0f8f4b6e98c70f29411c46a73d3ae16b335adc0f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file awslabs_amazon_sns_sqs_mcp_server-1.0.1-py3-none-any.whl.
File metadata
- Download URL: awslabs_amazon_sns_sqs_mcp_server-1.0.1-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
771d554b7e6867f79d990f7ca5ebfded96bf29569e4d89eb4d035c119be50b57
|
|
| MD5 |
f54fb0eb699e34306f7943311e0022e3
|
|
| BLAKE2b-256 |
2930ccb6442ea7a0ea39109a0c99b98274d1da3ca0708c50b1c2fc50c244e545
|
Provenance
The following attestation bundles were made for awslabs_amazon_sns_sqs_mcp_server-1.0.1-py3-none-any.whl:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_amazon_sns_sqs_mcp_server-1.0.1-py3-none-any.whl -
Subject digest:
771d554b7e6867f79d990f7ca5ebfded96bf29569e4d89eb4d035c119be50b57 - Sigstore transparency entry: 212496089
- Sigstore integration time:
-
Permalink:
awslabs/mcp@0f8f4b6e98c70f29411c46a73d3ae16b335adc0f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0f8f4b6e98c70f29411c46a73d3ae16b335adc0f -
Trigger Event:
workflow_dispatch
-
Statement type: