No description available
[20250527] 增加DeepSeek-R1支持(使用PE实现function call)
[20250516] 增加streamable http(简单token方式鉴权)
{
"mcpServers": {
"MCPServerApi": {
"url": "https://xxx.execute-api.us-east-1.amazonaws.com/Prod/mcp",
"token":"123456"
}
}
}
可以用aws lambda开发部署serverless http stream sever,参考示例:https://github.com/mikegc-aws/Lambda-MCP-Server
[20250507] 新增Nova Premier和Nova Sonic 语音Agent模式,见第6节介绍
⚠️ 如果在ec2部署,需要使用HTTPS方式部署,如果在本地则沿用之前的部署方式.
[20250419] Keep Server Session 功能,可以在服务器端保存session所有历史消息,包括(Tool use历史)
Keep Session on Server开关控制,点击Clear Conversion时,会向服务端发起v1/remove/history请求清空服务器session消息。POST v1/remove/history请求[20250418] 新增中国区硅基流动deepseek v3,Qwen3模型支持,新增sse server支持
uv sync更新依赖环境Demo Vides

ChatBot 是大模型时代最常见的应用形态,但受限于大模型无法获取及时信息、无法操作外部系统等,使得 ChatBot 应用场景相对有限。后来随着 Function Calling/Tool Use 功能推出,大模型能够跟外部系统交互,但弊端在于大模型业务逻辑和 Tool 开发都是紧密耦合的,无法发挥出 Tool 端规模化的效率。Anthropic 2024 年 11 月底推出 MCP 打破了这一局面,引入整个社区的力量在 Tool 端规模化发力,目前已经有开源社区、各路厂商等开发了丰富的 MCP server,使得 Tool 端蓬勃发展。终端用户即插即用就可将其集成到自己的 ChatBot 中,极大延展了 ChatBot UI 的能力,有种 ChatBot 一统各种系统 UI 的趋势。
MCP 如何工作

基于AWS的MCP企业架构设计思路

本项目提供基于 Bedrock 中Nova,Claude等大模型的 ChatBot 交互服务,同时引入 MCP,极大增强并延伸 ChatBot 形态产品的应用场景,可支持本地文件系统、数据库、开发工具、互联网检索等无缝接入。如果说包含大模型的 ChatBot 相当于大脑的话,那引入 MCP 后就相当于装上了胳膊腿,真正让大模型动起来、跟各种现存系统和数据联通。
本Demo方案架构

Deepwiki
https://deepwiki.com/aws-samples/demo_mcp_on_amazon_bedrock/1.1-system-architecture
核心组件

技术架构
工作流程

该项目目前仍在不断探索完善,MCP 正在整个社区蓬勃发展,欢迎大家一起关注!
目前主流 MCP Server 基于 NodeJS 或者 Python 开发实现并运行于用户 PC 上,因此用户 PC 需要安装这些依赖。
NodeJS 下载安装,本项目已对 v22.12.0 版本充分测试。
有些 MCP Server 基于 Python 开发,因此用户必须安装 Python。此外本项目代码也基于 Python 开发,需要安装环境和依赖。
首先,安装 Python 包管理工具 uv,具体可参考 uv 官方指南,本项目已对 v0.5.11 版本充分测试。
下载克隆该项目后,进入项目目录创建 Python 虚拟环境并安装依赖:
sudo apt update
sudo apt-get install clang
sudo apt-get install portaudio19-dev
uv sync
如果是mac环境:
brew install portaudio
uv sync
此时项目目录的 .venv 中就创建好了虚拟环境,激活
source .venv/bin/activate
aws dynamodb create-table \
--table-name mcp_user_config_table \
--attribute-definitions AttributeName=userId,AttributeType=S \
--key-schema AttributeName=userId,KeyType=HASH \
--billing-mode PAY_PER_REQUEST
Tips: 如何需要配置多个账号ak/sk, 使用轮询机制,可以在conf/目录下增加一个
credential.csv, 列名分别为ak,sk, 填入多个ak/sk即可,例如: ak,sk
ak1,sk1
ak2,sk2
运行以下命令创建.env 文件, 请修改AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION等信息之后再运行
cat << EOF > .env
AWS_ACCESS_KEY_ID=(可选,如果有credential.csv则不需要)
AWS_SECRET_ACCESS_KEY=(可选)<your-secret-key>
AWS_REGION=<your-region>
LOG_DIR=./logs
CHATBOT_SERVICE_PORT=8502
MCP_SERVICE_HOST=127.0.0.1
MCP_SERVICE_PORT=7002
API_KEY=123456
MAX_TURNS=200
INACTIVE_TIME=60
#如果不使用dynamodb,则删除下面一行
ddb_table=mcp_user_config_table
USE_HTTPS=0
EOF
备注:该项目用到 AWS Bedrock Nova/Claude 系列模型,因此需要注册并获取以上服务访问密钥。
Tips: 中国区需要提前获取硅基流动API Key
运行以下命令创建.env 文件, 注意:请修改COMPATIBLE_API_KEY,COMPATIBLE_API_BASE等信息之后再运行
cat << EOF > .env
COMPATIBLE_API_KEY=<硅基流动的apikey>
COMPATIBLE_API_BASE=https://api.siliconflow.cn
LOG_DIR=./logs
CHATBOT_SERVICE_PORT=8502
MCP_SERVICE_HOST=127.0.0.1
MCP_SERVICE_PORT=7002
API_KEY=123456
MAX_TURNS=200
INACTIVE_TIME=10
#不使用bedrock flag
use_bedrock=0
#如果不使用dynamodb,则删除下面一行
ddb_table=mcp_user_config_table
USE_HTTPS=0
EOF
默认配置支持DeepSeek-V3,Qwen3等模型, 如果需要支持其他模型(必须是支持tool use的模型),请自行修改conf/config.json配置加入模型,例如:
{
"model_id": "Qwen/Qwen3-235B-A22B",
"model_name": "Qwen3-235B-A22B"
},
{
"model_id": "Qwen/Qwen3-30B-A3B",
"model_name": "Qwen3-30B-A3B"
},
{
"model_id": "Pro/deepseek-ai/DeepSeek-V3",
"model_name": "DeepSeek-V3-Pro"
},
{
"model_id": "deepseek-ai/DeepSeek-V3",
"model_name": "DeepSeek-V3-free"
}
参考 HTTPS_SETUP
接口服务可以对外提供给独立API,接入其他chat客户端, 实现服务端MCP能力和客户端的解耦
可以通过http://{ip}:7002/docs#/查看接口文档.

