当前位置: 首页 > news >正文

使用cline集成aws的mcp服务和搜索功能

参考资料

  • https://aws.amazon.com/cn/blogs/containers/accelerating-application-development-with-the-amazon-eks-model-context-protocol-server/

在vscode中安装cline后,为了避免高额模型费用和兼容性问题,通过litellm封装了自部署模型,并配置在cline中

http://litellm.example.com:4000

TLDR

日常万能配置如下

{"mcpServers": {"awslabs.aws-api-mcp-server": {"disabled": true,"timeout": 60,"type": "stdio","command": "docker","args": ["run","--rm","--interactive","--env","AWS_REGION=cn-north-1","--volume","/home/ec2-user/.aws:/app/.aws","public.ecr.aws/awslabs-mcp/awslabs/aws-api-mcp-server:latest"],"env": {}},"awslabs.aws-documentation-mcp-server": {"autoApprove": ["read_documentation","search_documentation","recommend","get_available_services"],"disabled": true,"timeout": 60,"type": "stdio","command": "docker","args": ["run","--rm","--interactive","--env","FASTMCP_LOG_LEVEL=ERROR","--env","AWS_DOCUMENTATION_PARTITION=aws-cn","mcp/aws-documentation:latest"],"env": {}},"aws-knowledge-mcp-server": {"autoApprove": ["aws___search_documentation","aws___read_documentation","aws___recommend"],"disabled": true,"timeout": 60,"type": "stdio","command": "uvx","args": ["fastmcp","run","https://knowledge-mcp.global.api.aws"]},"github.com/tavily-ai/tavily-mcp": {"autoApprove": [],"disabled": true,"timeout": 60,"type": "stdio","command": "npx","args": ["-y","tavily-mcp@latest"],"env": {"TAVILY_API_KEY": "tvly-dev-ecexxxxxxxxxxK"}},"web-search": {"timeout": 60,"type": "streamableHttp","url": "http://localhost:3000/mcp","autoApprove": ["search"]},"web-search-sse": {"timeout": 60,"type": "sse","url": "http://localhost:3000/sse","autoApprove": ["search"]}}
}

在线文档助手

使用如下mcp server配置,kb文档查询,document文档查询的功能,可以满足服务特性的答疑和总结功能。

{"mcpServers": {"awslabs.aws-documentation-mcp-server": {"autoApprove": ["read_documentation","search_documentation","recommend","get_available_services"],"disabled": false,"timeout": 60,"type": "stdio","command": "docker","args": ["run","--rm","--interactive","--env","FASTMCP_LOG_LEVEL=ERROR","--env","AWS_DOCUMENTATION_PARTITION=aws-cn","mcp/aws-documentation:latest"],"env": {}},"aws-knowledge-mcp-server": {"autoApprove": ["aws___search_documentation","aws___read_documentation","aws___recommend"],"disabled": false,"timeout": 60,"type": "stdio","command": "uvx","args": ["fastmcp","run","https://knowledge-mcp.global.api.aws"]}}
}

资源检索工具

如果需要查询账户资源,可以集成api mcp,cline会使用awscli工具查询具体的资源

{"mcpServers": {"awslabs.aws-api-mcp-server": {"timeout": 60,"type": "stdio","command": "docker","args": ["run","--rm","--interactive","--env","AWS_REGION=cn-north-1","--volume","/home/ec2-user/.aws:/app/.aws","public.ecr.aws/awslabs-mcp/awslabs/aws-api-mcp-server:latest"],"env": {},"disabled": true}
}

成本和定价助手

  • https://awslabs.github.io/mcp/servers/aws-pricing-mcp-server
  • https://awslabs.github.io/mcp/servers/billing-cost-management-mcp-server
  • https://awslabs.github.io/mcp/servers/cost-explorer-mcp-server

比较常用的是查看账户中钱花在哪了

{"mcpServers": {"awslabs.billing-cost-management-mcp-server": {"command": "docker","args": ["run","--rm","--interactive","--env","FASTMCP_LOG_LEVEL=ERROR","awslabs/billing-cost-management-mcp-server:latest"],"env": {},"disabled": false,"autoApprove": []}}
}

特定领域工具

个人习惯还是倾向于手动维护资源,类似cdk等mcp操作过于繁琐不容易理解具体的内容,后续的trouble shooting反而费事。

对于一些重复性的但是比较简单的服务,可以考虑类似如下的iam-mcp-server,用来分析现有用户策略,进行安全性测试很方便

{"mcpServers": {"awslabs.iam-mcp-server": {"command": "uvx","args": ["awslabs.iam-mcp-server@latest","--readonly"],"env": {"AWS_PROFILE": "default","AWS_REGION": "cn-north-1","FASTMCP_LOG_LEVEL": "ERROR"}}}
}

使用support_mcp_server来更方便获取支持

{"mcpServers": {"awslabs_support_mcp_server": {"command": "uvx","args": ["-m", "awslabs.aws-support-mcp-server@latest","--debug","--log-file","./logs/mcp_support_server.log"],"env": {"AWS_PROFILE": "default"}}}
}

搜索功能

tavily需要申请apikey,一个月1000次免费额度

"github.com/tavily-ai/tavily-mcp": {"command": "npx","args": ["-y","tavily-mcp@latest"],"env": {"TAVILY_API_KEY": "tvly-xxxxxxxxxxx"},"disabled": false,"autoApprove": []}

自行部署open-web-search

docker run -d --name web-search -p 3000:3000 \-e ENABLE_CORS=true \-e CORS_ORIGIN=* \ghcr.io/aas-ee/open-web-search:latest

mcp配置如下

"web-search": {"timeout": 60,"type": "streamableHttp","url": "http://localhost:3000/mcp","autoApprove": ["search"]
},
"web-search-sse": {"timeout": 60,"type": "sse","url": "http://localhost:3000/sse","autoApprove": ["search"]
}
http://www.jsqmd.com/news/38894/

相关文章:

  • Emacs中文等宽字体设置(要用英文名称,系统中的名称)
  • Python 字符串形式与嵌套规则:从 C 语言注释谜题到 Python 引号逻辑
  • Python 字符串格式化全解析:%、format() 与 f-string 的前世今生
  • 20251112 之所思 - 人生如梦
  • Pandas - How to know which columns of a dataframe has null value?
  • 2025年11月13日
  • 三分法
  • vue-element el-select 赋值选择项后选择事件不生效
  • Python正则表达式操作速查表(全面版v1.0 - 2025年11月12日修订)
  • 11月12日日记
  • 微信小程序支付遇到问题:PKIX path building failed: unable to find valid certification path to requested target
  • 11-12午夜盘思
  • Day19综合案例二
  • 命题逻辑连接词 ↔ C++ 逻辑/位运算 对照表(完整版)
  • 昆仑通态触摸屏物联网远程运维McgsIot
  • 简单二分
  • 微软MS17-012安全更新详解:六大Windows漏洞修复指南
  • 2025.11.12总结
  • 以太坊的测试网络 - all-in
  • Scala基础学习day01
  • 洛谷 P11965:[GESP202503 七级] 等价消除 ← 位运算(异或) + STL map
  • C 指针数组函数之间的关联
  • 2025.11.12 测试
  • 13. 罗马数字转化为字符串
  • 这封邮件写得真好,是你自己写的吗? 不,是AI写的
  • FFmpeg 官方汇编课程:写出快 5 倍的视频处理代码
  • 四、中断(基于北京迅为电子)
  • List执行Dispose时可释放子元素逻辑占用的List写法
  • Sora 后思考:从 AI 工具到 AI 平台,产业 AGI 又近了一步 - 指南
  • Scapy构建telnet包