Skip to main content
Glama

wiki-js-mcp

by BehindUAll
setup.sh•2.98 kB
#!/bin/bash # Wiki.js MCP Server Setup Script # This script sets up the Python virtual environment and installs dependencies set -e # Exit on any error echo "šŸš€ Setting up Wiki.js MCP Server..." # Get the directory where this script is located SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" # Check if Python 3.12+ is available echo "šŸ“‹ Checking Python version..." if command -v python3 &> /dev/null; then PYTHON_CMD="python3" elif command -v python &> /dev/null; then PYTHON_CMD="python" else echo "āŒ Error: Python is not installed or not in PATH" exit 1 fi # Check Python version PYTHON_VERSION=$($PYTHON_CMD --version 2>&1 | cut -d' ' -f2) PYTHON_MAJOR=$(echo $PYTHON_VERSION | cut -d'.' -f1) PYTHON_MINOR=$(echo $PYTHON_VERSION | cut -d'.' -f2) if [ "$PYTHON_MAJOR" -lt 3 ] || ([ "$PYTHON_MAJOR" -eq 3 ] && [ "$PYTHON_MINOR" -lt 12 ]); then echo "āŒ Error: Python 3.12+ is required. Found: $PYTHON_VERSION" exit 1 fi echo "āœ… Python $PYTHON_VERSION found" # Create virtual environment if it doesn't exist if [ ! -d "venv" ]; then echo "šŸ“¦ Creating virtual environment..." $PYTHON_CMD -m venv venv echo "āœ… Virtual environment created" else echo "šŸ“¦ Virtual environment already exists" fi # Activate virtual environment echo "šŸ”§ Activating virtual environment..." source venv/bin/activate # Upgrade pip echo "ā¬†ļø Upgrading pip..." pip install --upgrade pip # Install dependencies echo "šŸ“š Installing dependencies..." if [ -f "pyproject.toml" ] && command -v poetry &> /dev/null; then echo "šŸ“– Using Poetry for dependency management..." poetry install elif [ -f "requirements.txt" ]; then echo "šŸ“– Using pip for dependency management..." pip install -r requirements.txt else echo "āŒ Error: No pyproject.toml or requirements.txt found" exit 1 fi # Create .env file from example if it doesn't exist if [ ! -f ".env" ] && [ -f "config/example.env" ]; then echo "āš™ļø Creating .env file from example..." cp config/example.env .env echo "āœ… .env file created. Please edit it with your Wiki.js credentials." else echo "āš™ļø .env file already exists" fi # Create necessary directories echo "šŸ“ Creating necessary directories..." mkdir -p logs # Set executable permissions for scripts echo "šŸ” Setting executable permissions..." chmod +x setup.sh chmod +x start-server.sh echo "" echo "šŸŽ‰ Setup completed successfully!" echo "" echo "šŸ“ Next steps:" echo "1. Edit .env file with your Wiki.js credentials:" echo " - Set WIKIJS_API_URL (e.g., http://localhost:3000)" echo " - Set WIKIJS_TOKEN (your JWT token from Wiki.js)" echo "" echo "2. Test the server:" echo " ./start-server.sh" echo "" echo "3. Configure Cursor MCP:" echo " - Copy config-mcp.json settings to your Cursor MCP configuration" echo " - Update the absolute paths in the configuration" echo "" echo "šŸ“– For more information, see README.md"

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BehindUAll/wiki-js-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server