Jake Shore 7ee40342c8 Clover: Complete MCP server with 50+ tools and 18 React apps
- API client with Clover REST API v3 integration (OAuth2 + API key auth)
- 50+ comprehensive tools across 10 categories:
  * Orders: list, get, create, update, delete, add/remove line items, discounts, payments, fire order
  * Inventory: items, categories, modifiers, stock management
  * Customers: CRUD, search, addresses, payment cards
  * Employees: CRUD, roles, shifts, clock in/out
  * Payments: list, get, refunds
  * Merchants: settings, devices, tender types
  * Discounts: CRUD operations
  * Taxes: CRUD, tax rates
  * Reports: sales summary, revenue by item/category, employee performance
  * Cash: cash drawer tracking and events

- 18 React MCP apps with full UI:
  * Order management: dashboard, detail, grid
  * Inventory: dashboard, detail, category manager
  * Customer: detail, grid
  * Employee: dashboard, schedule
  * Payment history
  * Analytics: sales dashboard, revenue by item, revenue by category
  * Configuration: discount manager, tax manager, device manager
  * Cash drawer

- Complete TypeScript types for Clover API
- Pagination support with automatic result fetching
- Comprehensive error handling
- Full README with examples and setup guide
2026-02-12 17:42:59 -05:00

47 lines
1.2 KiB
JavaScript

#!/usr/bin/env node
import { CloverServer } from './server.js';
import { CloverConfig } from './types/index.js';
function getConfig(): CloverConfig {
const merchantId = process.env.CLOVER_MERCHANT_ID;
const apiKey = process.env.CLOVER_API_KEY;
const accessToken = process.env.CLOVER_ACCESS_TOKEN;
const environment = (process.env.CLOVER_ENVIRONMENT || 'sandbox') as 'sandbox' | 'production';
if (!merchantId) {
console.error('Error: CLOVER_MERCHANT_ID environment variable is required');
process.exit(1);
}
if (!apiKey && !accessToken) {
console.error('Error: Either CLOVER_API_KEY or CLOVER_ACCESS_TOKEN must be set');
process.exit(1);
}
return {
merchantId,
apiKey,
accessToken,
environment,
};
}
async function main() {
try {
const config = getConfig();
const server = new CloverServer(config);
console.error('Clover MCP Server starting...');
console.error(`Merchant ID: ${config.merchantId}`);
console.error(`Environment: ${config.environment}`);
console.error('Server running. Ready for MCP connections.');
await server.run();
} catch (error: any) {
console.error('Fatal error:', error.message);
process.exit(1);
}
}
main();