- Home
- MCP servers
- Container
Container
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a container-friendly MCP server that exposes a streamable HTTP interface for clients to access simple tools, prompts, and context-aware operations. It is designed for easy deployment in Docker or Kubernetes and can be exercised locally to prototype weather reports, basic math, and context logging without external dependencies.
How to use
To use the MCP server, connect your client to the MCP endpoint over HTTP and treat it as a source of small utilities. Start by locating the server URL at the MCP endpoint, then list available tools and prompts, and finally invoke the tools you need (for example, get weather, add numbers, or inspect context information). Use the server’s streamable HTTP transport to receive continuous updates when a long-running prompt is in progress.
How to install
# Prerequisites
- Python 3.8+ installed
- network access to install dependencies
# 1. Create and activate a virtual environment
python -m venv venv
# On Unix/macOS:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run in development mode (HTTP MCP server on port 8000)
python -m src.server --port 8000 --log-level DEBUG
# 4. Run tests
pytest
# 5. Deactivate when done
deactivate
# Alternative: run without a virtual environment (not recommended)
pip install -r requirements.txt
python -m src.server --port 8000 --log-level DEBUG
pytest
# Direct execution options
# Module-based start
python -m src.server --port 8000 --log-level DEBUG
# Or direct script execution
python src/server.py --port 8000 --log-level DEBUG
Configuration and usage notes
Key runtime options to know about include the port to expose the server on and the log level for diagnostics. If you prefer JSON responses instead of streaming events, you can toggle the format at startup.
Available tools
get_weather
Fetch mock weather information for a city, returning temperature, humidity, and conditions.
sum_numbers
Add two numbers together and return the resulting sum.
context_info
Return context-related details including processing metadata and progress information.