Skip to content

feat(task-mcp-service): move MCP server to services/ with lib/src split - #231

Open
alex-nsheaps[bot] wants to merge 2 commits into
claude/task-utils-mcp-up-to-datefrom
feat/task-mcp-service
Open

feat(task-mcp-service): move MCP server to services/ with lib/src split#231
alex-nsheaps[bot] wants to merge 2 commits into
claude/task-utils-mcp-up-to-datefrom
feat/task-mcp-service

Conversation

@alex-nsheaps

@alex-nsheaps alex-nsheaps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Splits the task-utils MCP server out of agents#216 into its own PR, per Nate's review comment: "make the mcp server its own pr. Make it follow repo patterns. Make the service entry point in /services/task-mcp-service and use lib/ and package/ etc to properly abstract re-usable bits."

Stacked on agents#216 — merge #216 first, then this.

Changes

  • plugins/claude-code/task-utils/mcp/ removed; server now lives at services/task-mcp-service/
  • services/task-mcp-service/lib/ — generic reusable engine (no task-specific assumptions):
    • lib/git-helper.ts: tryGitAutoCommit, CrudOperation, GitAutoCommitResult — callable by a future ticket-mcp-service with its own commit message
    • lib/store-base.ts: StoreBase<T> (generic flat-YAML CRUD), gitRepoRoot, resolveStoreRoot (parameterized env-var + store-path)
  • services/task-mcp-service/src/ — task-specific layer:
    • src/store.ts: TaskRecord, TaskStatus, TaskStore extends StoreBase<TaskRecord>, buildCommitMessage (chore(tasks):), 2-arg resolveStoreRoot wrapper
    • src/tasks.ts: TaskManager lifecycle engine (0-or-1 in_progress, validation-steps gating)
    • src/validation-steps.ts: unchanged
    • src/server.ts: MCP tool registrations (task_create/update/list/get), jsonResult/errorResult
  • Plugin wiring updated: .mcp.json launch path + hooks.json prewarm path → services/
  • mise.toml: build-task-mcp / test-task-mcp tasks point to services/task-mcp-service/
  • All tests updated with corrected import paths

Reuse path for future ticket-mcp-service

A future ticket-mcp-service provides its own TicketRecord type, env-var name, store sub-path, and buildCommitMessage (chore(tickets):), then reuses lib/git-helper.ts + lib/store-base.ts verbatim. No extraction needed beyond what's here.

Test plan

  • mise run build-task-mcp compiles successfully from services/task-mcp-service/
  • mise run test-task-mcp — all unit + integration tests pass
  • Plugin .mcp.json + hooks.json paths resolve correctly after plugin install
  • TypeScript: bun tsc --noEmit clean in services/task-mcp-service/

🤖 Generated with Claude Code

alex-nsheaps Bot and others added 2 commits June 9, 2026 13:58
…SKILL.md

Line 89 referenced nsheaps/agents/docs/journal/2026/05/16/managing-tasks-example.md
which does not exist. Replaced with generic label per Nate review comment.

Co-Authored-By: Agent Alex Picard <alex-nsheaps[bot]@users.noreply.github.com>
…with lib/src split

Addresses Nate review comment on agents#216: "make the mcp server its own pr.
Make it follow repo patterns. Make the service entry point in
/services/task-mcp-service and use lib/ and package/ etc to properly abstract
re-usable bits."

Changes:
- plugins/claude-code/task-utils/mcp/ → services/task-mcp-service/
- Generic engine extracted to services/task-mcp-service/lib/:
  - lib/git-helper.ts: tryGitAutoCommit, CrudOperation, GitAutoCommitResult
    (no task-specific buildCommitMessage — moved to src/store.ts)
  - lib/store-base.ts: generic StoreBase<T>, gitRepoRoot, resolveStoreRoot
    (parameterized for env-var name + store path)
- Task-specific code in services/task-mcp-service/src/:
  - src/store.ts: TaskRecord, TaskStatus, TaskStore extends StoreBase,
    buildCommitMessage (chore(tasks):), resolveStoreRoot wrapper
  - src/tasks.ts: TaskManager lifecycle engine
  - src/validation-steps.ts: unchanged
  - src/server.ts: MCP tool registrations (jsonResult/errorResult)
- Plugin wiring updated:
  - plugins/claude-code/task-utils/.mcp.json: launch path → services/
  - plugins/claude-code/task-utils/hooks/hooks.json: prewarm path → services/
  - mise.toml: build-task-mcp + test-task-mcp tasks point to services/
- Tests updated with corrected import paths

Co-Authored-By: Agent Alex Picard <alex-nsheaps[bot]@users.noreply.github.com>
alex-nsheaps Bot added a commit that referenced this pull request Jun 9, 2026
…-service (#231)

The MCP server is now its own PR (agents#231) at services/task-mcp-service/
with a lib/src split (generic store-base + git-helper in lib/, task-specific
code in src/). This PR retains only the plugin + hooks.

- Remove plugins/claude-code/task-utils/mcp/ entirely
- Update .mcp.json launch path → services/task-mcp-service/launch.sh
- Update hooks.json prewarm path → services/task-mcp-service/prewarm.sh
- Update mise.toml build-task-mcp / test-task-mcp → services/task-mcp-service/

Co-Authored-By: Agent Alex Picard <alex-nsheaps[bot]@users.noreply.github.com>
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.

0 participants