编辑配置文件 conf/config.json,该文件预设了要启动哪些 MCP server,可以编辑来添加或者修改 MCP server 参数。
每个 MCP server 的参数规范,可参考如下示例:
"db_sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "./tmp/test.db"],
"env": {},
"description": "DB Sqlite CRUD - MCP Server",
"status": 1
}
bash start_all.sh
bash stop_all.sh
logs/start_mcp.log 确认无报错,然后可运行测试脚本检查 Chat 接口:# 脚本使用 Bedrock 的 Amazon Nova-lite 模型,也可更换其它
# 默认使用123456作为API key, 请根据实际设置更改
curl http://127.0.0.1:7002/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 123456" \
-H "X-User-ID: user123" \
-d '{
"model": "us.amazon.nova-pro-v1:0",
"mcp_server_ids":["local_fs"],
"stream":true,
"keep_session":false,
"messages": [
{
"role": "user",
"content": "list files in current dir"
}
]
}'

待启动后,可查看日志 logs/start_chatbot.log 确认无报错,然后浏览器打开服务地址,即可体验 MCP 增强后的 Bedrock 大模型 ChatBot 能力。
由于已内置了文件系统操作、SQLite 数据库等 MCP Server,可以尝试连续提问以下问题进行体验:
show all of tables in the db
how many rows in that table
show all of rows in that table
save those rows record into a file, filename is rows.txt
list all of files in the allowed directory
read the content of rows.txt file
当前可以通过两种方式来添加 MCP Server:
conf/config.json,每次重新启动 Chat 接口服务就会加载配置好的 MCP Server{
"mcpServers": {
"exa": {
"command": "npx",
"args": ["-y","exa-mcp-server"],
"env": {
"EXA_API_KEY": "your-api-key-here"
}
}
}
}
此时在已有 MCP Server 列表中就可以看到新添加项,勾选即可启动该 MCP Server。
use headless is true to initialize the browser
注意 第一次运行时,需要在服务安装对应的依赖包 sudo apt-get install libgbm1{ "mcpServers":
{ "mcp-browser":
{ "command": "uvx",
"args": ["mcp-browser-use"],
"env": {},
"description": "mcp-browser"
}
}
}
npx playwright install chrome{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
"--headless"
]
}
}
}
test 1, 在chatbot界面中,勾选mcp-browser和local file system 2个server
输入任务:帮我整理一份关于小米SU7 ultra的介绍,包括性能,价格,特色功能,图文并茂,并制作成精美的HTML保存到本地目录中.如果引用了其他网站的图片,确保图片真实存在,并且可以访问。
视频demo
最终输出文件示例
test 2, 在chatbot界面中,勾选exa,mcp-browser和local file system 3个server, 会结合搜索引擎,浏览器共同获取信息和图片,形成更丰富的报告
输入任务:我想要一份特斯拉股票的全面分析,包括:概述:公司概况、关键指标、业绩数据和投资建议财务数据:收入趋势、利润率、资产负债表和现金流分析市场情绪:分析师评级、情绪指标和新闻影响技术分析:价格趋势、技术指标和支撑/阻力水平资产比较:市场份额和与主要竞争对手的财务指标对比价值投资者:内在价值、增长潜力和风险因素投资论点:SWOT 分析和针对不同类型投资者的建议。 并制作成精美的HTML保存到本地目录中。如果引用了其他网站的图片,确保图片真实存在,并且可以访问。 你可以使用mcp-browser和exa search去获取尽可能丰富的实时数据和图片。
最终输出文件示例
时序图1:使用Headless Browser 的 MCP Server

git clone https://github.com/aws-samples/aws-mcp-servers-samples.git
{
"mcpServers": {
"computer_use": {
"command": "uv",
"env": {
"VNC_HOST":"",
"VNC_PORT":"5901",
"VNC_USERNAME":"ubuntu",
"VNC_PASSWORD":"",
"PEM_FILE":"",
"SSH_PORT":"22",
"DISPLAY_NUM":"1"
},
"args": [
"--directory",
"/absolute_path_to/remote_computer_use",
"run",
"server_claude.py"
]
}
}
}
You are an expert research assistant with deep analytical skills.
you have capability:
<SYSTEM_CAPABILITY>
* You are utilising an Ubuntu virtual machine using Linux architecture with internet access.
* You can feel free to install Ubuntu applications with your bash tool. Use curl instead of wget.
* When viewing a page it can be helpful to zoom out so that you can see everything on the page. Either that, or make sure you scroll down to see everything before deciding something isn't available.
* When using your computer function calls, they take a while to run and send back to you. Where possible/feasible, try to chain multiple of these calls all into one function calls request.
* You can double click to open firefox
</SYSTEM_CAPABILITY>
<IMPORTANT>
* Don't assume an application's coordinates are on the screen unless you saw the screenshot. To open an application, please take screenshot first and then find out the coordinates of the application icon.
* When using Firefox, if a startup wizard or Firefox Privacy Notice appears, IGNORE IT. Do not even click "skip this step". Instead, click on the address bar where it says "Search or enter address", and enter the appropriate search term or URL there. Maximize the Firefox browser window to get wider vision.
* If the item you are looking at is a pdf, if after taking a single screenshot of the pdf it seems that you want to read the entire document instead of trying to continue to read the pdf from your screenshots + navigation, determine the URL, use curl to download the pdf, install and use pdftotext to convert it to a text file, and then read that text file directly with your StrReplaceEditTool.
* After each step, take a screenshot and carefully evaluate if you have achieved the right outcome. Explicitly show your thinking: "I have evaluated step X..." If not correct, try again. Only when you confirm a step was executed correctly should you move on to the next one.
</IMPORTANT>


1. use search tool and sequential thinking to make comparison report between different agents frameworks such as autogen, langgraph, aws multi agents orchestrator
2. use sequential thinking and search tool to make me a travel plan to visit shanghai between 3/1/2025 to 3/5/2025. I will departure from Beijing
3. use sequential thinking to research what the key breakthroughs and future impact of deepseek r1
4. 搜索对比火山引擎,阿里百炼,硅基流动上的对外提供的deepseek r1 满血版的API 性能对比, 包括推理速度,TTFT, 最大context长度等。使用sequential thinking 工具
效果一览

时序图:使用Search API 的 MCP Server

先在Bedrock console中创建或者使用已有的Bedrock,记下Knowledge Base Id
Clone AWS Knowledge Base Retrieval MCP Server到本地,并用assets/aws-kb-retrieval-server/index.ts)下的文件替换 src/aws-kb-retrieval-server/index.ts里的文件。
新文件把knowledgeBaseId通过环境变量指定,无须再通过对话传入。
在新clone的servers目录下用如下命令打包
docker build -t mcp/aws-kb-retrieval:latest -f src/aws-kb-retrieval-server/Dockerfile .
然后在chatbot界面上添加这个json文件,注意env中的字段需要替换成自己的账号信息,以及Knowledge Base Id
{
"mcpServers": {
"aws-kb-retrieval": {
"command": "docker",
"args": [ "run", "-i", "--rm", "-e", "AWS_ACCESS_KEY_ID", "-e", "AWS_SECRET_ACCESS_KEY", "-e", "AWS_REGION", "-e", "knowledgeBaseId", "mcp/aws-kb-retrieval:latest" ],
"env": {
"AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE",
"AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE",
"AWS_REGION": "YOUR_AWS_REGION_HERE",
"knowledgeBaseId":"The knowledage base id"
}
}
}
}


{
"mcpServers": {
"demomcponamazonbedrock": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"AWS_ACCESS_KEY_ID",
"-e",
"AWS_SECRET_ACCESS_KEY",
"-e",
"AWS_REGION",
"-e",
"knowledgeBaseId",
"mcp/aws-kb-retrieval:latest"
]
}
}
}Related projects feature coming soon
Will recommend related projects based on sub-categories