Skip to content

feat: add MCP prompts and resources to consent server#81

Open
michaelfarrell76 wants to merge 16 commits intomainfrom
michaelfarrell76/adds-consent-prompts
Open

feat: add MCP prompts and resources to consent server#81
michaelfarrell76 wants to merge 16 commits intomainfrom
michaelfarrell76/adds-consent-prompts

Conversation

@michaelfarrell76
Copy link
Copy Markdown
Member

@michaelfarrell76 michaelfarrell76 commented Apr 10, 2026

Note to Reviewer

I could use a deep review on this one - works really well! but still figuring out where to put what.

some questions for reviewers:

  1. how do we feel about fetching the resources from our docs? @bencmbrook i wonder if there is a better way to do this to go directly to the content rather than trying to parse the hetml
  2. do we feel that the isolation of the built-in mcp skills vs referencing to doc vs inlining of stuff from our docs splits make sense?
  3. how do the skills look like in this repo itself outside of the mcp? the idea of those is to demonstrate how a customer could define their own skill. the goal would be that it needs to define very little about how to interact with transcend for common workflows, but it would be flexible enough to allow them to integrate their other mcps and skills internally to, for example, try to find the internal code owner of a specific cookie or data flow

Summary

  • Adds MCP prompts (workflow templates) and resources (reference data) support to mcp-server-corecreateMCPServer now accepts optional getPrompts / getResources factories and registers prompts/list, prompts/get, resources/list, resources/read handlers
  • Adds 3 consent prompt templates: consent-triage (full triage workflow), consent-research-tracker (classification research), consent-inspect-site (live site investigation via DevTools)
  • Adds 1 consent resource: classification-guide (tracking purpose reference)
  • Adds Cursor skill (consent-triage) and 2 custom agent definitions for parallel research and site inspection
  • New PromptDefinition, PromptMessage, PromptArgument, ResourceDefinition types exported from mcp-server-core

Test plan

  • Run pnpm typecheck — both mcp-server-core and mcp-server-consent pass
  • Run the consent MCP server and verify prompts/list returns 3 prompts
  • Verify resources/list returns the classification guide resource
  • Test prompts/get for consent-triage with default args and custom triage_type/batch_size
  • Test resources/read for consent://classification-guide
  • Verify existing tool functionality is unaffected

Made with Cursor

michaelfarrell76 and others added 8 commits April 9, 2026 16:55
* feat: add background-task skill and worktree shell helpers

Add a background-task skill for parallel worktree workflows, along with
safe shell helper functions (worktree-git, worktree-rm, gempty-branches)
that are auto-loaded via the existing preToolUse hook. Update the
commit-and-push rule to document worktree commands and add .worktrees
to .gitignore.

* chore: remove gempty-branches helper

Not needed for this repo. Remove the shell function and all references
from the skill and commit-and-push rule.

* style: format SKILL.md
…ivacy-types (#79)

* refactor: deduplicate enums and replace inline strings with shared privacy-types

- Add CookieOrderField, DataFlowOrderField, DataFlowType, TriageAction,
  ConsentTrackerType to @transcend-io/privacy-types
- Create shared schemas.ts in mcp-server-consent and mcp-server-dsr to
  deduplicate z.nativeEnum wrappers (ConsentTrackerStatusEnum,
  OrderDirectionEnum, RequestTypeEnum)
- Replace z.string() with z.nativeEnum() for order_field params in
  consent_list_cookies and consent_list_data_flows
- Replace inline z.enum(['APPROVE','JUNK']) and z.enum(['cookie','data_flow'])
  with shared TriageAction and ConsentTrackerType enums
- Replace z.enum(['DRAFT','PUBLISHED']) with AssessmentFormTemplateStatus
- Replace z.array(z.string()) scopes with z.array(z.nativeEnum(ScopeName))
- Replace z.string() identifierType with z.nativeEnum(IdentifierType) in
  preferences tools
- Add @transcend-io/privacy-types dependency to mcp-server-admin and
  mcp-server-preferences

* chore: add changeset for privacy-types enum additions

* refactor: inline z.nativeEnum, remove shared schemas, enhance admin_create_api_key

- Remove schemas.ts from mcp-server-consent and mcp-server-dsr; inline
  z.nativeEnum() directly in each tool file
- Enrich admin_create_api_key tool description with TRANSCEND_SCOPES
  metadata (title, description, dependency info for every scope)

* revert: keep identifierType as z.string() in preferences tools
- Register getConsentPrompts and getConsentResources in cli.ts createMCPServer call (were defined but never wired up)
- Export getConsentPrompts and getConsentResources from package index
- Remove duplicate .worktrees entry in .gitignore
- Remove unnecessary eslint-disable comments
- Fix conditional blank lines in triage prompt template
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 10, 2026

Open in StackBlitz

@transcend-io/cli

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/cli@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/cli@81.tgz

@transcend-io/privacy-types

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/privacy-types@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/privacy-types@81.tgz

@transcend-io/sdk

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/sdk@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/sdk@81.tgz

@transcend-io/utils

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/utils@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/utils@81.tgz

@transcend-io/mcp-server

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server@81.tgz

@transcend-io/mcp-server-admin

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-admin@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-admin@81.tgz

@transcend-io/mcp-server-assessments

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-assessments@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-assessments@81.tgz

@transcend-io/mcp-server-consent

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-consent@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-consent@81.tgz

@transcend-io/mcp-server-core

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-core@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-core@81.tgz

@transcend-io/mcp-server-discovery

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-discovery@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-discovery@81.tgz

@transcend-io/mcp-server-dsr

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-dsr@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-dsr@81.tgz

@transcend-io/mcp-server-inventory

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-inventory@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-inventory@81.tgz

@transcend-io/mcp-server-preferences

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-preferences@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-preferences@81.tgz

@transcend-io/mcp-server-workflows

pnpm add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-workflows@81
yarn add https://pkg.pr.new/transcend-io/tools/@transcend-io/mcp-server-workflows@81.tgz

commit: 110fceb

SKILL.md and docs-reference.md duplicated content that is canonically
defined in the MCP prompts and classification-guide resource. Slim the
Cursor-specific files to be orchestration wrappers that reference the
MCP server as the source of truth for workflow details, research
methodology, console commands, and classification guidance.

Agents stay self-contained since subagents need complete instructions.
…resources

Resources now fetch live content from docs.transcend.io with static fallback:
- Tracking Purposes (purpose definitions and taxonomy)
- Triage Guide (full classification workflow)
- Debugging & Testing (URL overrides, console commands)
- Data Flows & Cookies (telemetry and regulation overview)
- Telemetry Overview (collection methods)

Uses https:// URIs so Cursor can open them directly (fixes "Failed to open
resource" error with the custom consent:// scheme).
Skills and agents now delegate to MCP prompts for all substance:

- SKILL.md: 117 -> 25 lines. Invokes the consent-triage MCP prompt
  and documents subagent spawning pattern.
- docs-reference.md: deleted. MCP resources + tool discovery replace it.
- Inspector agent: 123 -> 35 lines. Fetches consent-inspect-site MCP
  prompt for methodology. Fixed readonly->false for MCP access.
- Researcher agent: 95 -> 40 lines. Fetches consent-research-tracker MCP
  prompt for methodology. Fixed readonly->false for MCP access.
@bencmbrook
Copy link
Copy Markdown
Member

bencmbrook commented Apr 10, 2026

how do we feel about fetching the resources from our docs? @bencmbrook i wonder if there is a better way to do this to go directly to the content rather than trying to parse the hetml

@michaelfarrell76 indeed there is a better way, and @isaac-martin already set it up!

➡️ https://docs.transcend.io/llms.txt

Every doc can be read in markdown by appending .md to the URL:

https://docs.transcend.io/docs/articles/consent-management/configuration/triage-cookies-and-dataflows-guide
https://docs.transcend.io/docs/articles/consent-management/configuration/triage-cookies-and-dataflows-guide.md

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.

2 participants