Token导航 LogoToken导航TokenDH.com
Strands MCP Server logo
AI代理stdio官方级别未说明来源级核验

Strands MCP Server

MCP Server

为Strands Agents提供双向MCP协议集成服务,支持服务器模式和客户端模式,适用于多代理协作场景。

工具数

0

提示词数

0

GitHub Stars

7

资源数

0
PythonClaude工具集成Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

cagataycali

提供方

cagataycali

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install strands-mcp-server

详细介绍

strands mcp服务器

![PyPI](https://pypi.org/project/strands-mcp-server/)

Strands Agent的双向MCP集成。

pip install strands-mcp-server

______________________________________________________________________

概述

  • mcp服务器 -将代理暴露为MCP服务器
  • mcp客户端 -连接到MCP服务器
  • 命令行界面 -克劳德桌面版stdio
graph LR
    subgraph "Your Strands Agent"
        A[Tools: calculator, shell, etc.]
        B[mcp_server tool]
        C[mcp_client tool]
        A --> B
        C --> A
    end
    
    subgraph "Server Mode"
        B -->|HTTP/stdio| D[MCP Protocol]
        D --> E[Claude Desktop]
        D --> F[Other Agents]
        D --> G[Custom Clients]
    end
    
    subgraph "Client Mode"
        H[Remote MCP Servers] -->|HTTP/stdio/SSE| I[MCP Protocol]
        I --> C
    end
    
    subgraph "CLI"
        J[uvx strands-mcp-server] -->|Local Mode| D
        J -->|Proxy Mode| I
    end
    
    style A fill:#2d3748,stroke:#4a5568,color:#fff
    style B fill:#2b6cb0,stroke:#2c5282,color:#fff
    style C fill:#38a169,stroke:#2f855a,color:#fff
    style D fill:#805ad5,stroke:#6b46c1,color:#fff
    style I fill:#805ad5,stroke:#6b46c1,color:#fff
    style E fill:#d69e2e,stroke:#b7791f,color:#fff
    style F fill:#d69e2e,stroke:#b7791f,color:#fff
    style G fill:#d69e2e,stroke:#b7791f,color:#fff
    style H fill:#e53e3e,stroke:#c53030,color:#fff
    style J fill:#48bb78,stroke:#38a169,color:#fff

______________________________________________________________________

快速开始

服务器:

from strands import Agent
from strands_mcp_server import mcp_server

agent = Agent(tools=[..., mcp_server])
agent("start mcp server on port 8000")

客户:

from strands import Agent
from strands_mcp_server import mcp_client

agent = Agent(tools=[mcp_client])
agent.tool.mcp_client(
    action="connect",
    connection_id="remote",
    transport="http",
    server_url="http://localhost:8000/mcp"
)
agent.tool.mcp_client(
    action="call_tool",
    connection_id="remote",
    tool_name="calculator",
    tool_args={"expression": "42 * 89"}
)

适用于Claude Desktop/Kiro/等代理。..:

{
  "mcpServers": {
    "my-agent": {
      "command": "uvx",
      "args": ["strands-mcp-server", "--cwd", "/path/to/project"]
    }
  }
}

______________________________________________________________________

API

mcp服务器

参数默认值说明
action必填项start, stop, status, list
transporthttphttpstdio
port8000港口
tools要公开的工具(无=全部)
expose_agentTrue包括 invoke_agent
statelessFalse多节点就绪

mcp客户端

参数说明
actionconnect, disconnect, list_tools, call_tool
connection_id连接ID
transporthttp, stdio, sse
server_url服务器URL
tool_name调用工具
tool_args工具参数

发票代理

完全代理访问权限 expose_agent=True:

agent.tool.mcp_client(
    action="call_tool",
    connection_id="remote",
    tool_name="invoke_agent",
    tool_args={"prompt": "Calculate 2 + 2"}
)

______________________________________________________________________

命令行界面

uvx strands-mcp-server [OPTIONS]
选项描述
--cwd PATH工作目录
--upstream-url URL上游服务器(代理)
--system-prompt TEXT系统提示
--no-agent-invocation禁用invoke_agent
--debug调试模式

示例:

# Local
uvx strands-mcp-server --cwd /path/to/project

# Proxy
uvx strands-mcp-server --upstream-url http://localhost:8000/mcp

______________________________________________________________________

故障排除

# Debug
uvx strands-mcp-server --cwd /path --debug

# Check connection
curl http://localhost:8000/mcp

# Port in use
lsof -i :8000 && kill -9 

# Claude logs
tail -f ~/Library/Logs/Claude/mcp*.log

______________________________________________________________________

链接

______________________________________________________________________

许可证: Apache 2.0

目录标签

目录标签

PythonClaude工具集成代理协作本地部署MCP协议双向通信

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP