# @lssm-tech/app.communicationos-mcp

MCP server exposing CommunicationOS contracts as AI-callable tools via the Model Context Protocol.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `3.0.5`
- Package path: `packages/apps/communicationos-mcp`
- Manifest path: `packages/apps/communicationos-mcp/package.json`
- Manifest Git blob: `b16f9573d144bef9f90be1a3de22cba2deeca073`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/app.communicationos-mcp](https://lssm.co/docs/packages/app.communicationos-mcp/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/app.communicationos-mcp.txt)

## Package metadata

```json
{
  "layer": "apps",
  "physicalArea": null,
  "primaryArea": "communication-and-notifications",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "solutions",
    "catalogKind": "app",
    "catalogStatus": "active",
    "adoptionMode": "operator-only",
    "stability": "stable"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Communication and notifications](https://lssm.co/docs/areas/communication-and-notifications/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/apps/communicationos-mcp/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp/README.md",
  "blobSha": "6fd9eecf18eabc3b91f4a1dc04b32f7653be2143",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# CommunicationOS MCP

Governed Model Context Protocol surface for CommunicationOS. It exposes
tenant-scoped thread reads, drafting, summarization, extraction, provider health,
inbound-route inspection, and the canonical Forms operation registry. Forms
tools inherit their contract auth and PII annotations. Direct
`communication.reply.send` is intentionally
excluded: outbound delivery remains subject to room membership, current
authority, and the approval/send orchestrator.

## MailerSend diagnostics

`createMailerSendMcpProviderDependencies` binds the read-only
`integrations.email.provider.health` and
`integrations.email.inbound-routes.list` tools. The host injects a
tenant-and-connection-scoped resolver returning MailerSend credentials and a
domain id. Secrets never appear in MCP tool inputs or outputs.

Both tools take `tenantId` as input, but they only run for the verified
subject (`src/provider-scope.ts`). The input tenant must equal the subject's
`tenantId`, and the subject must hold the `admin` role, because the contracts
declare `policy.auth: 'admin'` and the MCP gate itself only checks for an
authenticated actor. Anything else is `FORBIDDEN` (403) before the connection
resolver is called, so a token for one tenant can never load another tenant's
MailerSend connection.

## Subject and trust boundary

The stdio entrypoint (`startCommunicationOsMcpServer`) verifies one
CommunicationOS access token at startup with
`createCommunicationAccessTokenVerifier` from
`@lssm-tech/integration.communication-os-host-auth`, then builds the server.
It reads only these variables:

| Variable | Purpose |
| --- | --- |
| `COMMOS_MCP_ACCESS_TOKEN` | Access token minted by communicationos-api (issuer `https://api.hcircle.app`, audience `communication-os-api`). |
| `COMMOS_MCP_TENANT_ID`, `COMMOS_MCP_WORKSPACE_ID`, `COMMOS_MCP_SPACE_ID` | The scope the token must carry exactly. |
| `COMMUNICATION_OS_ACCESS_TOKEN_SECRET` | The shared HS256 signing secret (at least 32 bytes). |

A verified, in-scope token becomes the subject of every tool call:
`{ actor: 'user', userId: <principalId>, tenantId, workspaceId, roles }`, with
the token's space as the `policyContext.spaceId` fact. Handlers and policies
therefore see the verified workspace and space, not only the tenant. The principal and
the token's `exp` are cached; from `exp` onward, and whenever a variable is
missing or the secret, signature, issuer, audience, scope or expiry does not
verify, every call is anonymous and the MCP auth gate rejects it. The startup
log line reports `subject: authenticated | unconfigured | rejected` and never
the token. Restart the gateway with a fresh token to renew it.

**Trust boundary.** Verifying the token needs the shared HS256 secret, which
can also mint tokens. Run this gateway only server-side, next to
communicationos-api and inside its secret boundary, never on a client or
developer machine. Distributing it to clients would need a contract-first
token introspection route instead of the shared secret.

The import-time `server` export and `buildCommunicationOsMcpServer()` without a
resolver stay anonymous. `startCommunicationOsMcpServer` builds and connects
its own gateway after verification, so the exported `server` is not the
connected instance. The default server binds no provider resolver, so
production hosts must also inject a vault-backed connection resolver before
the provider tools can execute; the subject guard above still applies.


## Declared capabilities

This manifest does not declare a capability catalogue. Assess the package using its guide, import map and source.

## Catalogue metadata

```json
{
  "family": "solutions",
  "kind": "app",
  "status": "active",
  "adoptionMode": "operator-only",
  "stability": "stable",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./blueprint",
    "./mailersend-provider",
    "./server"
  ],
  "examples": [],
  "replacements": [],
  "nonAdoptableRationale": "This app is published for execution by operators, not as a reusable library dependency."
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/app.communicationos-mcp` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp/src/index.ts); verified source file.

