MCP Crash Course
Provides containerization support for easy deployment of the MCP server, with a Dockerfile for building and running the server in an isolated environment.
Supports environment variable configuration through .env files for storing API keys and other sensitive configuration.
Allows cloning and accessing the MCP server code repository.
Integrates with LangChain (specifically langchain-groq) to enable conversational agents with memory capabilities.
Built on Python with support for multiple versions (3.13+ recommended, 3.11+ for Docker), using Python's ecosystem for MCP server implementation.
Uses TOML format for project configuration and dependency management via pyproject.toml.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Crash Courseget weather alerts for California"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Read file: pyproject.toml Ran tool Read file: mcpserver/requirements.txt Here’s a brief and clear README for your project, covering the MCP server, usage, and Docker integration:
MCP Crash Course
This project demonstrates how to build and interact with an MCP (Model Context Protocol) server using Python, with support for weather alerts and conversational agents. It also includes Docker support for easy deployment.
Features
Weather Alerts Tool:
Get real-time weather alerts for any US state using the National Weather Service API.Conversational Agent:
Useslangchain-groqand MCP tools to enable chat-based interactions with memory.Model Used:
llama-3.3-70b-versatile(via ChatGroq)MCP Server & Client:
Includes both server and client implementations for tool invocation and chat.Docker Support:
Easily build and run the server in a containerized environment.
Related MCP server: MCP Container Weather Server
Project Structure
.
├── main.py
├── pyproject.toml
├── README.md
├── server/
│ ├── weather.py # Weather tool implementation
│ ├── client.py # Chat client using MCPAgent
│ └── weather.json # MCP tool configuration
├── mcpserver/
│ ├── server.py # Example MCP server
│ ├── client-stdio.py # Example stdio client
│ ├── client-sse.py # Example SSE client
│ ├── Dockerfile # Docker setup for server
│ └── requirements.txt # Minimal requirements for Docker
└── .venv/ # Virtual environment (ignored)Getting Started
1. Clone the repository
git clone https://github.com/Muhammadaffan05/MCP.git
cd MCP2. Set up a virtual environment (recommended)
uv venv --python=python3.13
source .venv/bin/activate
uv add -r pyproject.toml3. Configure Environment Variables
Create a .env file in the root or set the following in your environment:
GROQ_API_KEY(for language model access)
4. Run the MCP Server
python mcpserver/server.py5. Run the Client
python server/client.pyOr try the stdio client:
python mcpserver/client-stdio.pyDocker Usage
Build and run the server in Docker:
cd mcpserver
docker build -t mcp-server .
docker run -p 8000:8000 mcp-serverThe Dockerfile uses Python 3.11, installs dependencies with
uv, and runs the MCP server.
Dependencies
Python 3.13+ (or 3.11+ for Docker)
httpx
langchain-groq
mcp-use
mcp[cli]
nest-asyncio
All dependencies are managed via pyproject.toml and uv.
Notes
.venv/,__pycache__/, and other generated files are gitignored.For best results, use the latest stable Python version.
Make sure to set up your API keys and environment variables as needed.
Let me know if you want this saved to your README.md or need any changes!
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server for weather information by @kulybaba
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA basic Model Context Protocol server implementation that demonstrates core MCP functionality including tools and resources. Provides weather alerts through the Weather API and serves as a learning example for MCP development.-
- FlicenseNot gradedqualityDmaintenanceA Docker-based MCP server that provides current weather information for cities worldwide. Enables AI assistants like Claude to fetch temperature, weather conditions, and humidity data through a standardized interface.-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server built with the mcp-framework to provide weather-related tools and data to AI clients. It enables integration of weather capabilities and custom tools into the MCP ecosystem for use with platforms like Claude Desktop.5 npm-
- FlicenseNot gradedqualityDmaintenanceA lightweight Model Context Protocol (MCP) server that gives AI assistants the ability to fetch real-time weather data for any city using the OpenWeatherMap API.1-