@taazkareem/clickup-mcp-server 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/license.js CHANGED
@@ -8,10 +8,16 @@
8
8
  * This endpoint is public and doesn't require authentication.
9
9
  */
10
10
  import axios from 'axios';
11
- // Your Polar.sh organization ID
12
- const POLAR_ORGANIZATION_ID = 'cd9f6f7c-5b51-4e5e-872b-c92dd9377bcd';
11
+ // Your Polar.sh organization ID (configurable for sandbox testing)
12
+ // Production: cd9f6f7c-5b51-4e5e-872b-c92dd9377bcd
13
+ // Sandbox: 574925db-40b9-49dd-a02e-ceb1124367d3
14
+ const POLAR_ORGANIZATION_ID = process.env.POLAR_ORGANIZATION_ID || 'cd9f6f7c-5b51-4e5e-872b-c92dd9377bcd';
15
+ // Auto-detect sandbox vs production based on org ID
16
+ const SANDBOX_ORG_ID = '574925db-40b9-49dd-a02e-ceb1124367d3';
17
+ const isSandbox = POLAR_ORGANIZATION_ID === SANDBOX_ORG_ID;
13
18
  // Polar.sh API endpoint for license validation (public, no auth required)
14
- const POLAR_VALIDATE_URL = 'https://api.polar.sh/v1/customer-portal/license-keys/validate';
19
+ const POLAR_API_BASE = isSandbox ? 'https://sandbox-api.polar.sh/v1' : 'https://api.polar.sh/v1';
20
+ const POLAR_VALIDATE_URL = process.env.POLAR_API_URL || `${POLAR_API_BASE}/customer-portal/license-keys/validate`;
15
21
  // Purchase link for error messages
16
22
  const PURCHASE_URL = 'https://buy.polar.sh/polar_cl_3xQojQLgzQXKCLzsxc49YfL6z8hzSBBqh9ivy1qZdwW';
17
23
  // Global license status - validated once at startup
@@ -74,6 +80,10 @@ async function validateLicenseKey(licenseKey) {
74
80
  };
75
81
  }
76
82
  try {
83
+ console.error(`🔍 Validating license key with Polar.sh...`);
84
+ console.error(` API URL: ${POLAR_VALIDATE_URL}`);
85
+ console.error(` Org ID: ${POLAR_ORGANIZATION_ID}`);
86
+ console.error(` Key: ${licenseKey.substring(0, 10)}...`);
77
87
  const response = await axios.post(POLAR_VALIDATE_URL, {
78
88
  key: licenseKey.trim(),
79
89
  organization_id: POLAR_ORGANIZATION_ID
@@ -84,12 +94,14 @@ async function validateLicenseKey(licenseKey) {
84
94
  timeout: 10000 // 10 second timeout
85
95
  });
86
96
  const data = response.data;
97
+ console.error(`📋 Polar response status: ${data.status}`);
87
98
  // Check license status
88
99
  if (data.status === 'granted') {
89
100
  // Check expiration
90
101
  if (data.expires_at) {
91
102
  const expiresAt = new Date(data.expires_at);
92
103
  if (expiresAt < new Date()) {
104
+ console.error(`❌ License expired at: ${data.expires_at}`);
93
105
  return {
94
106
  isValid: false,
95
107
  status: 'expired',
@@ -98,6 +110,7 @@ async function validateLicenseKey(licenseKey) {
98
110
  };
99
111
  }
100
112
  }
113
+ console.error(`✅ License granted for: ${data.customer?.email || 'unknown'}`);
101
114
  return {
102
115
  isValid: true,
103
116
  status: 'granted',
@@ -105,6 +118,7 @@ async function validateLicenseKey(licenseKey) {
105
118
  expiresAt: data.expires_at
106
119
  };
107
120
  }
121
+ console.error(`❌ License not granted, status: ${data.status}`);
108
122
  return {
109
123
  isValid: false,
110
124
  status: data.status,
@@ -112,9 +126,12 @@ async function validateLicenseKey(licenseKey) {
112
126
  };
113
127
  }
114
128
  catch (error) {
129
+ console.error(`❌ License validation error:`, error.message);
115
130
  // Handle specific error cases
116
131
  if (error.response) {
117
132
  const status = error.response.status;
133
+ console.error(` HTTP Status: ${status}`);
134
+ console.error(` Response:`, JSON.stringify(error.response.data, null, 2));
118
135
  if (status === 404) {
119
136
  return {
120
137
  isValid: false,
package/build/server.log CHANGED
@@ -1,15 +1 @@
1
1
  Logging initialized to /Volumes/Code/Projects/MCP/clickup-mcp-server/build/server.log
2
- [2025-12-24T23:37:55.704Z] [PID:59029] ERROR: [ClickUp:TaskService] Authorization failed for /list/901309789109/task/86ae4175p
3
- {
4
- "path": "/list/901309789109/task/86ae4175p",
5
- "status": 403,
6
- "method": "POST",
7
- "requestData": {}
8
- }
9
- [2025-12-24T23:38:50.385Z] [PID:59029] ERROR: [ClickUp:TaskService] Authorization failed for /list/901309789109/task/86ae4175p
10
- {
11
- "path": "/list/901309789109/task/86ae4175p",
12
- "status": 403,
13
- "method": "POST",
14
- "requestData": {}
15
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taazkareem/clickup-mcp-server",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "ClickUp MCP Server - Integrate ClickUp tasks with AI through Model Context Protocol",
5
5
  "type": "module",
6
6
  "main": "build/index.js",