Agentic-AI-POCs

itsmethahseer/Agentic-AI-POCs

3.2

If you are the rightful owner of Agentic-AI-POCs and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This project demonstrates a simple MCP (Model Context Protocol) server and agent system built using Strands and MCP frameworks.

Tools
3
Resources
0
Prompts
0

🧠 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.