app.managed-companyos-mcp
Managed MCP server for CompanyOS operations and governed agent access.
@lssm-tech/app.managed-companyos-mcpbun add @lssm-tech/app.managed-companyos-mcpManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
MCP server that exposes Managed CompanyOS operations and resources for tenant onboarding, integration discovery, workflow status, replay, evidence, health probes, and fail-closed Managed Builder evidence tools.
What It Does
- Hosts a ContractSpec MCP server over Managed CompanyOS contracts (
companyos/*). - Exposes V1 read/onboarding tools, Builder readiness/replay/evidence/release tools, and one reference resource for the operator copilot.
- Exposes tenant-safe, read-only fixture resources for Company Brain, temporal graph, experiment/outcome, and provider health projections. These resources require an authenticated tenant match plus an explicit authorization decision and never expose credential references.
- Resolves the actor from env vars (single-tenant per process) in V1; multi-tenant HTTP transport is deferred to V2.
- Fails closed until API keys are verified: a configured key yields a role-less
user, never an admin, and commands are denied unless reference mode is on outside production. Queries and read-only resources stay available.
V1 Tools
| Tool | Contract |
|---|---|
tenant.onboard | companyos/commands/tenantOnboard.command.ts |
tenant.get | companyos/queries/tenantGet.query.ts |
integration.list-providers | companyos/queries/integrationListProviders.query.ts |
workflow.get-status | companyos/queries/workflowGetStatus.query.ts |
approval.list-pending | companyos/queries/approvalReasons.query.ts (stub source until control-plane reuse lands) |
replay.get-packet | companyos/queries/replayGetPacket.query.ts |
evidence.get-receipt | companyos/queries/evidenceGetReceipt.query.ts |
health.worker | companyos/queries/healthWorker.query.ts |
builder.readiness.evaluate | companyos/commands/builderReadinessEvaluate.command.ts |
builder.evidence.receipt.get | companyos/queries/builderEvidenceReceiptGet.query.ts |
builder.replay.packet.get | companyos/queries/builderReplayPacketGet.query.ts |
builder.release.capsule.get | companyos/queries/builderReleaseCapsuleGet.query.ts |
Read-only projection resources
companyos://tenants/{tenantId}/company-braincompanyos://tenants/{tenantId}/temporal-graphcompanyos://tenants/{tenantId}/experiment-outcomecompanyos://tenants/{tenantId}/provider-health
These are deterministic reference projections only. They perform no writes or network access, fail closed for anonymous/cross-tenant/denied requests, and use only declared package exports.
Environment Variables
MANAGED_COMPANYOS_MCP_API_KEY— platform API key (required in production). It is not verified yet, so it identifies a caller but grants no role.MANAGED_COMPANYOS_MCP_TENANT_ID— optional tenant pin for tenant-scoped keys.MANAGED_COMPANYOS_MCP_REFERENCE_MODE— set to1to let the deterministic reference bindings run commands (tenant.onboard,builder.readiness.evaluate). Ignored whenNODE_ENV=production; any other value keeps commands denied.MANAGED_COMPANYOS_MCP_NAME— override server name (defaultmanaged-companyos-mcp).MANAGED_COMPANYOS_MCP_VERSION— override server version (default0.1.0).
Running Locally
From packages/apps/managed-companyos-mcp:
bun run devbun run startbun run buildbun run typecheckbun run test
Architecture
src/server.tsboots the MCP server and stdio transport.src/blueprint.tsdefines the app blueprint.src/tools.tsinstalls operation specs throughinstallOp.src/resources.tsexposes the reference workspace resource.src/prompts.tsregisters the operator copilot prompt.src/tenant-context.tsresolves the actor and the fail-closed policy gate (decide,createManagedToolDecider).src/smoke.test.tsasserts the registry registers the expected number of tools and that the gate denies commands from an unverified key.
Status
Handlers are deterministic reference bindings for V1. Until lib.auth-os verifies API keys, commands run only in reference mode (MANAGED_COMPANYOS_MCP_REFERENCE_MODE=1, never in production). Builder-specific handlers are live fail-closed evidence tools: they reject raw-looking credentials, report missing provider/webhook refs as blockers, and emit Builder-scoped readiness/replay/receipt/release packets without replacing agent/workflow.
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
6 declarations
@lssm-tech/bundle.managed-companyosworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-runtime-server-mcpworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-specworkspace:^
Read the package manual ↗@lssm-tech/lib.loggerworkspace:^
Read the package manual ↗@modelcontextprotocol/sdkcatalog:ai
zodcatalog:
Declared capabilities
This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.
Scripts
cleanrm -rf distlintbun run lint:fixlint:fixnode ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .lint:checknode ../../../scripts/biome.cjs check .buildbun ../../../scripts/tsdown.mjsdevbun ../../../scripts/tsdown.mjs --watchstartnode dist/server.jstypechecktsgo --noEmittestbun testcompanyos:builder:mcp-smokebun test src/smoke