ssbean/corrigo-mcp-server
If you are the rightful owner of corrigo-mcp-server 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.
The Corrigo MCP Server provides secure access to the Corrigo Enterprise API for facilities management and maintenance operations.
Corrigo MCP Server
A Model Context Protocol (MCP) server that provides secure access to the Corrigo Enterprise API for facilities management and maintenance operations.
Features
- OAuth 2.0 Authentication - Secure client credentials flow with automatic token refresh
- Flexible Configuration - Support for direct domain configuration or automatic URL discovery
- Token Management - Automatic caching and refresh of API tokens (20-minute expiration)
- Error Handling - Comprehensive error handling with retry logic for failed requests
- Type Safety - Full TypeScript support with proper type definitions
Quick Start
1. Installation
npm install
2. Configuration
Copy the example environment file and configure your Corrigo API credentials:
cp .env.example .env
Edit .env
with your Corrigo API credentials:
# Required: OAuth credentials from your Corrigo administrator
CORRIGO_CLIENT_ID=your_client_id_here
CORRIGO_CLIENT_SECRET=your_client_secret_here
CORRIGO_COMPANY_NAME=your_company_name_here
# Optional: If you know your specific domain (recommended for performance)
CORRIGO_BASE_DOMAIN=your_domain.corrigo.com
3. Test Authentication
npm run test:auth
4. Start the Server
npm run dev
Configuration Options
Required Environment Variables
CORRIGO_CLIENT_ID
- OAuth client ID provided by your Corrigo administratorCORRIGO_CLIENT_SECRET
- OAuth client secret provided by your Corrigo administratorCORRIGO_COMPANY_NAME
- Your company's name in the Corrigo system
Optional Environment Variables
CORRIGO_BASE_DOMAIN
- Your company's specific Corrigo domain (e.g.,yourcompany.corrigo.com
)- If provided, the server will use this domain directly
- If not provided, the server will use URL discovery to find the correct endpoints
API Usage
The server provides a CorrigoApiClient
class for making authenticated requests to the Corrigo API:
import { CorrigoApiClient } from './auth';
const client = new CorrigoApiClient();
// Get a specific work order
const workOrder = await client.get('WorkOrder/12345');
// Query work orders
const workOrders = await client.get('WorkOrder?$top=10&$filter=Status eq "Open"');
// Create a new work order
const newWorkOrder = await client.post('WorkOrder', {
Description: 'New work order',
Priority: 'High'
});
Available Tools
getWorkOrders
- Retrieve work orders with filtering and pagination support
Authentication Flow
- Token Request - Uses OAuth 2.0 client credentials flow to obtain access token
- URL Discovery - Automatically discovers correct API endpoints for your company (if domain not configured)
- API Calls - Makes authenticated requests with proper company headers
- Token Refresh - Automatically refreshes tokens before expiration (20-minute lifetime)
Error Handling
The client includes comprehensive error handling for:
- Invalid credentials
- Token expiration and refresh
- Network connectivity issues
- API rate limiting
- Invalid company names
Development
Build
npm run build
Run Production Server
npm run start
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test authentication with
npm run test:auth
- Submit a pull request
Support
For issues related to:
- Corrigo API credentials: Contact your Corrigo system administrator
- Server configuration: Check the environment variables and company name
- Bug reports: Create an issue in this repository
License
MIT License - see LICENSE file for details