Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/consent-typed-graphql-codegen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@transcend-io/mcp-server-consent": patch
---

Migrate all consent MCP GraphQL operations to the typed `graphql()` codegen path (matching the other MCP servers) instead of importing plain `gql` strings and hand-written response types from `@transcend-io/sdk`. Operations now live in `src/graphql.ts` and are validated against the committed `schema.graphql` at compile time, so schema drift fails `tsc` rather than surfacing as a runtime error. No change to tool behavior.
16 changes: 12 additions & 4 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ const SCHEMA_PATH = './schema.graphql';
/**
* GraphQL-backed MCP servers. Each entry corresponds to a package directory
* `packages/mcp/mcp-server-${name}` containing a `src/graphql.ts` file with
* embedded operations. The `mcp-server-base`, `mcp-server-consent`, and
* `mcp-server-preferences` packages are intentionally excluded:
* embedded operations. The `mcp-server-base` and `mcp-server-preferences`
* packages are intentionally excluded:
* - base has no GraphQL operations of its own.
* - consent/preferences hit REST endpoints, not GraphQL.
* - preferences hits REST endpoints, not GraphQL.
*/
const SERVERS = ['admin', 'assessment', 'discovery', 'dsr', 'inventory', 'workflows'] as const;
const SERVERS = [
'admin',
'assessment',
'consent',
'discovery',
'dsr',
'inventory',
'workflows',
] as const;

const config: CodegenConfig = {
schema: SCHEMA_PATH,
Expand Down
3 changes: 2 additions & 1 deletion packages/mcp/mcp-server-consent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
"check:publint": "publint --level warning --strict --pack pnpm"
},
"dependencies": {
"@graphql-typed-document-node/core": "catalog:",
"@modelcontextprotocol/sdk": "catalog:",
"@transcend-io/mcp-server-base": "workspace:*",
"@transcend-io/privacy-types": "workspace:*",
"@transcend-io/sdk": "workspace:*",
"graphql": "catalog:",
"zod": "catalog:"
},
"devDependencies": {
Expand Down
Loading
Loading