glam/mcp_servers/wikidata_auth/setup.sh
2025-11-19 23:25:22 +01:00

61 lines
1.7 KiB
Bash
Executable file

#!/bin/bash
# Setup script for Enhanced Wikidata MCP Server
set -e
echo "========================================="
echo "Wikidata MCP Server Setup"
echo "========================================="
echo ""
# Check if .env exists
if [ ! -f "/Users/kempersc/apps/glam/.env" ]; then
echo "❌ Error: .env file not found"
exit 1
fi
# Load environment variables
source "/Users/kempersc/apps/glam/.env"
# Check if token is set
if [ "$WIKIDATA_API_TOKEN" = "your_token_here_replace_after_registration" ]; then
echo "⚠️ WARNING: WIKIDATA_API_TOKEN not set!"
echo ""
echo "Please update /Users/kempersc/apps/glam/.env with your actual token:"
echo ""
echo "1. Get token at: https://api.wikimedia.org/wiki/Special:AppManagement"
echo "2. Replace 'your_token_here_replace_after_registration' with actual token"
echo "3. Update WIKIMEDIA_CONTACT_EMAIL with your email"
echo ""
read -p "Do you want to continue anyway? (y/n) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
# Install dependencies
echo "📦 Installing dependencies..."
cd "/Users/kempersc/apps/glam/mcp_servers/wikidata_auth"
if ! command -v uv &> /dev/null; then
echo "Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
uv venv
source .venv/bin/activate
uv pip install httpx mcp
echo ""
echo "✅ Setup complete!"
echo ""
echo "Next steps:"
echo "1. Update .env with your actual API token"
echo "2. Configure Claude Desktop MCP (see README.md)"
echo "3. Restart Claude Desktop"
echo ""
echo "Test the server:"
echo " cd /Users/kempersc/apps/glam/mcp_servers/wikidata_auth"
echo " source .venv/bin/activate"
echo " python server.py"