Skip to content

Add MCP blueprint management tools#6

Draft
hookdump wants to merge 5 commits into
mainfrom
xdev-2316-crud-for-blueprints
Draft

Add MCP blueprint management tools#6
hookdump wants to merge 5 commits into
mainfrom
xdev-2316-crud-for-blueprints

Conversation

@hookdump
Copy link
Copy Markdown

@hookdump hookdump commented May 20, 2026

Summary

  • Add MCP tools for cancel flow blueprint management:
    • list_blueprints
    • get_blueprint
    • update_blueprint_draft
    • publish_blueprint
  • Add MCP tools for cancel flow segment management:
    • list_segments
    • reorder_segments
  • Keep writes intentionally split between draft-only updates and explicit confirmed live-impacting actions.
  • Document that list_blueprints returns the current flow inventory with compact draft/published metadata, not full historical blueprint payloads.
  • Document that passing a published blueprint ID to draft update or publish resolves to the corresponding working copy through the API.
  • Restrict draft blueprint updates to supported fields and reject unknown update keys at the MCP schema layer.
  • Document the new MCP operations in the README and changelog.
  • Add a package-local Vitest harness for @churnkey/mcp.
  • Add pnpm test:mcp for local API smoke testing against http://localhost:3000/v1 with --app-id and --api-key flags.

API dependency

Depends on companion API PR: https://github.com/churnkey/churnkey-api/pull/836

Linear

Related PRs

Tests

  • Blueprint tool unit tests cover endpoint routing, draft update body shape, allowed update schema, invalid brand-image URL rejection, unknown update field rejection, and publish confirmation enforcement.
  • Segment tool unit tests cover endpoint routing, reorder body shape, non-empty segment IDs, and reorder confirmation enforcement.
  • Query-builder regression tests cover not filter flattening, null/undefined omission, and breakdownBy serialization.

Validation

  • pnpm test:mcp --help
  • node --check packages/mcp/scripts/test-mcp.mjs
  • pnpm --filter @churnkey/mcp test — 3 files / 11 tests passed.
  • pnpm --filter @churnkey/mcp typecheck
  • pnpm --filter @churnkey/mcp build
  • pnpm exec biome check packages/mcp
  • Pre-push hook passed full SDK turbo typecheck and turbo test.

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