home / mcp / strands agent mcp server
An MCP server to execute agents through MCP
Configuration
View docs{
"mcpServers": {
"imgaray-strands-agents-mcp": {
"url": "https://mcp.example.com/mcp",
"headers": {
"PLUGIN_PATH": ".",
"PLUGIN_NAMESPACE": "sap_mcp_plugin"
}
}
}
}Strands Agent MCP bridges the Strands agent framework with the Model Context Protocol (MCP), enabling you to register Strands agents as MCP tools and execute them through MCP-enabled clients. It provides a lightweight, plugin-based way to expand agent capabilities and find agents by specific skills, making it easy to integrate Strands agents with systems like Amazon Q.
You run the MCP server locally to expose Strands agents as MCP tools. Once the server is running, connect your MCP client (such as Amazon Q) to the server URL to execute agents or discover available agents by their skills. Use the available tools to execute an agent with a given name and prompt, or to list all registered agents.
Key MCP tools exposed by the server include: execute_agent to run a specific agent with a prompt, and list_agents to enumerate all registered agents. Plugins register agents into a registry, and the server discovers and exposes them automatically. You can create your own agent plugins by naming packages with the sap_mcp_plugin_ prefix and implementing a build_agents function that returns a list of AgentEntry objects.
Prerequisites: You need Python and Git installed on your system. You also need a Python environment to install dependencies and run the server.
1) Clone the project repository to your local machine.
2) Navigate to the project directory.
3) Install the package in editable mode so you can develop and test extensions.
# Clone the repository
git clone https://github.com/yourusername/strands-agent-mcp.git
cd strands-agent-mcp
# Install the package in editable mode
pip install -e .Configuration and startup are driven by environment variables and the runtime command. You can customize where plugins are loaded and the namespace used for plugin registration.
Environment variables shown for the server include: PLUGIN_PATH for a custom plugin search path (default: "."), and PLUGIN_NAMESPACE for a custom plugin namespace prefix (default: 'sap_mcp_plugin'). These variables affect how the server discovers and registers agents from plugins.
Starting the MCP server is done with a single command. The server will then expose available MCP tools and registered agents for execution.
strands-agent-mcpThe project uses a plugin architecture to add new Strands agents without modifying core code. To create a new agent plugin, provide a Python package whose name starts with sap_mcp_plugin_ and implement a build_agents function returning a list of AgentEntry objects.
A sample plugin demonstrates returning a simple agent with a couple of skills. You can adapt this pattern to register more agents and tailor their skills.
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"]
)
]Only plugins that you explicitly install and configure are loaded. Plugins follow a naming convention to be discovered, and the server loads their agents into the registry. Ensure you review and trust any plugin before enabling it.
If you are integrating with external MCP clients, ensure you manage access control and validate prompts and agent responses, especially in production environments. The server supports environment variables to tailor plugin loading and naming, but you should keep sensitive data out of plain text configurations.
A sample plugin demonstrates registering a simple agent with a minimal set of skills. This example shows how to structure build_agents to return an AgentEntry for discovery by the MCP server.
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"]
)
]Execute a registered MCP agent by providing the agent name and a prompt, returning the agent's generated response.
List all agents currently registered in the MCP server registry with their skills.