Installation Guide

Overview

The Swagger MCP Server provides automated installation and setup capabilities for cross-platform deployment. This guide covers installation methods, system requirements, and troubleshooting.

System Requirements

Minimum Requirements

Supported Platforms

Installation Methods

# Install from PyPI
pip install swagger-mcp-server

# Run setup
swagger-mcp-server setup

Method 2: Poetry Installation (Development)

# Clone repository
git clone <repository-url>
cd swagger-mcp-server

# Install with Poetry
poetry install

# Run setup
poetry run swagger-mcp-server setup

Method 3: Development Installation

# Clone and install in development mode
git clone <repository-url>
cd swagger-mcp-server
pip install -e .

# Run setup
swagger-mcp-server setup

Setup Process

Interactive Setup

The setup command provides an interactive installation experience:

swagger-mcp-server setup

Setup Options

# Force reinstallation (overwrites existing installation)
swagger-mcp-server setup --force

# Setup with verification
swagger-mcp-server setup --verify

# Preview what will be installed
swagger-mcp-server setup --verify --force

What Gets Installed

The setup process creates the following structure:

~/.swagger-mcp-server/
├── config/
│   ├── config.yaml          # Main configuration
│   └── servers.json          # Server registry
├── data/
│   ├── database/            # SQLite databases
│   ├── search_index/        # Search indices
│   └── temp/                # Temporary files
├── logs/
│   ├── server.log           # Server logs
│   ├── conversion.log       # Conversion logs
│   └── setup.log            # Setup logs
├── backups/                 # Configuration backups
└── installation_metadata.json

Configuration

Initial Configuration

After installation, the system creates a default configuration in development mode. You can customize it:

# Edit configuration
swagger-mcp-server config edit

# Validate configuration
swagger-mcp-server config validate

# View current configuration
swagger-mcp-server config show

Environment-Specific Setup

# Production setup
swagger-mcp-server config create production

# Development setup (default)
swagger-mcp-server config create development

# Testing setup
swagger-mcp-server config create testing

Verification

System Health Check

# Run comprehensive health check
swagger-mcp-server setup --verify

Manual Verification

# Check installation status
swagger-mcp-server status

# Test basic functionality
swagger-mcp-server test-connection

# Validate configuration
swagger-mcp-server config validate

Uninstallation

Complete Removal

# Remove everything (configurations, data, logs)
swagger-mcp-server setup --uninstall

Selective Removal

# Preserve user configurations
swagger-mcp-server setup --uninstall --preserve-config

# Preserve user data and configurations
swagger-mcp-server setup --uninstall --preserve-config --preserve-data

Manual Cleanup

If the automated uninstaller fails:

# Remove installation directory
rm -rf ~/.swagger-mcp-server

# Remove package
pip uninstall swagger-mcp-server

Troubleshooting

Common Issues

Permission Errors

Problem: Cannot create directories or files

PermissionError: [Errno 13] Permission denied

Solution:

# Check permissions
ls -la ~/
# Fix permissions
chmod 755 ~/
# Try setup again
swagger-mcp-server setup

Python Version Issues

Problem: Incompatible Python version

Python 3.9+ required, found 3.8

Solution:

# Update Python
# macOS with Homebrew
brew install python@3.9

# Ubuntu/Debian
sudo apt update && sudo apt install python3.9

# Or use pyenv
pyenv install 3.9.16
pyenv global 3.9.16

Disk Space Issues

Problem: Insufficient disk space

Insufficient disk space: 50MB available, 100MB required

Solution:

# Check disk usage
df -h
# Clean up temporary files
swagger-mcp-server cleanup
# Or free up space manually

Network Connectivity Issues

Problem: Cannot download packages

Network connectivity timeout

Solution:

# Test network
ping pypi.org
# Use offline installation
pip install swagger-mcp-server --no-deps
# Or configure proxy if needed
pip install --proxy http://proxy:8080 swagger-mcp-server

Dependency Conflicts

Problem: Package conflicts

ERROR: Cannot install swagger-mcp-server and other-package

Solution:

# Use virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS
# or
venv\Scripts\activate  # Windows
pip install swagger-mcp-server

Advanced Troubleshooting

Debug Mode

# Enable debug logging
export LOG_LEVEL=DEBUG
swagger-mcp-server setup --verify

System Information

# Get detailed system info
swagger-mcp-server system-info

# Check compatibility
swagger-mcp-server check-compatibility

Log Analysis

# View setup logs
cat ~/.swagger-mcp-server/logs/setup.log

# View server logs
tail -f ~/.swagger-mcp-server/logs/server.log

Getting Help

If you continue to experience issues:

  1. Check Logs: Review logs in ~/.swagger-mcp-server/logs/
  2. System Info: Run swagger-mcp-server system-info
  3. Compatibility: Run swagger-mcp-server check-compatibility
  4. Documentation: Review this guide and the main README
  5. Support: Create an issue with system info and logs

Advanced Configuration

Custom Installation Directory

Currently not supported. Installation always uses ~/.swagger-mcp-server/

Environment Variables

# Custom configuration directory
export SWAGGER_MCP_CONFIG_DIR=/custom/path

# Custom log level
export LOG_LEVEL=DEBUG

# Disable network checks
export SWAGGER_MCP_OFFLINE=true

Integration with System Services

systemd Service (Linux)

# /etc/systemd/system/swagger-mcp-server.service
[Unit]
Description=Swagger MCP Server
After=network.target

[Service]
Type=simple
User=mcp-user
ExecStart=/usr/local/bin/swagger-mcp-server serve
Restart=always

[Install]
WantedBy=multi-user.target

launchd Service (macOS)

<!-- ~/Library/LaunchAgents/com.swagger-mcp-server.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.swagger-mcp-server</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/swagger-mcp-server</string>
        <string>serve</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>

Security Considerations

File Permissions

The installer sets appropriate permissions:

Network Security

Data Privacy

Performance Optimization

Memory Usage

Disk Usage

CPU Usage

Migration and Upgrades

Upgrading

# Upgrade package
pip install --upgrade swagger-mcp-server

# Verify installation
swagger-mcp-server setup --verify

Data Migration

Configuration and data are automatically preserved during upgrades. If manual migration is needed:

# Backup current installation
swagger-mcp-server backup create

# Restore from backup if needed
swagger-mcp-server backup restore <backup-name>

Version Compatibility