Skip to main content

WISTX MCP Server - DevOps compliance and pricing context for coding agents

Project description

WISTX - MCP Context Server for DevOps

MCP (Model Context Protocol) server providing compliance, pricing, and best practices context for DevOps infrastructure.

๐ŸŽฏ What is WISTX?

WISTX is an MCP server that provides context to LLMs (Claude, GPT-4, etc.) about:

  • Compliance Requirements (PCI-DSS, HIPAA, CIS, SOC2, NIST, ISO 27001)
  • Infrastructure Pricing (AWS, GCP, Azure)
  • Code Examples (Terraform, Kubernetes, Docker)
  • Best Practices (DevOps, security, cost optimization)

Users interact with WISTX through:

  • MCP Protocol - Native integration with Claude Desktop, Cursor, Windsurf, Google Antigravity
  • REST API - For CI/CD pipelines, scripts, and programmatic access

Features

  • ๐Ÿš€ MCP Server - Native Claude Desktop, Cursor, Windsurf, and Google Antigravity integration
  • ๐Ÿ“Š REST API - Simple HTTP endpoints for context retrieval
  • ๐Ÿ” Vector Search - Semantic search across 50K+ compliance controls
  • ๐Ÿ’ฐ Cost Calculator - Real-time infrastructure pricing
  • ๐Ÿ“ Code Examples - 500K+ Terraform/K8s examples
  • ๐Ÿ” API Key Authentication - Secure access control
  • ๐Ÿ“ˆ Usage Tracking - Monitor API usage and billing
  • โšก One-Click Installation - Available in Antigravity's MCP Server Store

Requirements

  • Python 3.11 or higher
  • uv (install with: curl -LsSf https://astral.sh/uv/install.sh | sh)
  • MongoDB (for data storage)
  • Docker (optional, for containerized deployment)

Installation

Development Setup

  1. Clone the repository:

    git clone <repository-url>
    cd wistx-model
    
  2. Install uv (if not already installed):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  3. Copy environment variables:

    cp .env.example .env
    # Edit .env with your configuration
    # IMPORTANT: Add your OpenAI API key for data processing:
    # OPENAI_API_KEY=your-openai-api-key-here
    
  4. Install the project and dependencies:

    uv sync
    
  5. Run the API server:

    uv run uvicorn api.main:app --reload
    

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Claude Desktop / Cursor / Windsurf /   โ”‚
โ”‚  Google Antigravity                     โ”‚
โ”‚  (User asks: "Create compliant RDS")    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚ MCP Protocol
               โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  WISTX MCP Server                      โ”‚
โ”‚  โ”œโ”€ get_compliance_requirements        โ”‚
โ”‚  โ”œโ”€ calculate_infrastructure_cost       โ”‚
โ”‚  โ”œโ”€ get_devops_infra_code_examples     โ”‚
โ”‚  โ””โ”€ search_best_practices              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  MongoDB Atlas                          โ”‚
โ”‚  โ”œโ”€ compliance_controls (50K+)         โ”‚
โ”‚  โ”œโ”€ pricing_data (105K+)               โ”‚
โ”‚  โ”œโ”€ code_examples (500K+)               โ”‚
โ”‚  โ””โ”€ best_practices (100K+)              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Project Structure

wistx-model/
โ”œโ”€โ”€ api/                          # REST API (FastAPI)
โ”‚   โ”œโ”€โ”€ routers/v1/               # API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ health.py             # GET /health
โ”‚   โ”‚   โ”œโ”€โ”€ usage.py              # GET /v1/usage
โ”‚   โ”‚   โ”œโ”€โ”€ compliance.py         # GET /v1/compliance (TODO)
โ”‚   โ”‚   โ”œโ”€โ”€ pricing.py            # GET /v1/pricing (TODO)
โ”‚   โ”‚   โ””โ”€โ”€ code.py               # GET /v1/code-examples (TODO)
โ”‚   โ”œโ”€โ”€ middleware/               # API middleware
โ”‚   โ”‚   โ”œโ”€โ”€ auth.py               # API key authentication
โ”‚   โ”‚   โ”œโ”€โ”€ rate_limit.py         # Rate limiting
โ”‚   โ”‚   โ””โ”€โ”€ logging.py            # Request logging
โ”‚   โ”œโ”€โ”€ services/                 # Business logic
โ”‚   โ”‚   โ”œโ”€โ”€ billing_service.py   # Billing logic
โ”‚   โ”‚   โ”œโ”€โ”€ usage_tracker.py      # Usage tracking
โ”‚   โ”‚   โ””โ”€โ”€ token_counter.py      # Token counting
โ”‚   โ”œโ”€โ”€ database/                 # MongoDB connection
โ”‚   โ””โ”€โ”€ auth/                     # Authentication
โ”‚
โ”œโ”€โ”€ wistx_mcp/                    # MCP Server (TODO - Week 5)
โ”‚   โ”œโ”€โ”€ server.py                 # MCP server main
โ”‚   โ””โ”€โ”€ tools/                    # MCP tools
โ”‚       โ”œโ”€โ”€ compliance.py         # Compliance context
โ”‚       โ”œโ”€โ”€ pricing.py            # Pricing context
โ”‚       โ”œโ”€โ”€ code_examples.py      # Code examples
โ”‚       โ””โ”€โ”€ lib/                  # Shared utilities
โ”‚           โ”œโ”€โ”€ mongodb_client.py # MongoDB queries
โ”‚           โ”œโ”€โ”€ vector_search.py  # Vector search
โ”‚           โ””โ”€โ”€ context_builder.py # Context formatting
โ”‚
โ”œโ”€โ”€ data-pipelines/               # Data collection & processing
โ”‚   โ”œโ”€โ”€ collectors/               # Data collectors
โ”‚   โ”œโ”€โ”€ processors/               # Data processors
โ”‚   โ”œโ”€โ”€ loaders/                  # MongoDB loaders
โ”‚   โ””โ”€โ”€ models/                   # Data models
โ”‚
โ”œโ”€โ”€ scripts/                       # Utility scripts
โ”‚   โ”œโ”€โ”€ setup_mongodb.py          # MongoDB setup
โ”‚   โ”œโ”€โ”€ run_compliance_collection.py  # Data collection
โ”‚   โ””โ”€โ”€ validate_mongodb_complete.py  # Validation
โ”‚
โ”œโ”€โ”€ tests/                        # Test suite
โ”œโ”€โ”€ pyproject.toml                # Project configuration
โ”œโ”€โ”€ docker-compose.yml            # Docker Compose setup
โ””โ”€โ”€ README.md

Data Processing Pipeline

The data processing pipeline collects, processes, embeds, and loads compliance data into MongoDB and Pinecone.

Prerequisites

  1. Environment Variables - Ensure your .env file includes:

    # Required for data processing
    OPENAI_API_KEY=your-openai-api-key-here
    MONGODB_URL=mongodb://localhost:27017
    MONGODB_DATABASE=wistx-production
    PINECONE_API_KEY=your-pinecone-api-key
    PINECONE_INDEX_NAME=wistx-index
    
  2. MongoDB Setup - Initialize MongoDB collections and indexes:

    python scripts/setup_mongodb.py
    
  3. Dependencies - Install required packages:

    uv sync
    # Optional: For PDF processing
    uv add docling
    

Running the Pipeline

Process a single compliance standard (full pipeline):

python scripts/run_pipeline.py --standard PCI-DSS --mode streaming

Process all compliance standards:

python scripts/run_pipeline.py --mode streaming

Skip collection stage (use existing raw data):

python scripts/run_pipeline.py --standard PCI-DSS --mode streaming --no-collection

Development mode (saves intermediate files for debugging):

python scripts/run_pipeline.py --standard PCI-DSS --mode checkpointing

Pipeline Modes

  • Streaming Mode (--mode streaming): Production mode - no intermediate files saved, faster execution
  • Checkpointing Mode (--mode checkpointing): Development mode - saves intermediate files at each stage for debugging and resuming

Available Standards

  • PCI-DSS, CIS, HIPAA, SOC2, NIST-800-53, ISO-27001, GDPR, FedRAMP, CCPA, SOX, GLBA

Pipeline Stages

  1. Collection - Scrapes URLs/web pages (Crawl4AI) and processes PDFs (Docling)
  2. Processing - Standardizes raw data into ComplianceControl models
  3. Embedding - Generates vector embeddings using OpenAI API
  4. Loading - Stores documents in MongoDB and vectors in Pinecone

For detailed pipeline documentation, see data-pipelines/HOW_TO_RUN_PIPELINE.md

Development

Running Tests

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov

# Run specific test file
uv run pytest tests/api/test_messages.py

Code Quality

# Format code with black
uv run black .

# Lint with ruff
uv run ruff check .

# Type check with mypy
uv run mypy .

Adding Dependencies

# Add a runtime dependency
uv add <package-name>

# Add a development dependency
uv add --group dev <package-name>

Docker Deployment

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

API Endpoints

Current

  • GET /health - Health check
  • GET /v1/usage - Get usage statistics

Planned (Week 6)

  • GET /v1/compliance - Get compliance requirements
  • GET /v1/pricing - Calculate infrastructure costs
  • GET /v1/code-examples - Search code examples
  • GET /v1/best-practices - Search best practices

OpenAPI Specification

The REST API exposes an OpenAPI specification:

SDKs can be generated from the OpenAPI spec using openapi-generator if needed.

The MCP server provides these tools:

  • get_compliance_requirements - Get compliance controls for resources
  • calculate_infrastructure_cost - Calculate costs for infrastructure
  • get_code_examples - Get relevant code examples
  • search_best_practices - Search DevOps best practices
  • check_compliance_violations - Check code for compliance issues
  • suggest_cost_optimizations - Suggest cost savings

Documentation

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wistx_mcp-1.0.4.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wistx_mcp-1.0.4-py3-none-any.whl (323.5 kB view details)

Uploaded Python 3

File details

Details for the file wistx_mcp-1.0.4.tar.gz.

File metadata

  • Download URL: wistx_mcp-1.0.4.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for wistx_mcp-1.0.4.tar.gz
Algorithm Hash digest
SHA256 126521d59510200b71d1b69cb232911f4f17f71894ea50260fcd19dc09487fbd
MD5 fdb797c40f2ed309a0bbf0662fcf9a3a
BLAKE2b-256 f84a97899dda20e446983f12607facb4d26839b01547a621d711e57af5637ec7

See more details on using hashes here.

File details

Details for the file wistx_mcp-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: wistx_mcp-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 323.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for wistx_mcp-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bfdd8391cbc01f62870064a9f4a4184afcd5a10e2435548d422ea86c551db91f
MD5 8b1a6e9f06d312f5213304364c776b2b
BLAKE2b-256 d0ee1786ea8e5203c96fb1ab7af3e3c451af2c97d03a43bc7977ec64bfe6baa8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page