VISUAL_INSTALL_GUIDE.mdβ’25 kB
# π Polymarket MCP Server - Visual Installation Guide
Complete step-by-step installation guide with diagrams and troubleshooting.
---
## π Table of Contents
1. [Prerequisites](#prerequisites)
2. [Installation Methods](#installation-methods)
3. [Method 1: GUI Wizard (Easiest)](#method-1-gui-wizard-easiest)
4. [Method 2: Automated Script](#method-2-automated-script)
5. [Method 3: Docker](#method-3-docker)
6. [Method 4: Manual Installation](#method-4-manual-installation)
7. [Wallet Setup Guide](#wallet-setup-guide)
8. [Claude Desktop Integration](#claude-desktop-integration)
9. [Testing Your Setup](#testing-your-setup)
10. [Troubleshooting](#troubleshooting)
---
## Prerequisites
### Required Software
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β REQUIREMENTS β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β Python 3.10 or higher β
β Download: https://python.org/downloads β
β β
β β Claude Desktop β
β Download: https://claude.ai/download β
β β
β β Git (optional, for cloning) β
β Download: https://git-scm.com/downloads β
β β
β β Polygon Wallet (for trading) β
β - MetaMask or similar β
β - Must have USDC on Polygon network β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### System Requirements
- Operating System: macOS, Windows 10+, or Linux
- RAM: 2GB minimum
- Disk Space: 500MB for installation
- Internet connection
---
## Installation Methods
```
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CHOOSE YOUR INSTALLATION METHOD β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. GUI Wizard (RECOMMENDED) β
β β±οΈ 5 minutes β β Easiest β π― Best for beginners β
β β
β 2. Automated Script β
β β±οΈ 3 minutes β β Easy β π― For terminal users β
β β
β 3. Docker β
β β±οΈ 2 minutes β β Medium β π― For Docker users β
β β
β 4. Manual Installation β
β β±οΈ 10 minutes β β Advanced β π― For customization β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
---
## Method 1: GUI Wizard (Easiest)
### Step 1: Download the Project
```bash
# Clone the repository
git clone https://github.com/caiovicentino/polymarket-mcp-server.git
cd polymarket-mcp-server
```
Or download ZIP from GitHub and extract.
### Step 2: Install Dependencies
```bash
# Create virtual environment
python -m venv venv
# Activate it
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windows
# Install the package
pip install -e .
```
### Step 3: Run Setup Wizard
```bash
python setup_wizard.py
```
### Step 4: Follow the Wizard
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β SETUP WIZARD FLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββ
β Welcome β
ββββββββ¬βββββββ
β
βΌ
βββββββββββββββ
β Choose Mode β ββββ Demo or Full?
ββββββββ¬βββββββ
β
βΌ
ββββββββββββββββ
β Wallet β ββββ Full mode only
β Config β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Safety β ββββ Set limits
β Limits β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Claude β ββββ Auto-configure
β Desktop β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β Finish! β
ββββββββββββββββ
```
### Screenshots (Placeholders)
**Welcome Screen:**
```
[Screenshot: Welcome screen with project logo and start button]
```
**Wallet Configuration:**
```
[Screenshot: Wallet config screen with masked private key input]
```
**Safety Limits:**
```
[Screenshot: Sliders for configuring risk limits]
```
**Success:**
```
[Screenshot: Completion screen with restart reminder]
```
---
## Method 2: Automated Script
### For macOS/Linux:
```bash
# Clone repository
git clone https://github.com/caiovicentino/polymarket-mcp-server.git
cd polymarket-mcp-server
# Run install script
chmod +x install.sh
./install.sh
```
The script will:
1. Check Python version
2. Create virtual environment
3. Install dependencies
4. Guide you through configuration
5. Set up Claude Desktop integration
### For Windows:
```powershell
# Clone repository
git clone https://github.com/caiovicentino/polymarket-mcp-server.git
cd polymarket-mcp-server
# Run install script
.\install.ps1
```
---
## Method 3: Docker
### Quick Start with Docker Compose
```bash
# Clone repository
git clone https://github.com/caiovicentino/polymarket-mcp-server.git
cd polymarket-mcp-server
# Copy environment template
cp .env.example .env
# Edit .env with your credentials
nano .env # or use any text editor
# Start with Docker Compose
docker-compose up -d
```
### Docker Architecture
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β DOCKER SETUP β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ βββββββββββββββ β
β β Claude β β Polymarket β β
β β Desktop βββββββββββ€ MCP β β
β β β stdio β Container β β
β ββββββββββββββββ ββββββββ¬βββββββ β
β β β
β βΌ β
β βββββββββββββββ β
β β Polymarket β β
β β API β β
β βββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
```
---
## Method 4: Manual Installation
### Step 1: Clone Repository
```bash
git clone https://github.com/caiovicentino/polymarket-mcp-server.git
cd polymarket-mcp-server
```
### Step 2: Create Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windows
```
### Step 3: Install Dependencies
```bash
pip install -e .
```
### Step 4: Configure Environment
```bash
# Copy template
cp .env.example .env
# Edit with your values
nano .env
```
**Required variables:**
```env
POLYGON_PRIVATE_KEY=your_key_here_without_0x
POLYGON_ADDRESS=0xYourAddressHere
```
**Optional (recommended):**
```env
MAX_ORDER_SIZE_USD=1000
MAX_TOTAL_EXPOSURE_USD=5000
MAX_POSITION_SIZE_PER_MARKET=2000
```
### Step 5: Configure Claude Desktop
Edit Claude Desktop config file:
**macOS:**
```bash
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
```
**Windows:**
```powershell
notepad %APPDATA%\Claude\claude_desktop_config.json
```
**Linux:**
```bash
nano ~/.config/Claude/claude_desktop_config.json
```
Add configuration:
```json
{
"mcpServers": {
"polymarket": {
"command": "/path/to/your/venv/bin/python",
"args": ["-m", "polymarket_mcp.server"],
"cwd": "/path/to/polymarket-mcp-server",
"env": {
"POLYGON_PRIVATE_KEY": "your_key",
"POLYGON_ADDRESS": "0xYourAddress"
}
}
}
}
```
### Step 6: Restart Claude Desktop
Close and reopen Claude Desktop to load the MCP server.
---
## Wallet Setup Guide
### Option 1: MetaMask
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β METAMASK WALLET SETUP β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. Install MetaMask β
β https://metamask.io β
β β
β 2. Create or Import Wallet β
β β
β 3. Switch to Polygon Network β
β Network Name: Polygon Mainnet β
β RPC URL: https://polygon-rpc.com β
β Chain ID: 137 β
β Symbol: MATIC β
β β
β 4. Add USDC Token β
β Contract: 0x2791Bca1f2de4661ED88A30C99A... β
β β
β 5. Get USDC on Polygon β
β - Bridge from Ethereum β
β - Buy on exchange (Binance, Coinbase) β
β - Use fiat on-ramp β
β β
β 6. Export Private Key β
β β οΈ Keep this SAFE and PRIVATE! β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### Exporting Private Key from MetaMask
```
Step 1: Click on account icon (top right)
Step 2: Account Details
Step 3: Export Private Key
Step 4: Enter password
Step 5: Copy the key (without 0x prefix)
```
**Security Warning:**
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β β οΈ CRITICAL SECURITY WARNINGS β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β NEVER share your private key β
β β NEVER commit it to Git β
β β NEVER store it in cloud storage β
β β NEVER send it in messages β
β β
β β Store in .env file (gitignored) β
β β Use environment variables β
β β Consider using a dedicated wallet β
β β Start with small amounts β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
```
---
## Claude Desktop Integration
### Configuration File Locations
```
Operating System β Config File Location
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ
macOS β ~/Library/Application Support/Claude/
β claude_desktop_config.json
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ
Windows β %APPDATA%\Claude\
β claude_desktop_config.json
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ
Linux β ~/.config/Claude/
β claude_desktop_config.json
```
### Configuration Example
```json
{
"mcpServers": {
"polymarket": {
"command": "/Users/you/polymarket-mcp/venv/bin/python",
"args": ["-m", "polymarket_mcp.server"],
"cwd": "/Users/you/polymarket-mcp",
"env": {
"POLYGON_PRIVATE_KEY": "abc123...",
"POLYGON_ADDRESS": "0x123...",
"MAX_ORDER_SIZE_USD": "1000",
"MAX_TOTAL_EXPOSURE_USD": "5000"
}
}
}
}
```
### Integration Flow
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLAUDE DESKTOP INTEGRATION β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββ
β Claude β
β Desktop β
ββββββββ¬ββββββββ
β Loads config.json
βΌ
ββββββββββββββββ
β MCP Server β
β (Python) β
ββββββββ¬ββββββββ
β Connects to
βΌ
ββββββββββββββββ
β Polymarket β
β API β
ββββββββββββββββ
```
---
## Testing Your Setup
### Quick Test
Open Claude Desktop and try:
```
"Show me the top 5 trending markets on Polymarket"
```
Expected response:
```
β Server connected
β API accessible
β Returns market data
```
### Full Test Suite
```bash
# Activate virtual environment
source venv/bin/activate
# Run tests
pytest tests/ -v
# Run demo
python demo_mcp_tools.py
```
### Test Checklist
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β TEST CHECKLIST β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β‘ Python version 3.10+ β
β β‘ Virtual environment activated β
β β‘ Dependencies installed β
β β‘ .env file configured β
β β‘ Claude Desktop config updated β
β β‘ Claude Desktop restarted β
β β‘ MCP server appears in Claude β
β β‘ Can fetch market data β
β β‘ (Full mode) Wallet validated β
β β‘ (Full mode) Can create test order β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
```
---
## Troubleshooting
### Common Errors and Solutions
#### Error: "ModuleNotFoundError: No module named 'polymarket_mcp'"
**Solution:**
```bash
# Make sure you installed the package
pip install -e .
# Verify installation
pip list | grep polymarket
```
---
#### Error: "POLYGON_PRIVATE_KEY is required"
**Solution:**
```bash
# Check .env file exists
ls -la .env
# Check it has the key
cat .env | grep POLYGON_PRIVATE_KEY
# Make sure no spaces around =
POLYGON_PRIVATE_KEY=abc123 # β Correct
POLYGON_PRIVATE_KEY = abc123 # β Wrong
```
---
#### Error: "Private key must be 64 hex characters"
**Solution:**
```
1. Remove 0x prefix if present
Wrong: 0xabc123...
Right: abc123...
2. Check length is exactly 64 characters
3. Check only hex characters (0-9, a-f)
```
---
#### Error: "Claude Desktop not detecting MCP server"
**Solution Flowchart:**
```
βββββββββββββββββββββββββββ
β Server not detected? β
βββββββββ¬ββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β Is config.json valid? β
β Use JSONLint.com β
βββββββββ¬ββββββββββββββββββ
β Yes
βΌ
βββββββββββββββββββββββββββ
β Is Python path correct? β
β Check with: which pythonβ
βββββββββ¬ββββββββββββββββββ
β Yes
βΌ
βββββββββββββββββββββββββββ
β Did you restart Claude? β
β Restart = Quit + Open β
βββββββββ¬ββββββββββββββββββ
β Yes
βΌ
βββββββββββββββββββββββββββ
β Check Claude logs β
β See log locations below β
βββββββββββββββββββββββββββ
```
**Claude Desktop Log Locations:**
- macOS: `~/Library/Logs/Claude/`
- Windows: `%APPDATA%\Claude\logs\`
- Linux: `~/.config/Claude/logs/`
---
#### Error: "Rate limit exceeded"
**Solution:**
```
The server has built-in rate limiting that respects Polymarket's API limits.
If you see this error:
1. Wait 60 seconds
2. Reduce request frequency
3. Check if you're making parallel requests
```
---
#### Error: "Insufficient funds"
**Solution:**
```
1. Check USDC balance on Polygon:
https://polygonscan.com/address/YOUR_ADDRESS
2. Get more USDC:
- Bridge from Ethereum
- Buy on exchange
- Use fiat on-ramp
3. Check you're on Polygon network (Chain ID 137)
```
---
### Installation Decision Tree
```
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β INSTALLATION TROUBLESHOOTER β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Start here
β
βΌ
Are you on macOS/Linux/Windows?
β
ββ macOS/Linux βββΊ Use install.sh
β OR GUI wizard
β
ββ Windows βββββββΊ Use install.ps1
OR GUI wizard
β
βΌ
Do you have Python 3.10+?
β
ββ Yes βββββββββββΊ Continue
β
ββ No ββββββββββββΊ Install Python
https://python.org
β
βΌ
Do you have a Polygon wallet?
β
ββ Yes βββββββββββΊ Full installation
β
ββ No ββββββββββββΊ Demo mode
OR Create wallet first
β
βΌ
Are you comfortable with terminal?
β
ββ Yes βββββββββββΊ Use automated script
β
ββ No ββββββββββββΊ Use GUI wizard
β
βΌ
Installation complete!
```
---
## Video Tutorials
### Coming Soon
- π₯ Complete installation walkthrough (10 minutes)
- π₯ Wallet setup guide (5 minutes)
- π₯ First trade tutorial (8 minutes)
- π₯ Safety configuration best practices (6 minutes)
**Subscribe for updates:**
- YouTube: [Placeholder]
- Twitter: @caiovicentino
---
## Getting Help
### Support Channels
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β GET HELP β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π Documentation β
β - README.md β
β - FAQ.md β
β - TOOLS_REFERENCE.md β
β β
β π¬ Community β
β - GitHub Discussions β
β - Telegram (Renda Cripto) β
β - Discord (Yield Hacker) β
β β
β π Bug Reports β
β - GitHub Issues β
β - Include: OS, Python version, error log β
β β
β βοΈ Direct Support β
β - GitHub: @caiovicentino β
β - Email: support@example.com β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
```
---
## Next Steps
After successful installation:
1. **Read the FAQ** - Common questions answered
2. **Review TOOLS_REFERENCE.md** - Learn all 45 tools
3. **Check USAGE_EXAMPLES.py** - See example code
4. **Join the community** - Connect with other users
5. **Start small** - Test with small amounts first
6. **Provide feedback** - Help us improve!
---
## Quick Reference
### Essential Commands
```bash
# Start virtual environment
source venv/bin/activate
# Update package
pip install -e . --upgrade
# Run tests
pytest
# Check configuration
python -c "from polymarket_mcp.config import load_config; print(load_config().to_dict())"
# View logs
tail -f ~/.config/Claude/logs/mcp*.log
```
### Important Files
```
polymarket-mcp/
βββ .env # Your configuration
βββ setup_wizard.py # GUI setup tool
βββ README.md # Main documentation
βββ FAQ.md # Common questions
βββ VISUAL_INSTALL_GUIDE.md # This file
βββ src/
βββ polymarket_mcp/
βββ server.py # MCP server
βββ config.py # Configuration
```
---
**Made with β€οΈ by [Caio Vicentino](https://github.com/caiovicentino)**
*Ready to trade prediction markets with AI!* π