About MCP Server Demo
MCP Server Demo is an example server project for developers learning to build with the MCP Python SDK. It runs as a Python script and uses uv to manage dependencies and lock package versions.
Key features
- 01Demonstrates server use of MCP Python SDK
- 02Start the server with a Python script
- 03Manage dependencies with uv
- 04Lock dependency versions
Use cases
- 01Learn to build a server with MCP Python SDK
- 02Create and lock a project's Python dependencies
MCP support
This server demo uses the MCP Python SDK and illustrates building an MCP server with it.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP 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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.