This project implements agentic workflows using LangChain, LangGraph, and the Model Context Protocol (MCP).
- Python 3.13+
- Docker & Docker Compose (optional, for containerized execution)
-
Clone the repository:
git clone <repository-url> cd agent-workflows
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install . -
Configure environment: Copy
.env.exampleto.envand fill in the required values.cp .env.example .env
python src/agents/math/math_agent.pypython src/main.pydocker compose up --buildTo add a new Model Context Protocol (MCP) client to the application, you need to register it in the configuration.
- Open
src/config/mcp_config.py. - Locate the
AppConfig.loadmethod. - Add a new entry to the
servicesdictionary usingMcpServiceConfig.
Example:
If you want to add a "weather" service running on port 8080:
# src/config/mcp_config.py
# ... inside AppConfig.load method ...
# Weather Service
services["weather"] = McpServiceConfig(
server_url=os.getenv("MCP_WEATHER_URL", "http://127.0.0.1:8080/weather/weather"),
redirect_uris=["http://127.0.0.1:8080/weather/"]
)- (Optional) Add the corresponding environment variable
MCP_WEATHER_URLto your.envfile to allow configuration overrides.