compass-mcp-core
v1.0.0
Published
Core MCP abstractions for Knowledge Base Platform - OneDrive, Excel, Auth
Downloads
111
Maintainers
Readme
compass-mcp-core
Core MCP abstractions for Knowledge Base Platform.
Features
- OneDrive Storage Adapter: Read/write files to OneDrive Business
- Azure Service Principal Auth: Authentication via Azure AD
- Excel Handler: Parse and generate Excel files
- SQLite Cache: Local caching for offline support
- Polling Sync: Background synchronization
Installation
npm install compass-mcp-coreUsage
import {
OneDriveStorageAdapter,
ServicePrincipalAuth,
SqliteCache,
PollingSync,
ExcelHandler
} from 'compass-mcp-core';
// Setup authentication
const auth = new ServicePrincipalAuth({
tenantId: 'your-tenant-id',
clientId: 'your-client-id',
clientSecret: 'your-client-secret'
});
// Setup storage adapter
const storage = new OneDriveStorageAdapter({
tenantId: 'your-tenant-id',
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
userId: '[email protected]',
rootFolderPath: '/Documents',
cacheProvider: new SqliteCache('./cache.db'),
syncStrategy: new PollingSync({ intervalMinutes: 5 })
}, auth);
await storage.initialize();
// Read file
const content = await storage.getFileContent('/path/to/file.xlsx');
// Parse Excel
const handler = new ExcelHandler();
const data = await handler.parse(content);Dependencies
@azure/identity- Azure authentication@microsoft/microsoft-graph-client- Microsoft Graph APIexceljs- Excel file handlingsqlite3- Local caching
License
MIT
