Skip to content

Early access Governed MCP calls open to beta partners in March 2027. The MCP tracker and scanner are free to use today.

Create and publish a Policy

A Policy decides what happens to each governed action: Allow, Require Approval or Block. You work on a draft, publish a version, and assign it. A published version doesn’t change; to change the Policy, you publish a new one. For the model behind this, see Policies and decisions.

The Policies library with filters for All, Active, Drafts, Disabled, Archived and Conflicts, and Create refund policy and New Policy buttons.

  • Create or identify the target Connection and Agent in the intended workspace.
  • Confirm the tool’s definition and meaning. Amount rules need a known unit and currency.
  • Write down representative actions that should be allowed, held and blocked. Include boundary values.
  • Decide who will review approval requests and what should happen if no rule decides an action.
  1. Open Policies and select New Policy.

  2. Details. Enter a Policy Name, choose the Scope (for example Workspace · Production or Organization · All), and describe the change in Description.

    A new draft policy on the Details tab, with Rules, Policy as Code and Compiled Preview tabs, and Close Draft, Validate Policy and Save Draft.

  3. Rules. Open the Rules tab and select Add rule for each rule. For an MCP tool rule, choose the Subject (who it applies to), the Connection, the discovered Tool, the Resource, an optional Condition, the Decision and its Priority. The builder reads each rule back as a sentence so you can check it.

    Keep same-scope conditions disjoint. For example, use non-overlapping refund bands: allow through SGD 500, require approval above SGD 500 through SGD 1,000, and block above SGD 1,000. Do not depend on the numeric priority field to settle overlapping decisions.

  4. Check the rules and select Validate Policy. Fix anything marked invalid.

  5. Select Save Draft. Drafts don’t affect any Agent.

  6. Select Publish Version. Stackduke creates a published version with its own version label and hash. It isn’t edited afterwards.

Expected result: the Policy has an Active published version with a version label and hash. Publishing preserves the version; assignment determines where it applies.

For a common case, select Create refund policy. It builds a three-band refund boundary for one Connection:

Create refund policy: choose a Connection and set Allow through and Require approval through limits in SGD.

  1. Choose New Policy (or an existing Policy to edit) and enter a Policy name.

  2. Choose the Connection / account and the refund Action.

  3. Set Allow through and Require approval through. Amounts above the approval limit are blocked. Other applicable restrictions still apply.

  4. Select Save draft, then Publish version.

The template needs the refund tool’s meaning to be confirmed first. If it says “Refund meaning needs review before testing”, review the tool.

A published version doesn’t do anything until it applies to an Agent.

  • From the Agent: open the Agent, select Policies, then Attach Policy.
  • From the Policy: open it and select Assignments to see and manage where it applies.

A Policy’s overview: Payments Policy, status Active, scope Workspace · Production, version payments-v12, tabs for Rules, Policy as Code, Tools and resources, Assignments and Versions, and an Edit policy button.

  1. Open the Policy and select Edit policy. Stackduke creates a draft from the current version.

  2. Make your changes and publish a new version.

  3. Open Versions to see earlier versions. Open a version to compare it with the current one.

Under More you can Disable Policy (stop enforcing it without deleting it), Enable Policy again, Replace Policy with another active Policy, or delete it.

A Policy in Conflict references something that no longer resolves, such as a deleted Connection. Select Edit policy to create a repair draft, remove or replace the unavailable targets, and publish again. Published history is kept.

  • On the Policy’s Rules tab, choose an Agent and select Test policy to test an exact action without running it.
  • Run the Agent in Observe Mode to see what the policy would do to real traffic.

Test the boundary and one value on each side. For the example bands above, check SGD 500, SGD 501, SGD 1,000 and SGD 1,001. An Unresolved result means you still have a gap, an overlap, an unavailable reference or tool meaning that needs review; do not interpret it as Allow.