Skip to content

P1: Add @ageflow/mcp-policy package for allowlists and config isolation #253

Description

@Neftedollar

Context

@ageflow/mcp-server needs a reusable policy layer so authz, allowlists, and config isolation are not duplicated across CLI, stdio, and HTTP transports.

Problem

Today policy decisions are implicit or embedded in server/runtime code. That makes it hard to:

  • isolate MCP config per workflow/client
  • validate allowed workflows/tools/roles before server startup
  • share policy logic between stdio and HTTP transports
  • keep default-deny behavior obvious and testable

Scope

  • Add a dedicated @ageflow/mcp-policy package.
  • Define policy types for:
    • workflow allowlists
    • tool allowlists
    • role allowlists
    • config isolation boundaries
  • Add validation and normalization helpers for policy config.
  • Make policy evaluation reusable by @ageflow/mcp-server and CLI transport setup.
  • Keep defaults explicit and deny-by-default.

Acceptance Criteria

  • Policy config can be loaded and validated independently of the server.
  • Tool/workflow/role allowlists are enforced from a single shared policy module.
  • A failing policy produces structured, machine-readable errors.
  • Tests cover both valid and denied policy paths.

Non-goals

  • External IAM provider integrations.
  • UI for policy editing.
  • Broad security redesign outside MCP policy scope.

Relationship

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions