Skip to content

Conversation

@jon-daniels-chief
Copy link

@jon-daniels-chief jon-daniels-chief commented Jan 14, 2026

Summary

Adds support for custom task IDs (e.g., CHIEF-5804) in addition to internal IDs (e.g., 86b852ppx). When a custom task ID is detected, the API calls automatically include custom_task_ids=true and team_id parameters as required by the ClickUp API.

Problem

The MCP currently only accepts internal 6-9 character task IDs. Users who use ClickUp's custom task ID feature cannot reference tasks by their custom IDs.

Solution

  • Detect custom task IDs using regex pattern ^[A-Z]+-\d+$ (e.g., CHIEF-5804, PROJ-123)
  • Automatically inject custom_task_ids=true and team_id query parameters for API calls when custom IDs are used
  • Relax validation to accept both formats

Files Changed

  • src/shared/utils.ts: Added isCustomTaskId() helper, updated isTaskId() to validate both formats
  • src/tools/task-tools.ts: Updated validation schema, added custom ID params to loadTaskContent, loadTaskComments, loadTimeInStatusHistory
  • src/tools/task-write-tools.ts: Updated validation for addComment and updateTask, added custom ID params to all API calls (fetch, update, tag add/remove, refresh)
  • src/tools/search-tools.ts: Added custom ID params to direct task fetch fallback
  • src/tools/time-tools.ts: Updated validation for getTimeEntries and createTimeEntry
  • CHANGELOG.md: Documented the feature

Testing Done

  • Build passes: npm run build
  • TypeScript compiles without errors
  • Validation schemas updated for all 6 task-related tools

Test Plan for Reviewer

  • Test getTaskById with custom ID (e.g., CHIEF-5804) - should fetch task correctly
  • Test getTaskById with internal ID (e.g., 86b852ppx) - should still work (backwards compatible)
  • Test updateTask with custom ID
  • Test addComment with custom ID
  • Test searchTasks with custom ID in terms array - should find via direct fetch
  • Test getTimeEntries with custom ID filter
  • Test createTimeEntry with custom ID

Notes

  • The CLICKUP_TEAM_ID env var is already required by this MCP, so no new configuration is needed
  • Custom task IDs are case-insensitive in the regex but ClickUp typically uses uppercase

🤖 Generated with Claude Code

All task-related tools now accept custom task IDs in addition to internal
IDs. When a custom task ID is detected (format: PREFIX-NUMBER), the API
calls automatically include custom_task_ids=true and team_id parameters
as required by the ClickUp API.

Changes:
- Add isCustomTaskId() helper function to detect custom ID format
- Update isTaskId() to validate both internal and custom ID formats
- Relax task_id validation across all tools (getTaskById, updateTask,
  addComment, searchTasks, getTimeEntries, createTimeEntry)
- Inject custom_task_ids=true and team_id params for API calls with custom IDs
- Update tool descriptions to document custom ID support

Co-Authored-By: Claude <noreply@anthropic.com>
@jon-daniels-chief
Copy link
Author

@Nemo64 I tried to add as much context here as possible to make it easy to see.

Also wanted to say thanks cuz I've been using and loving this MCP so far!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant