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
42 changes: 20 additions & 22 deletions packages/mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

## Prerequisites

- **Node.js** ≥ 22.12 (see each CLI packages `engines` in `package.json`).
- **Node.js** ≥ 22.12 (see each CLI package's `engines` in `package.json`).
- Packages are **alpha** and **not yet published to npm**. Global install and `npx` examples below assume a future registry release. **Until then**, clone this repository: copy [`secret.env.example`](../../secret.env.example) to **`secret.env`** at the repo root and set `TRANSCEND_API_KEY`; then from the repo root run `pnpm exec turbo run build --filter="@transcend-io/<package>..."` (trailing `...` includes dependencies such as `mcp-server-core`), then `set -a && source ./secret.env && set +a` and `pnpm -F @transcend-io/<package> exec node ./dist/cli.mjs` (or use [`scripts/mcp-run.sh`](../../scripts/mcp-run.sh) — see **Run from the monorepo** in each package README and [CONTRIBUTING.md](../../CONTRIBUTING.md#mcp-servers)).

In client config, `npx` with `-y @transcend-io/...` runs that packages published `bin` (see `package.json` in each package).
In client config, `npx` with `-y @transcend-io/...` runs that package's published `bin` (see `package.json` in each package).

## Choosing a server

There are two ways to consume the MCP tools, and they can be mixed freely.

### Unified server

Install **`@transcend-io/mcp-server`** to get every tool (71 across all domains) in a single process. This is the fastest way to get started and is ideal when your agent can handle a large tool set.
Install **`@transcend-io/mcp-server`** to get every tool across all domains in a single process. This is the fastest way to get started and is ideal when your agent can handle a large tool set.

```json
{
Expand Down Expand Up @@ -63,18 +63,18 @@ Install only the domains you need. Smaller tool counts help AI agents stay focus

## Packages

| Package | Binary | Tools | Description |
| ----------------------------------------------------- | --------------------------- | ----: | ------------------------------------------------ |
| [`mcp-server`](./mcp-server/) | `transcend-mcp` | 71 | Unified server — all tools in one process |
| [`mcp-server-admin`](./mcp-server-admin/) | `transcend-mcp-admin` | 8 | Organization, users, teams, API keys |
| [`mcp-server-assessments`](./mcp-server-assessments/) | `transcend-mcp-assessments` | 14 | Privacy assessments, templates, groups |
| [`mcp-server-consent`](./mcp-server-consent/) | `transcend-mcp-consent` | 12 | Consent management, cookie & data-flow triage |
| [`mcp-server-core`](./mcp-server-core/) | — | — | Shared infrastructure (not installed directly) |
| [`mcp-server-discovery`](./mcp-server-discovery/) | `transcend-mcp-discovery` | 6 | Data discovery, classification, NER |
| [`mcp-server-dsr`](./mcp-server-dsr/) | `transcend-mcp-dsr` | 12 | Data subject requests (submit, track, respond) |
| [`mcp-server-inventory`](./mcp-server-inventory/) | `transcend-mcp-inventory` | 10 | Data inventory, silos, vendors, data points |
| [`mcp-server-preferences`](./mcp-server-preferences/) | `transcend-mcp-preferences` | 6 | Privacy preference store (query, upsert, delete) |
| [`mcp-server-workflows`](./mcp-server-workflows/) | `transcend-mcp-workflows` | 3 | Workflow & email-template configuration |
| Package | Binary | Tools | Description |
| ----------------------------------------------------- | --------------------------- | ----: | ---------------------------------------------- |
| [`mcp-server`](./mcp-server/) | `transcend-mcp` | 52 | Unified server — all tools in one process |
| [`mcp-server-admin`](./mcp-server-admin/) | `transcend-mcp-admin` | 8 | Organization, users, teams, API keys |
| [`mcp-server-assessments`](./mcp-server-assessments/) | `transcend-mcp-assessments` | 14 | Privacy assessments, templates, groups |
| [`mcp-server-consent`](./mcp-server-consent/) | `transcend-mcp-consent` | 9 | Consent management, cookie & data-flow triage |
| [`mcp-server-core`](./mcp-server-core/) | — | — | Shared infrastructure (not installed directly) |
| [`mcp-server-discovery`](./mcp-server-discovery/) | `transcend-mcp-discovery` | 4 | Data discovery, classification scans |
| [`mcp-server-dsr`](./mcp-server-dsr/) | `transcend-mcp-dsr` | 4 | Data subject requests (list, details, cancel) |
| [`mcp-server-inventory`](./mcp-server-inventory/) | `transcend-mcp-inventory` | 10 | Data inventory, silos, vendors, data points |
| [`mcp-server-preferences`](./mcp-server-preferences/) | `transcend-mcp-preferences` | 0 | Privacy preference store (temporarily empty) |
| [`mcp-server-workflows`](./mcp-server-workflows/) | `transcend-mcp-workflows` | 3 | Workflow & email-template configuration |

See each package's README for full tool lists, detailed environment variable docs, and client configuration examples.

Expand All @@ -92,14 +92,13 @@ See each package's README for full tool lists, detailed environment variable doc
│ └─────────────┼────────────┘ │
│ ▼ │
│ mcp-server-core │
│ (GraphQL base, REST client, validation) │
(GraphQL base, validation)
└──────────────────────────────────────────────────────────┘
```

Each domain package (admin, consent, dsr, ...) is a self-contained MCP server with its own CLI entry point. It can run standalone or be composed into the unified server. All domain packages depend on `mcp-server-core` for shared infrastructure:

- **`TranscendGraphQLBase`** — base class extended by each domain's GraphQL mixin
- **`TranscendRestClient`** — REST client for the Sombra API (used by DSR, preferences, and discovery)
- **`createMCPServer`** — factory that bootstraps a stdio MCP server from tool definitions
- **Validation & helpers** — Zod schemas, `validateArgs`, `createToolResult`, `createListResult`

Expand All @@ -109,11 +108,10 @@ The unified `mcp-server` package aggregates tools via `ToolRegistry` and compose

All servers share the same environment variables:

| Variable | Required | Default | Description |
| ----------------------- | -------- | ------------------------------------------ | ------------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_API_URL` | No | `https://multi-tenant.sombra.transcend.io` | Sombra REST API URL |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |
| Variable | Required | Default | Description |
| ----------------------- | -------- | -------------------------- | ----------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |

**Monorepo:** store these in root **`secret.env`** (from [`secret.env.example`](../../secret.env.example)); load with `source` or [`scripts/mcp-run.sh`](../../scripts/mcp-run.sh). See [CONTRIBUTING.md](../../CONTRIBUTING.md#mcp-servers).

Expand Down
9 changes: 4 additions & 5 deletions packages/mcp/mcp-server-admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ See [CONTRIBUTING.md](../../../CONTRIBUTING.md#mcp-servers) for workspace layout

### Environment variables

| Variable | Required | Default | Description |
| ----------------------- | -------- | ------------------------------------------ | ----------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_API_URL` | No | `https://multi-tenant.sombra.transcend.io` | Sombra API URL |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |
| Variable | Required | Default | Description |
| ----------------------- | -------- | -------------------------- | ----------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |

**Monorepo:** keep these in root **`secret.env`** (from [`secret.env.example`](../../../secret.env.example)); see **Run from the monorepo**.

Expand Down
5 changes: 2 additions & 3 deletions packages/mcp/mcp-server-admin/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import { createMCPServer, TranscendRestClient } from '@transcend-io/mcp-server-core';
import { createMCPServer } from '@transcend-io/mcp-server-core';

import { AdminMixin } from './graphql.js';
import { getAdminTools } from './tools/index.js';
Expand All @@ -8,8 +8,7 @@ createMCPServer({
name: 'transcend-mcp-admin',
version: '1.0.0',
getTools: getAdminTools,
createClients: (apiKey, sombraUrl, graphqlUrl) => ({
rest: new TranscendRestClient(apiKey, sombraUrl),
createClients: (apiKey, graphqlUrl) => ({
graphql: new AdminMixin(apiKey, graphqlUrl),
}),
});
20 changes: 7 additions & 13 deletions packages/mcp/mcp-server-admin/src/tools/admin_test_connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,24 @@ import {
import type { AdminMixin } from '../graphql.js';

export function createAdminTestConnectionTool(clients: ToolClients) {
const { rest } = clients;
const graphql = clients.graphql as AdminMixin;
return defineTool({
name: 'admin_test_connection',
description: 'Test connectivity to both Transcend REST and GraphQL APIs',
description: 'Test connectivity to the Transcend GraphQL API',
category: 'Admin',
readOnly: true,
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
zodSchema: EmptySchema,
handler: async (_args) => {
const [graphqlConnected, restConnected] = await Promise.all([
graphql.testConnection(),
rest.testConnection(),
]);
const allConnected = graphqlConnected && restConnected;
const connected = await graphql.testConnection();
return createToolResult(true, {
connected: allConnected,
connected,
details: {
graphql: { connected: graphqlConnected, url: graphql.getBaseUrl() },
rest: { connected: restConnected, url: rest.getBaseUrl() },
graphql: { connected, url: graphql.getBaseUrl() },
},
message: allConnected
? 'Successfully connected to all Transcend APIs'
: 'Some API connections failed - check details',
message: connected
? 'Successfully connected to Transcend GraphQL API'
: 'GraphQL API connection failed - check details',
timestamp: new Date().toISOString(),
});
},
Expand Down
10 changes: 0 additions & 10 deletions packages/mcp/mcp-server-admin/tests/admin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ describe('Admin Tools', () => {
getBaseUrl: ReturnType<typeof vi.fn>;
};

let mockRest: {
testConnection: ReturnType<typeof vi.fn>;
getBaseUrl: ReturnType<typeof vi.fn>;
};

beforeEach(() => {
mockGraphql = {
getOrganization: vi.fn(),
Expand All @@ -43,15 +38,10 @@ describe('Admin Tools', () => {
testConnection: vi.fn(),
getBaseUrl: vi.fn().mockReturnValue('https://api.transcend.io'),
};
mockRest = {
testConnection: vi.fn(),
getBaseUrl: vi.fn().mockReturnValue('https://multi-tenant.sombra.transcend.io'),
};
});

const getTools = () =>
getAdminTools({
rest: mockRest as never,
graphql: mockGraphql,
});

Expand Down
9 changes: 4 additions & 5 deletions packages/mcp/mcp-server-assessments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ See [CONTRIBUTING.md](../../../CONTRIBUTING.md#mcp-servers) for workspace layout

### Environment variables

| Variable | Required | Default | Description |
| ----------------------- | -------- | ------------------------------------------ | ----------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_API_URL` | No | `https://multi-tenant.sombra.transcend.io` | Sombra API URL |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |
| Variable | Required | Default | Description |
| ----------------------- | -------- | -------------------------- | ----------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |

**Monorepo:** keep these in root **`secret.env`** (from [`secret.env.example`](../../../secret.env.example)); see **Run from the monorepo**.

Expand Down
5 changes: 2 additions & 3 deletions packages/mcp/mcp-server-assessments/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import { createMCPServer, TranscendRestClient } from '@transcend-io/mcp-server-core';
import { createMCPServer } from '@transcend-io/mcp-server-core';

import { AssessmentsMixin } from './graphql.js';
import { getAssessmentTools } from './tools/index.js';
Expand All @@ -8,8 +8,7 @@ createMCPServer({
name: 'transcend-mcp-assessments',
version: '1.0.0',
getTools: getAssessmentTools,
createClients: (apiKey, sombraUrl, graphqlUrl) => ({
rest: new TranscendRestClient(apiKey, sombraUrl),
createClients: (apiKey, graphqlUrl) => ({
graphql: new AssessmentsMixin(apiKey, graphqlUrl),
}),
});
9 changes: 4 additions & 5 deletions packages/mcp/mcp-server-consent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ See [CONTRIBUTING.md](../../../CONTRIBUTING.md#mcp-servers) for workspace layout

### Environment variables

| Variable | Required | Default | Description |
| ----------------------- | -------- | ------------------------------------------ | ----------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_API_URL` | No | `https://multi-tenant.sombra.transcend.io` | Sombra API URL |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |
| Variable | Required | Default | Description |
| ----------------------- | -------- | -------------------------- | ----------------- |
| `TRANSCEND_API_KEY` | Yes | — | Transcend API key |
| `TRANSCEND_GRAPHQL_URL` | No | `https://api.transcend.io` | GraphQL API URL |

**Monorepo:** keep these in root **`secret.env`** (from [`secret.env.example`](../../../secret.env.example)); see **Run from the monorepo**.

Expand Down
7 changes: 0 additions & 7 deletions packages/mcp/mcp-server-consent/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
export { getConsentTools } from './tools/index.js';
export { resolveAirgapBundleId } from './resolveAirgapBundleId.js';

export { GetPreferencesSchema, type GetPreferencesInput } from './tools/consent_get_preferences.js';
export {
PurposeConsentSchema,
type PurposeConsentInput,
SetPreferencesSchema,
type SetPreferencesInput,
} from './tools/consent_set_preferences.js';
export {
ListAirgapBundlesSchema,
type ListAirgapBundlesInput,
Expand Down

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions packages/mcp/mcp-server-consent/src/tools/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
import type { ToolDefinition, ToolClients } from '@transcend-io/mcp-server-core';

import { createConsentBulkTriageTool } from './consent_bulk_triage.js';
import { createConsentGetPreferencesTool } from './consent_get_preferences.js';
import { createConsentGetTriageStatsTool } from './consent_get_triage_stats.js';
import { createConsentListAirgapBundlesTool } from './consent_list_airgap_bundles.js';
import { createConsentListCookiesTool } from './consent_list_cookies.js';
import { createConsentListDataFlowsTool } from './consent_list_data_flows.js';
import { createConsentListPurposesTool } from './consent_list_purposes.js';
import { createConsentListRegimesTool } from './consent_list_regimes.js';
import { createConsentSetPreferencesTool } from './consent_set_preferences.js';
import { createConsentUpdateCookiesTool } from './consent_update_cookies.js';
import { createConsentUpdateDataFlowsTool } from './consent_update_data_flows.js';

export function getConsentTools(clients: ToolClients): ToolDefinition[] {
return [
createConsentGetPreferencesTool(clients),
createConsentSetPreferencesTool(clients),
createConsentListPurposesTool(clients),
createConsentListDataFlowsTool(clients),
createConsentListCookiesTool(clients),
Expand Down
Loading
Loading