Skip to main content
Glama

strands-mcp-server

PyPI

Awesome Strands Agents

Bidirectional MCP integration for Strands Agents.

pip install strands-mcp-server

Overview

  • mcp_server - Expose agent as MCP server

  • mcp_client - Connect to MCP servers

  • CLI - stdio for Claude Desktop

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

Related MCP server: Agent Hub MCP

Quick Start

Server:

from strands import Agent
from strands_mcp_server import mcp_server

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

Client:

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"}
)

For Agents like Claude Desktop/Kiro/...:

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

API

mcp_server

Parameter

Default

Description

action

required

start, stop, status, list

transport

http

http or stdio

port

8000

Port

tools

None

Tools to expose (None = all)

expose_agent

True

Include invoke_agent

stateless

False

Multi-node ready

mcp_client

Parameter

Description

action

connect, disconnect, list_tools, call_tool

connection_id

Connection ID

transport

http, stdio, sse

server_url

Server URL

tool_name

Tool to call

tool_args

Tool arguments

invoke_agent

Full agent access when expose_agent=True:

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

CLI

uvx strands-mcp-server [OPTIONS]

Option

Description

--cwd PATH

Working directory

--upstream-url URL

Upstream server (proxy)

--system-prompt TEXT

System prompt

--no-agent-invocation

Disable invoke_agent

--debug

Debug mode

Examples:

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

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

Troubleshooting

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

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

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

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


License: Apache 2.0

Available Tools

3 tools
greetC

Greet someone with different styles.

Returns: str: A greeting message

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the person to greet
styleNoGreeting style - "friendly", "formal", or "enthusiastic"friendly

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a greeting message but doesn't cover aspects like side effects, error handling, or performance. For a tool with no annotations, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the core purpose. The second sentence about return values is somewhat redundant since no output schema exists, but it doesn't waste space. Overall, it's efficient with minimal fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (simple greeting function), 100% schema coverage, and no output schema, the description is adequate but incomplete. It covers the basic purpose and return type but lacks behavioral context and usage guidelines, which are needed for full understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters ('name' and 'style' with default and enum-like values). The description adds no additional parameter semantics beyond what the schema provides, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Greet someone with different styles.' It specifies the verb ('greet') and resource ('someone'), though it doesn't explicitly distinguish from sibling tools like 'invoke_agent' or 'mcp_client'. The purpose is clear but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description mentions 'different styles' but doesn't specify contexts, prerequisites, or exclusions. Without usage guidelines, the agent must infer appropriate scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

invoke_agentA

Invoke the full strands-mcp-cli agent with a natural language prompt. Use this for complex queries that require reasoning across multiple tools or when you need a conversational response from the agent.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesThe prompt or query to send to the agent

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the tool invokes an agent for complex reasoning and conversational responses, but lacks details on behavioral traits such as execution time, error handling, authentication needs, or rate limits. This is a significant gap for a tool that likely involves significant processing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with two clear sentences that efficiently convey purpose and usage without any wasted words. Every sentence earns its place by providing essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (invoking an agent for reasoning) and lack of annotations or output schema, the description is moderately complete. It covers the high-level purpose and usage but lacks details on behavior, response format, or error conditions, leaving gaps for an agent to understand full implications.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'prompt' parameter well-documented. The description adds minimal value beyond the schema, only implying that the prompt should be 'natural language' for complex queries, which is somewhat redundant. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Invoke the full strands-mcp-cli agent with a natural language prompt.' It specifies the action (invoke) and resource (agent), though it doesn't explicitly distinguish it from sibling tools like 'greet' or 'mcp_client' beyond mentioning 'complex queries' and 'conversational response.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: 'for complex queries that require reasoning across multiple tools or when you need a conversational response from the agent.' It gives specific scenarios but does not explicitly state when not to use it or name alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mcp_clientA

Test and interact with MCP servers.

This tool provides a complete MCP client implementation for testing and using MCP servers from within a Strands Agent.