- `@lssm-tech/app.communicationos-mcp/blueprint` — subpath `./blueprint`
  - `unconditional`: `./src/blueprint.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp/src/blueprint.ts); verified source file.

- `@lssm-tech/app.communicationos-mcp/mailersend-provider` — subpath `./mailersend-provider`
  - `unconditional`: `./src/mailersend-provider.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp/src/mailersend-provider.ts); verified source file.

- `@lssm-tech/app.communicationos-mcp/server` — subpath `./server`
  - `unconditional`: `./src/server.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/communicationos-mcp/src/server.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": null,
  "files": [
    "LICENSE",
    "README.md",
    "dist",
    "src",
    "!**/*.test.*",
    "!**/*.spec.*",
    "!**/*.tsbuildinfo"
  ],
  "publishExports": null
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/integration.communication-os-host-auth](https://lssm.co/docs/packages/integration.communication-os-host-auth/): `workspace:^`
- [@lssm-tech/integration.provider-email](https://lssm.co/docs/packages/integration.provider-email/): `workspace:^`
- [@lssm-tech/lib.communication-spec](https://lssm.co/docs/packages/lib.communication-spec/): `workspace:^`
- [@lssm-tech/lib.contracts-integrations](https://lssm.co/docs/packages/lib.contracts-integrations/): `workspace:^`
- [@lssm-tech/lib.contracts-runtime-server-mcp](https://lssm.co/docs/packages/lib.contracts-runtime-server-mcp/): `workspace:^`
- [@lssm-tech/lib.contracts-spec](https://lssm.co/docs/packages/lib.contracts-spec/): `workspace:^`
- [@lssm-tech/lib.customer-support-spec](https://lssm.co/docs/packages/lib.customer-support-spec/): `workspace:^`
- [@lssm-tech/lib.decision-runtime](https://lssm.co/docs/packages/lib.decision-runtime/): `workspace:^`
- [@lssm-tech/lib.logger](https://lssm.co/docs/packages/lib.logger/): `workspace:^`
- [@lssm-tech/tool.contracts-mcp-gen](https://lssm.co/docs/packages/tool.contracts-mcp-gen/): `workspace:^`
- `@modelcontextprotocol/sdk`: `catalog:ai`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `@types/node`: `catalog:types`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "start": "bun src/index.ts",
  "typecheck": "tsgo --noEmit",
  "lint:check": "node ../../../scripts/biome.cjs check .",
  "lint": "bun run lint:fix",
  "lint:fix": "node ../../../scripts/biome.cjs check --write ."
}
```

## Declared documentation links

- [App Communicationos Mcp documentation](https://www.npmjs.com/package/%40lssm-tech%2Fapp.communicationos-mcp) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Fapp.communicationos-mcp",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/app.communicationos-mcp.txt",
  "route": "/llms/app.communicationos-mcp",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/app.communicationos-mcp.txt",
  "blobSha": "6fd9eecf18eabc3b91f4a1dc04b32f7653be2143",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
