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:
@tooldecorated functions (DecoratedFunctionTool) — e.g.current_time,shell,calculatorTOOL_SPECmodule-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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55261b03be4efb00ccd454747e8a8549cc80c499c124bde422459e1dcae0354d
|
|
| MD5 |
5cd6642d04c068939c2c8e7345eee975
|
|
| BLAKE2b-256 |
d97cef6977d48d04d55e654b9bf473478ecde9810b3f173a964e720ee2dd9a4a
|
Provenance
The following attestation bundles were made for strands_tools_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on mkmeral/strands-tools-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strands_tools_mcp-0.1.0.tar.gz -
Subject digest:
55261b03be4efb00ccd454747e8a8549cc80c499c124bde422459e1dcae0354d - Sigstore transparency entry: 1093213031
- Sigstore integration time:
-
Permalink:
mkmeral/strands-tools-mcp@dacef606d0c9ba1b866281ed36c2f2960a87c06c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mkmeral
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dacef606d0c9ba1b866281ed36c2f2960a87c06c -
Trigger Event:
release
-
Statement type:
File details
Details for the file strands_tools_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: strands_tools_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ff18058951b529f058662ff729f697a04e41cc9928fb491482346d2c97d15b6
|
|
| MD5 |
8087a78522df2e784611dcb6a6b156cc
|
|
| BLAKE2b-256 |
7a825b5875041a98b76635a2c139dd2c65dfbd52b206deb3dd802f639e74a99c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strands_tools_mcp-0.1.0-py3-none-any.whl -
Subject digest:
7ff18058951b529f058662ff729f697a04e41cc9928fb491482346d2c97d15b6 - Sigstore transparency entry: 1093213113
- Sigstore integration time:
-
Permalink:
mkmeral/strands-tools-mcp@dacef606d0c9ba1b866281ed36c2f2960a87c06c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mkmeral
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dacef606d0c9ba1b866281ed36c2f2960a87c06c -
Trigger Event:
release
-
Statement type: