MCP Client Setup Guide
Complete step-by-step guide for setting up a Model Context Protocol (MCP) client project. Assuming the you have snowflake managed mcp server already created (for more details :https://github.com/ranjeetapegu/Snowflake_Managed_MCP_Servers
Reference: https://modelcontextprotocol.io/docs/develop/build-client
Prerequisites
- Mac OS (tested on macOS)
- Python 3.10+ (required for MCP package compatibility)
- uv (latest version) - Python package manager
- Verify uv installation:
uv --version
Setup Steps
Step 1: Create Project Directory
# Navigate to your workspace
cd /Users/rpegu/Documents/GenAI/MCP_client
# Initialize new project (if not exists)
uv init mcp-client
cd mcp-clientStep 2: Fix Python Version Requirements
Important: The MCP package requires Python >=3.10, so update your pyproject.toml:
[project]
name = "mcp-client"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10" # Changed from >=3.9
dependencies = [
"anthropic>=0.71.0",
"mcp>=1.19.0",
"python-dotenv>=1.1.1",
]Step 3: Set Python Version
# Pin Python version to avoid conflicts
uv python pin 3.10
# This creates/updates .python-version fileStep 4: Create Virtual Environment
# Remove any existing environment
rm -rf .venv
# Create new environment with Python 3.10+
uv venv --python 3.10
# Activate virtual environment
source .venv/bin/activate
# Verify Python version
python --version # Should show Python 3.10.xStep 5: Install Dependencies
# Install required packages
uv add mcp anthropic python-dotenv
# Or use sync to install from pyproject.toml
uv syncStep 6: Execution
Navigate
cd /Users/rpegu/Documents/GenAI/MCP_client/mcp-client
Activate environment
source .venv/bin/activate
Run non-interactive (automatic demo)
python without_llm_client.py
Run interactive (manual queries)
python interactive_mcp.py
Deactivate when done
deactivate
System Specifications Used
- OS: macOS (darwin 24.6.0)
- Python: 3.10.11
- Package Manager: uv
- Shell: /bin/zsh
