股线代理 MCP
用于执行 Strands 代理的模型上下文协议 (MCP) 服务器。该项目提供了一种将 Strands 代理与 Amazon Q 及其他兼容 MCP 的系统集成的简单方法。
概述
Strands Agent MCP 是 Strands 代理框架和模型上下文协议 (MCP) 之间的桥梁。它允许您:
- 将 Strands 代理注册为 MCP 工具
- 通过 MCP 执行 Strands 代理
- 发现并列出可用的代理
该项目采用插件架构,可以轻松添加新代理,而无需修改核心代码。
安装
用法
启动 MCP 服务器
这将在默认端口上启动 MCP 服务器。
创建代理插件
要创建新的代理插件,请创建一个以sap_mcp_plugin_
开头的 Python 包(sap 代表 strands agent plugin)。您的包应该实现一个register_plugin
函数,该函数用于向提供的注册表注册一个或多个代理:
与 Amazon Q 一起使用
一旦 MCP 服务器运行,您就可以将代理与 Amazon Q 一起使用:
然后您可以在聊天中使用以下命令:
- 列出可用的代理:
strands___list_agents
list_agents - 执行代理:
strands___execute_agent
execute_agent,参数为agent
(代理名称)和prompt
(发送给代理的提示)
建筑学
该项目由三个主要部分组成:
- 服务器:暴露代理执行 API 的 MCP 服务器
- 注册表:用于管理可用代理的简单注册表
- 插件:动态发现向注册表注册代理的模块
服务器自动发现所有遵循命名约定的已安装插件并注册其代理。
依赖项
fastmcp
:用于实现 MCP 服务器strands-agents
:核心 Strands 代理框架strands-agents-builder
:用于构建 Strands 代理的工具strands-agents-tools
:Strands 代理的附加工具
发展
要设置开发环境:
- 克隆存储库
- 创建虚拟环境:
python -m venv .venv
- 激活虚拟环境:
source .venv/bin/activate
(Linux/Mac)或.venv\Scripts\activate
(Windows) - 安装开发依赖项:
pip install -e ".[dev]"
创建测试插件
该存储库包含一个示例插件( sap_mcp_plugin_test
),它演示了如何创建和注册一个名为“simple-agent”的简单代理:
执照
[在此处添加许可信息]
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议 (MCP) 服务器,通过插件架构实现 Strands 代理与 Amazon Q 和其他 MCP 兼容系统的集成。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol (MCP) server implementation for interacting with Phabricator API. This server allows LLMs to interact with Phabricator through a standardized interface.Last updated -5Python
- AsecurityFlicenseAqualityA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your AWS environment. This allows for natural language querying and management of your AWS resources during conversations. Think of better Amazon Q alternative.Last updated -3264TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server implementation that provides EMQX MQTT broker interaction.Last updated -410PythonApache 2.0
- -security-license-qualityA Model Context Protocol (MCP) server that interacts with system APIs, allowing users to check connections, search employees, register breakfast, and update chemical information by shifts.Last updated -2