itsmethahseer/MCP-servers-with-Strands-framworks-for-Agents
If you are the rightful owner of MCP-servers-with-Strands-framworks-for-Agents and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project demonstrates a simple MCP (Model Context Protocol) server and agent system built using Strands and MCP frameworks.
š§ README.md
# š§© Strands Agentic MCP
This project demonstrates a simple **MCP (Model Context Protocol)** server and agent system built using **Strands** and **MCP** frameworks.
It showcases how to define, expose, and use tools (like calculator, time, or weather retrieval) through a local MCP server that can be accessed by an agent client.
---
## š Features
- ā
MCP server running locally on `localhost:8000`
- ā
Built using `Strands` and `mcp` frameworks
- ā
Example tools:
- **Calculator** ā evaluate math expressions
- **Current Time** ā get system time in ISO format
- **Weather API** ā fetch forecast using latitude & longitude
- ā
Environment variable management using `.env`
- ā
Modular design (`agent.py`, `llm_client.py`, `mcp_server.py`)
---
## š Project Structure
strands_agentic_mcp/ ā āāā agent.py # Handles agent logic and MCP tool integration āāā llm_client.py # Example LLM client interface (e.g., OpenAI) āāā mcp_server.py # Main MCP server with multiple tools āāā .env # Environment variables (e.g., API keys) āāā .gitignore āāā requirements.txt # Python dependencies āāā README.md
---
## āļø Setup Instructions
### 1. Clone the Repository
```bash
git clone https://github.com/<your-username>/strands_agentic_mcp.git
cd strands_agentic_mcp
2. Create a Virtual Environment
python3 -m venv env
source env/bin/activate
3. Install Dependencies
pip install -r requirements.txt
4. Add Environment Variables
Create a .env
file in the project root:
OPENAI_API_KEY=your_openai_key_here
š§ Running the MCP Server
To start your MCP server locally:
python mcp_server.py
Once running, the server will be available at:
http://localhost:8000
Example Tools
ā Calculator
POST /tools/calculator
{
"expression": "5 + 10 * 2"
}
ā° Current Time
POST /tools/current_time
š¦ Get Weather
POST /tools/get_weather
{
"lat": 37.7749,
"lon": -122.4194
}
š§© Running the Agent
To interact with the MCP server via an agent:
python agent.py
š¦ Dependencies
List of core dependencies:
mcp
strands
httpx
python-dotenv
š§āš» Author
Thahseer CK AI Developer | LLMs | MCP | Strands | FastAPI š« Connect on GitHub
šŖŖ License
This project is licensed under the MIT License. Feel free to use, modify, and distribute it for your own MCP/Agentic projects.