Skip to main content

Expose Strands Agents tools as an MCP server via stdio transport

Project description

strands-tools-mcp

Expose Strands Agents tools as an MCP server via stdio transport, so any MCP client (Kiro, Claude Desktop, etc.) can use them.

Supports both @tool-decorated functions and TOOL_SPEC module-based tools from the strands-agents-tools package, as well as custom tool files.

Installation

pip install strands-tools-mcp

Or from source:

git clone https://github.com/mkmeral/strands-tools-mcp.git
cd strands-tools-mcp
pip install -e ".[dev]"

Configuration

Configure which tools to expose via environment variables:

Variable Description Example
STRANDS_TOOLS Comma-separated tool names from the strands-agents-tools package shell,http_request,current_time,file_read
STRANDS_TOOLS_PATHS Comma-separated file paths or URLs to custom .py tool files /path/to/my_tool.py,https://raw.githubusercontent.com/user/repo/main/tool.py

Both variables can be used together. At least one must be set.

Usage

As a CLI

STRANDS_TOOLS=current_time,shell strands-tools-mcp

In Kiro / Claude Desktop MCP Config

Add to your MCP configuration file:

{
  "mcpServers": {
    "strands-tools": {
      "command": "strands-tools-mcp",
      "env": {
        "STRANDS_TOOLS": "shell,http_request,file_read,file_write"
      }
    }
  }
}

With Custom Tools

You can combine built-in Strands tools with your own custom tool files:

{
  "mcpServers": {
    "my-tools": {
      "command": "strands-tools-mcp",
      "env": {
        "STRANDS_TOOLS": "current_time",
        "STRANDS_TOOLS_PATHS": "/path/to/my_tool.py"
      }
    }
  }
}

With Remote Tools (URLs)

Point directly at raw GitHub links, gists, or any hosted .py file:

{
  "mcpServers": {
    "remote-tools": {
      "command": "strands-tools-mcp",
      "env": {
        "STRANDS_TOOLS_PATHS": "https://raw.githubusercontent.com/user/repo/main/my_tool.py"
      }
    }
  }
}

Local paths and URLs can be mixed in STRANDS_TOOLS_PATHS.

Custom tool files should use the @tool decorator from strands:

from strands import tool

@tool
def my_custom_tool(message: str) -> str:
    """A custom tool that processes a message.

    Args:
        message: The message to process

    Returns:
        The processed message
    """
    return f"Processed: {message}"

How It Works

The server uses the Strands SDK's built-in tool loader to discover tools, then exposes them via the MCP protocol's stdio transport using the raw mcp library (no FastMCP). Both tool patterns are supported:

  • @tool decorated functions (DecoratedFunctionTool) — e.g. current_time, shell, calculator
  • TOOL_SPEC module-based tools (PythonAgentTool) — e.g. file_read, file_write, http_request, python_repl

All tools are invoked through the unified AgentTool.stream() interface, so both types work identically.

Development

# Install in dev mode
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Lint and format
ruff check src/ tests/
ruff format src/ tests/

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_tools_mcp-0.1.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_tools_mcp-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file strands_tools_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: strands_tools_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for strands_tools_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55261b03be4efb00ccd454747e8a8549cc80c499c124bde422459e1dcae0354d
MD5 5cd6642d04c068939c2c8e7345eee975
BLAKE2b-256 d97cef6977d48d04d55e654b9bf473478ecde9810b3f173a964e720ee2dd9a4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_tools_mcp-0.1.0.tar.gz:

Publisher: publish.yml on mkmeral/strands-tools-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file strands_tools_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for strands_tools_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ff18058951b529f058662ff729f697a04e41cc9928fb491482346d2c97d15b6
MD5 8087a78522df2e784611dcb6a6b156cc
BLAKE2b-256 7a825b5875041a98b76635a2c139dd2c65dfbd52b206deb3dd802f639e74a99c

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_tools_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on mkmeral/strands-tools-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page