atomic

flowstate-flowstate-platform-epicdm-flowstate-mcp

Package-local agent skill for @epicdm/flowstate-mcp.

Tags

Publisher

Versions

1 version published — latest: 0.1.0

  • 0.1.0
    publishedInvalid Date

Skill

flowstate-mcp Package Skill

Package: @epicdm/flowstate-mcp Repository: flowstate-platform Path: packages/worker-mcp Version: 0.1.0

Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.

Primary Package Workflow

MCP Tenant Tool Proxy

Status: Active Purpose: Preserve tenant isolation for MCP tools that operate on tenant worker collections. Scope: packages/worker-mcp/src/tools Trigger: Changes to collection CRUD, schema, RBAC, vault, orchestration, state, bizplan, or product tools. Input: Tool behavior change and expected tenant collection operation. Output: Tool handler that validates input and proxies through tenant dispatch.


Workflow

  1. Use Zod schemas in the tool registration call. Do not accept unvalidated arbitrary parameters when a shape is known.
  2. Call tenantFetch from src/tools/helpers.ts for tenant collection operations.
  3. Confirm the target URL pattern: /{collection}-rest/0/{operation} where operation is query, get, set, or delete.
  4. Let TenantFetchError flow through withErrorHandling from src/tools/response.ts so REST convenience endpoints can return structured errors.
  5. For create/update/delete tools, preserve RxDB fields such as id, createdAt, updatedAt, _modified, and _deleted where local patterns set them.
  6. Add focused tests in tests/tools/<area>.test.ts that assert dispatch name, collection, operation, body, and error behavior.

Example

For a new RBAC permission tool, register it in src/tools/rbac-permission.ts, call tenantFetch(env.TENANT_DISPATCH, auth, { collection, operation, body }), and verify the test sees worker name flowstate-tenant-${tenantName}.

Verification

  • yarn test tests/tools/helpers.test.ts
  • yarn test tests/tools/<area>.test.ts
  • yarn typecheck

Composition

  • Use flowstate-rxdb-d1-rest-rbac when tenant worker REST behavior or CLP/ACL filtering is the source of the bug.

Package Skill Inventory

worker-mcp Skill Inventory

Package: @epicdm/flowstate-mcp Purpose: Edge MCP server exposing FlowState tools over Streamable HTTP plus REST convenience endpoints.

SkillTypeUse WhenSource Anchors
flowstate-mcp-tool-registryWorkflowAdding, removing, testing, or debugging MCP tool registration or transport.src/index.ts, src/mcp/server.ts, tests/mcp/server.test.ts, tests/transport.test.ts
flowstate-mcp-tenant-tool-proxyWorkflowChanging collection CRUD, schema, RBAC, or other tenant-dispatched tools.src/tools/helpers.ts, src/tools/collection-crud.ts, src/tools/rbac-*.ts, tests/tools/*.test.ts

Composition

  • Compose with flowstate-rxdb-d1-rest-rbac for tenant worker REST rules.
  • Compose with flowstate-payment-x402-provisioning for payment service MCP tools.
  • Compose with flowstate-obs-ingestion-streaming for observability service tools.

Review Gate

worker-mcp Skill Review

Reviewed: 2026-06-30 Result: Pass for local agent use.

Checks

  • Skill split follows source architecture: server/transport registry and tenant-dispatched tools.
  • Source anchors and tests are concrete.
  • Skills avoid restating the full tool list as an autogenerated inventory.

Follow-up

  • Add a separate service-integration skill only if observability/payment tools become complex enough to need their own workflow.

Usage

Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/worker-mcp/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.

Install

Run this in your project to install via CLI:

fscloud dojo skill install flowstate-flowstate-platform-epicdm-flowstate-mcp --target <target> --out ./skills

Replace <target> with your agent target identifier. See the CLI docs for details.