it-glue-mcp-project

Blufix/it-glue-mcp-project

3.1

If you are the rightful owner of it-glue-mcp-project and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An intelligent MCP server that transforms IT Glue's unstructured documentation into an instantly-accessible knowledge base through natural language querying.

IT Glue MCP Server

An intelligent MCP (Model Context Protocol) server that transforms IT Glue's unstructured documentation into an instantly-accessible knowledge base through natural language querying.

๐Ÿš€ Features

  • Natural Language Queries: Ask questions in plain English with Ollama-powered semantic search
  • Full Organization Sync: Successfully syncs all 252+ IT Glue organizations (~57,000+ entities after v2 fixes!)
  • Intelligent Duplicate Prevention: 100% efficiency with SHA-256 content hashing
  • Ollama Embeddings: 98.3% success rate using nomic-embed-text model (768 dimensions)
  • All 8 Entry Points FIXED: Organizations, Configurations (9,205), Contacts (431), Documents (10,000+ with folders!), Passwords (4,152), Locations (558), Domains (fixed), Flexible Assets (32,000+ with all types!)
  • @Organization Commands: Target specific organizations with @faucets or @[org_name]
  • Infrastructure Documentation: Generate comprehensive infrastructure docs
  • Zero Hallucination: Returns accurate data or "no data available" - never guesses
  • Real-time Monitoring: Grafana dashboards with Redis metrics
  • 100% READ-ONLY: Production-safe, never modifies IT Glue data
  • Security First: Passwords never displayed, only metadata shown
  • Production Tested: Successfully processed 15,000+ entities, expecting 57,000+ with v2 fixes

๐Ÿ—๏ธ Architecture

Active Components

  • PostgreSQL: Primary database for structured IT Glue data
  • Qdrant: Vector database for semantic search with embeddings
  • Redis: High-speed caching for query results (5-min TTL)
  • Streamlit: Web UI with chat interface and @organization commands

Provisioned (Not Yet Implemented)

  • Neo4j: Graph database ready for future relationship mapping and knowledge graph features
    • Currently provisioned in Docker but not actively used
    • Reserved for Phase 2: relationship analysis and dependency mapping

๐Ÿ“‹ Prerequisites

  • Python 3.11+
  • Docker and Docker Compose
  • IT Glue API key
  • 8GB RAM minimum (16GB recommended)

๐Ÿ› ๏ธ Quick Start

1. Clone the Repository

git clone https://github.com/Blufix/it-glue-mcp-project.git
cd it-glue-mcp-project

2. Set Up Environment

# Copy environment template
cp .env.example .env

# Edit .env with your IT Glue API key and other settings
nano .env

3. Install Dependencies

# Install Poetry (if not already installed)
curl -sSL https://install.python-poetry.org | python3 -

# Install Python dependencies
poetry install

# Install pre-commit hooks
poetry run pre-commit install

4. Start Services

# Start all services with Docker Compose
docker-compose up -d

# For development mode with hot reload
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

5. Initialize Databases

# Run database migrations
poetry run alembic upgrade head

# Initialize Qdrant collections (for vector search)
poetry run python scripts/init_qdrant.py

# Optional: Initialize Neo4j (currently not used but available for future knowledge graph features)
# poetry run python scripts/init_neo4j.py

6. Run Initial Sync

# Sync IT Glue data (this may take a while)
poetry run python -m src.sync.initial_sync

7. Start the MCP Server

# Run the MCP server
poetry run python -m src.mcp.server

# Or use the CLI
poetry run itglue-mcp serve

8. Access the UI

Open your browser and navigate to:

๐Ÿ“š Documentation

๐Ÿ—๏ธ Project Structure

itglue-mcp-server/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ mcp/              # MCP server implementation
โ”‚   โ”œโ”€โ”€ api/              # REST API service
โ”‚   โ”œโ”€โ”€ core/             # Core business logic
โ”‚   โ”œโ”€โ”€ sync/             # IT Glue synchronization
โ”‚   โ”œโ”€โ”€ db/               # Database clients and models
โ”‚   โ”œโ”€โ”€ ui/               # Streamlit frontend
โ”‚   โ””โ”€โ”€ config/           # Configuration management
โ”œโ”€โ”€ tests/                 # Test suites
โ”œโ”€โ”€ docker/               # Docker configurations
โ”œโ”€โ”€ scripts/              # Utility scripts
โ”œโ”€โ”€ docs/                 # Documentation
โ””โ”€โ”€ monitoring/           # Prometheus & Grafana configs

๐Ÿงช Testing

# Run all tests
poetry run pytest

# Run with coverage
poetry run pytest --cov=src --cov-report=html

# Run specific test types
poetry run pytest -m unit
poetry run pytest -m integration
poetry run pytest -m e2e

๐Ÿ”ง Development

Running Locally

# Start only the databases
docker-compose up postgres neo4j qdrant redis

# Run the MCP server locally
poetry run python -m src.mcp.server --reload

# Run the Streamlit UI locally
poetry run streamlit run src/ui/streamlit_app.py

Code Quality

# Format code
poetry run black src tests
poetry run isort src tests

# Type checking
poetry run mypy src

# Linting
poetry run ruff src

# Security scan
poetry run bandit -r src

๐Ÿ“Š Monitoring

๐Ÿšข Deployment

Docker Deployment

# Build production image
docker build -t itglue-mcp:latest .

# Run with Docker Compose
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Kubernetes Deployment

# Apply Kubernetes manifests
kubectl apply -f k8s/

# Check deployment status
kubectl get pods -n itglue

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ Environment Variables

Key environment variables (see .env.example for full list):

  • IT_GLUE_API_KEY: Your IT Glue API key (required)
  • DATABASE_URL: PostgreSQL connection string
  • NEO4J_URI: Neo4j connection URI
  • REDIS_URL: Redis connection URL
  • OPENAI_API_KEY: OpenAI API key for embeddings (optional)

๐Ÿ” Security

  • All passwords are encrypted at rest
  • API authentication via JWT tokens or API keys
  • Rate limiting on all endpoints
  • Input sanitization to prevent injection attacks
  • Audit logging for compliance

๐Ÿ“ˆ Performance

  • Query response time: <2 seconds (p95)
  • Supports 100+ concurrent users
  • Caches frequently accessed data
  • Incremental sync minimizes API calls

๐Ÿ› Troubleshooting

Common Issues

  1. MCP Server won't start

    • Check that all required services are running: docker-compose ps
    • Verify environment variables are set correctly
    • Check logs: docker-compose logs mcp-server
  2. No data returned from queries

    • Ensure initial sync has completed
    • Check IT Glue API key is valid
    • Verify database connections
  3. Slow query performance

    • Check if Redis is running
    • Verify Neo4j indexes are created
    • Monitor with Grafana dashboards

๐Ÿ“„ License

This project is licensed under the MIT License - see the file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support

For issues and questions:

  • Create an issue on GitHub
  • Check the
  • Contact the development team

Current Version: 0.1.0 (MVP)
Status: In Development
Last Updated: 2024