Returns: Result dictionary with status and content

Examples: # Connect to HTTP server mcp_client( action="connect", connection_id="my-server", transport="http", server_url="http://localhost:8000/mcp" )

# Connect to stdio server
mcp_client(
    action="connect",
    connection_id="stdio-server",
    transport="stdio",
    command="python",
    args=["mcp_server_stdio.py"]
)

# List tools from connection
mcp_client(action="list_tools", connection_id="my-server")

# Call a tool
mcp_client(
    action="call_tool",
    connection_id="my-server",
    tool_name="calculator",
    tool_args={"expression": "2 + 2"}
)

# List all connections
mcp_client(action="list_connections")

# Disconnect
mcp_client(action="disconnect", connection_id="my-server")

Notes: - stdio transport: Server must be launchable as subprocess - HTTP transport: Server must be already running - Connections are maintained in global state for reuse

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform - "connect", "disconnect", "list_tools", "call_tool", "list_connections"
connection_idNoUnique identifier for this connection
transportNoTransport type - "http", "stdio", or "sse"
server_urlNoURL for HTTP/SSE transport (e.g., "http://localhost:8000/mcp")
commandNoCommand for stdio transport (e.g., "python")
argsNoArguments for stdio command (e.g., ["mcp_server_stdio.py"])
tool_nameNoName of tool to call (for call_tool action)
tool_argsNoArguments to pass to tool (for call_tool action)

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses important behavioral traits: the tool maintains connections in global state for reuse, returns a result dictionary with status and content, and specifies requirements for different transport types (stdio servers must be launchable as subprocess, HTTP servers must be already running). This covers key operational aspects beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and well-structured with clear sections (purpose, returns, examples, notes). Every sentence adds value, though the extensive examples section makes it longer than minimal. The information is front-loaded with the core purpose stated first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (8 parameters, multiple actions, no output schema), the description provides substantial context: purpose, return format, comprehensive examples, and operational notes. It covers most aspects needed to use the tool effectively, though additional details about error handling or the exact structure of the result dictionary would further enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description doesn't add significant meaning beyond what's in the schema descriptions, though the examples help illustrate parameter usage patterns. This meets the baseline expectation when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Test and interact with MCP servers' and 'provides a complete MCP client implementation for testing and using MCP servers from within a Strands Agent.' This is specific (verb+resource) and distinguishes it from sibling tools like 'greet' and 'invoke_agent' which don't involve MCP server interaction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool (testing and interacting with MCP servers) and includes notes about transport-specific requirements (stdio vs. HTTP). However, it doesn't explicitly state when NOT to use it or mention alternatives to the tool itself, though the examples implicitly guide usage based on action types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.1/5.0
Disambiguation3/5

The three tools have distinct primary purposes—greeting, invoking an agent, and interacting with MCP servers—but there is some functional overlap between 'invoke_agent' and 'mcp_client', as both can handle MCP-related tasks. The descriptions clarify their roles, but an agent might be uncertain when to use one over the other for complex MCP operations.

Naming Consistency3/5

The naming is mixed: 'greet' uses a simple verb, 'invoke_agent' follows a verb_noun pattern, and 'mcp_client' uses a noun-based name. While readable, there is no consistent convention across all tools, leading to a lack of predictability in the naming scheme.

Tool Count2/5

With only three tools, the server feels under-scoped for its apparent purpose of MCP interaction and agent invocation. The 'mcp_client' tool is comprehensive, but the limited set may force agents to rely heavily on it for varied tasks, suggesting a mismatch between the tool count and the server's broad functionality.

Completeness2/5

The server lacks clear coverage for common MCP workflows. While 'mcp_client' provides a generic interface, there are no dedicated tools for specific actions like listing servers, managing connections, or handling errors. This forces agents to use a single, multi-purpose tool, which can lead to inefficiencies and potential gaps in handling nuanced scenarios.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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/cagataycali/strands-mcp-server'

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