
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
!https://img.shields.io/github/stars/buryhuang/mcp-server-aws-resources-python?style=social !https://img.shields.io/github/forks/buryhuang/mcp-server-aws-resources-python?style=social !https://img.shields.io/github/watchers/buryhuang/mcp-server-aws-resources-python?style=social
Opensourced under MIT: https://github.com/baryhuang/mcp-server-aws-resources-python
A Model Context Protocol (MCP) server implementation that provides integration with AWS resources through boto3. This server enables AI models to execute AWS queries through a standardized interface.
I tried using https://github.com/RafalWilinski/aws-mcp but ran into a few issues:
So I created this new approach that:
For more information about the Model Context Protocol and how it works, see https://www.***.com/news/model-context-protocol.
The server exposes the following resource:
aws://query_resources: A dynamic resource that provides access to AWS resources through boto3 queriesHere are some example queries you can execute:
pythons3 = session.client('s3') result = s3.list_buckets()
pythondef get_latest_deployment(pipeline_name): codepipeline = session.client('codepipeline') result = codepipeline.list_pipeline_executions( pipelineName=pipeline_name, maxResults=5 ) if result['pipelineExecutionSummaries']: latest_execution = max( [e for e in result['pipelineExecutionSummaries'] if e['status'] == 'Succeeded'], key=itemgetter('startTime'), default=None ) if latest_execution: result = codepipeline.get_pipeline_execution( pipelineName=pipeline_name, pipelineExecutionId=latest_execution['pipelineExecutionId'] ) else: result = None else: result = None return result result = get_latest_deployment("your-pipeline-name")
The server offers a tool for executing AWS queries:
query_aws_resources
code_snippet (string): Python code using boto3 to query AWS resourcesresult variable with the query outputYou'll need AWS credentials with appropriate permissions to query AWS resources. You can obtain these by:
The following environment variables are required:
AWS_ACCESS_KEY_ID: Your AWS access keyAWS_SECRET_ACCESS_KEY: Your AWS secret keyAWS_SESSION_TOKEN: (Optional) AWS session token if using temporary credentialsAWS_DEFAULT_REGION: AWS region (defaults to 'us-east-1' if not set)Note: Keep your AWS credentials secure and never commit them to version control.
You can either build the image locally or pull it from Docker Hub. The image is built for the Linux platform.
Supported Platforms
Option 1: Pull from Docker Hub
bashdocker pull buryhuang/mcp-server-aws-resources:latest
Option 2: Build Locally
bashdocker build -t mcp-server-aws-resources .
Run the container:
bashdocker run \ -e AWS_ACCESS_KEY_ID=your_access_key_id_here \ -e AWS_SECRET_ACCESS_KEY=your_secret_access_key_here \ -e AWS_DEFAULT_REGION=your_AWS_DEFAULT_REGION \ buryhuang/mcp-server-aws-resources:latest
To publish the Docker image for multiple platforms, you can use the docker buildx command. Follow these steps:
Create a new builder instance (if you haven't already):
bashdocker buildx create --use
Build and push the image for multiple platforms:
bashdocker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t buryhuang/mcp-server-aws-resources:latest --push .
Verify the image is available for the specified platforms:
bashdocker buildx imagetools inspect buryhuang/mcp-server-aws-resources:latest
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务