Skip to main content
Glama

Strands Agent MCP

by imgaray

股线代理 MCP

用于执行 Strands 代理的模型上下文协议 (MCP) 服务器。该项目提供了一种将 Strands 代理与 Amazon Q 及其他兼容 MCP 的系统集成的简单方法。

概述

Strands Agent MCP 是 Strands 代理框架和模型上下文协议 (MCP) 之间的桥梁。它允许您:

  • 将 Strands 代理注册为 MCP 工具
  • 通过 MCP 执行 Strands 代理
  • 发现并列出可用的代理

该项目采用插件架构,可以轻松添加新代理,而无需修改核心代码。

安装

pip install strands-agent-mcp

用法

启动 MCP 服务器

strands-agent-mcp

这将在默认端口上启动 MCP 服务器。

创建代理插件

要创建新的代理插件,请创建一个以sap_mcp_plugin_开头的 Python 包(sap 代表 strands agent plugin)。您的包应该实现一个register_plugin函数,该函数用于向提供的注册表注册一个或多个代理:

from strands import Agent from strands.models import BedrockModel from strands_agent_mcp.registry import Registry def register_plugin(registry: Registry) -> None: registry.register("my-agent", Agent( model=BedrockModel(boto_session=Session(region_name="us-west-2"))) )

与 Amazon Q 一起使用

一旦 MCP 服务器运行,您就可以将代理与 Amazon Q 一起使用:

q chat --mcp-server http://localhost:8000

然后您可以在聊天中使用以下命令:

  • 列出可用的代理: strands___list_agents list_agents
  • 执行代理: strands___execute_agent execute_agent,参数为agent (代理名称)和prompt (发送给代理的提示)

建筑学

该项目由三个主要部分组成:

  1. 服务器:暴露代理执行 API 的 MCP 服务器
  2. 注册表:用于管理可用代理的简单注册表
  3. 插件:动态发现向注册表注册代理的模块

服务器自动发现所有遵循命名约定的已安装插件并注册其代理。

依赖项

  • fastmcp :用于实现 MCP 服务器
  • strands-agents :核心 Strands 代理框架
  • strands-agents-builder :用于构建 Strands 代理的工具
  • strands-agents-tools :Strands 代理的附加工具

发展

要设置开发环境:

  1. 克隆存储库
  2. 创建虚拟环境: python -m venv .venv
  3. 激活虚拟环境: source .venv/bin/activate (Linux/Mac)或.venv\Scripts\activate (Windows)
  4. 安装开发依赖项: pip install -e ".[dev]"

创建测试插件

该存储库包含一个示例插件( sap_mcp_plugin_test ),它演示了如何创建和注册一个名为“simple-agent”的简单代理:

from boto3 import Session from strands import Agent from strands.models import BedrockModel from strands_agent_mcp.registry import Registry def register_plugin(registry: Registry) -> None: registry.register("simple-agent", Agent( model=BedrockModel(boto_session=Session(region_name="us-west-2"))) )

执照

[在此处添加许可信息]

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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 兼容系统的集成。

  1. 概述
    1. 安装
      1. 用法
        1. 启动 MCP 服务器
        2. 创建代理插件
        3. 与 Amazon Q 一起使用
      2. 建筑学
        1. 依赖项
          1. 发展
            1. 创建测试插件
              1. 执照

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A 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 -
                  5
                  Python
                • Amazon Web Services
                  aws-mcp

                  A
                  security
                  F
                  license
                  A
                  quality
                  A 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 -
                  3
                  264
                  TypeScript
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol (MCP) server implementation that provides EMQX MQTT broker interaction.
                  Last updated -
                  4
                  10
                  Python
                  Apache 2.0
                  • Apple
                • -
                  security
                  -
                  license
                  -
                  quality
                  A 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

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/imgaray/strands-agents-mcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server