- MCP Server Demo
MCP Server Demo
MCP Server Demo
This project is a demonstration of using the MCP Python SDK to build a server. The MCP SDK provides tools and utilities to interact with the Model Context Protocol (MCP) efficiently.
Installation Guide
Prerequisites
For WSL (Ubuntu on Windows):
-
Install Python 3.11 or higher:
sudo apt update sudo apt install python3 python3-venv python3-pip -
Install Git:
sudo apt install git -
Install any additional dependencies:
sudo apt install build-essential
For Windows:
-
Download and install Python 3.11 or higher from the official Python website.
- During installation, ensure you check the box to add Python to your PATH.
-
Install Git for Windows from git-scm.com.
-
Install a C++ build toolchain (required for some Python packages):
- Download and install Build Tools for Visual Studio.
Project Setup
-
Clone the repository:
git clone https://github.com/Maureth/mcp-server-demo.git cd mcp-server-demo -
Create and activate a virtual environment:
- For WSL (Ubuntu):
python3 -m venv .venv source .venv/bin/activate - For Windows:
python -m venv .venv .venv\Scripts\activate
- For WSL (Ubuntu):
-
Install the required Python packages:
pip install -r requirements.txt -
Run the server:
python server.py
Using uv
uv is used in this project for dependency management and locking package versions to ensure consistent environments. It helps in creating a uv.lock file that captures the exact versions of all installed dependencies.
Installation
To install uv, run the following command:
pip install uv
After installing uv, you can use it to lock dependencies by running:
uv lock
This will generate a uv.lock file based on the requirements.txt file.