@chykalophia/clickup-mcp-shared
v1.1.6
Published
Shared utilities, types, and schemas for ClickUp MCP Server packages
Downloads
5
Maintainers
Readme
ClickUp MCP Shared Utilities
Shared utilities, types, and schemas for ClickUp MCP Server packages. This package provides common functionality used across the ClickUp MCP ecosystem.
📦 What's Included
TypeScript Types
- ClickUp API Types: Complete type definitions for ClickUp API responses
- MCP Protocol Types: Model Context Protocol interface definitions
- Shared Interfaces: Common interfaces used across packages
Validation Schemas
- Zod Schemas: Runtime validation for API requests and responses
- Input Validation: Sanitization and security validation helpers
- Type Guards: Runtime type checking utilities
Utility Functions
- API Helpers: Common ClickUp API interaction utilities
- Error Handling: Standardized error processing and formatting
- Security Utils: Input sanitization and validation functions
🚀 Installation
npm install @chykalophia/clickup-mcp-shared🛠️ Usage
Import Types
import {
ClickUpTask,
ClickUpList,
ClickUpSpace,
MCPToolResponse
} from '@chykalophia/clickup-mcp-shared';Use Validation Schemas
import { TaskSchema, ListSchema } from '@chykalophia/clickup-mcp-shared';
// Validate task data
const validatedTask = TaskSchema.parse(taskData);Utility Functions
import {
sanitizeInput,
validateApiToken,
formatClickUpError
} from '@chykalophia/clickup-mcp-shared';
// Sanitize user input
const cleanInput = sanitizeInput(userInput);
// Validate API token
const isValid = validateApiToken(token);📋 Key Features
Type Safety
- Complete ClickUp API coverage with TypeScript types
- Runtime validation with Zod schemas
- Type guards for safe type checking
Security
- Input sanitization to prevent XSS and injection attacks
- API token validation with format checking
- URL validation with protocol and domain restrictions
Consistency
- Standardized error handling across all packages
- Common interfaces for consistent API design
- Shared validation logic to prevent duplication
🔧 Development
This package is primarily intended for use by other ClickUp MCP packages, but can be used independently for ClickUp API integration projects.
Building
npm run buildTesting
npm testLinting
npm run lint🤝 Related Packages
- @chykalophia/clickup-mcp-server - Core ClickUp integration (177+ tools)
- @chykalophia/clickup-intelligence-mcp-server - AI-powered project intelligence
📚 API Reference
Types
ClickUpTask- Complete task object with all propertiesClickUpList- List object with metadata and settingsClickUpSpace- Space object with features and permissionsClickUpUser- User object with profile informationMCPToolResponse- Standard MCP tool response format
Schemas
TaskSchema- Zod schema for task validationListSchema- Zod schema for list validationCommentSchema- Zod schema for comment validationAttachmentSchema- Zod schema for attachment validation
Utilities
sanitizeInput(input: any): any- Sanitize user inputvalidateApiToken(token: string): boolean- Validate ClickUp API tokenformatClickUpError(error: any): string- Format ClickUp API errorsgenerateRequestId(): string- Generate unique request identifiers
📄 License
MIT - see LICENSE file for details.
