Strands Agent MCP serves as a bridge between the Strands agent framework and the Model Context Protocol (MCP), allowing you to register and execute Strands agents through MCP. This integration makes it possible to use Strands agents with Amazon Q and other MCP-compatible systems.
Since this package is currently in alpha stage and not yet available on PyPI, you'll need to install it from source:
# Clone the repository
git clone https://github.com/yourusername/strands-agent-mcp.git
cd strands-agent-mcp
# Install the package
pip install -e .
Starting the server is straightforward:
strands-agent-mcp
This command launches the MCP server, making your Strands agents available through the MCP interface.
You can customize the server behavior using these environment variables:
PLUGIN_PATH
: Specify a custom path to look for plugins (default: ".")PLUGIN_NAMESPACE
: Define a custom namespace prefix for plugins (default: 'sap_mcp_plugin')The server uses a plugin architecture to make it easy to add new agents. To create a plugin:
sap_mcp_plugin_
build_agents
function that returns a list of AgentEntry
objectsHere's a simple example of a Strands agent plugin:
from typing import List
from boto3 import Session
from strands import Agent
from strands.models import BedrockModel
from strands_agent_mcp.registry import AgentEntry
def build_agents() -> List[AgentEntry]:
return [
AgentEntry(
name="my-agent",
agent=Agent(
model=BedrockModel(boto_session=Session(region_name="us-west-2"))
),
skills=["general-knowledge", "coding"]
)
]
This plugin creates an agent named "my-agent" with skills in general knowledge and coding.
After starting the MCP server, you can connect it to Amazon Q by following Amazon Q's documentation for setting up MCP connections.
Once connected, the following MCP tools will be available:
execute_agent
: Run an agent with parameters agent_name
and prompt
list_agents
: Get a list of all available agentsThe repository includes a sample plugin that demonstrates how to create a simple agent:
from typing import List
from boto3 import Session
from strands import Agent
from strands.models import BedrockModel
from strands_agent_mcp.registry import AgentEntry
def build_agents() -> List[AgentEntry]:
return [
AgentEntry(
name="simple-agent",
agent=Agent(
model=BedrockModel(boto_session=Session(region_name="us-west-2"))
),
skills=["general-knowledge"]
)
]
This sample creates a basic agent with general knowledge capabilities, using AWS Bedrock as the underlying model provider.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "strands-agents-mcp" '{"command":"strands-agent-mcp","args":[]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"strands-agents-mcp": {
"command": "strands-agent-mcp",
"args": []
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"strands-agents-mcp": {
"command": "strands-agent-mcp",
"args": []
}
}
}
3. Restart Claude Desktop for the changes to take effect