Blufix/it-glue-mcp-project
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:
- Streamlit UI: http://localhost:8501
- API Documentation: http://localhost:8002/docs
- Grafana Dashboard: http://localhost:3000 (admin/admin)
๐ 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
- Prometheus Metrics: http://localhost:9090
- Grafana Dashboards: http://localhost:3000
- Flower (Celery): http://localhost:5555
๐ข 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - 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 stringNEO4J_URI
: Neo4j connection URIREDIS_URL
: Redis connection URLOPENAI_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
-
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
- Check that all required services are running:
-
No data returned from queries
- Ensure initial sync has completed
- Check IT Glue API key is valid
- Verify database connections
-
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
- Built with the Model Context Protocol
- Powered by IT Glue API
- Uses OpenAI embeddings for semantic search
๐ 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