# Steer Cloudflare Agents with company direction

> Create a private Artifact token, call addMcpServer on the Cloudflare Agent with the Artifact MCP URL and a Bearer Authorization header, and keep the Artifact workflow in the agent instructions. Cloudflare runs the agent; Artifact supplies versioned direction before consequential steps.

Call addMcpServer from a Cloudflare Agent with an Authorization Bearer header so Durable Object agents retrieve owned direction before they act.

**Audience:** Teams shipping Cloudflare Agents or Workers AI agents who need the same company limits to apply at the edge.

**Canonical HTML:** https://artifactcomputing.com/integrations/cloudflare

## Public offer

Start a free Artifact workspace at https://app.artifactcomputing.com. Every workspace includes 100K governed tokens per month, unlimited teammates, and no seat fees. A card is required only after three agent sessions.

## Highlights

### Edge agents still need owned rules

A Durable Object that can call tools and write state needs one place for refund limits, data boundaries, and approval owners. Put them in owned directives the agent retrieves before it acts.

### addMcpServer with a Bearer header

Point the Agents SDK at Artifact over Streamable HTTP MCP. Pass Authorization: Bearer with a private token. This is not Cloudflare's API MCP catalog entry.

### Same profile as Claude and Cursor

One workspace directive can govern Cloudflare Agents alongside Claude, ChatGPT, and Cursor, or you can scope it to named connections.

## Before and after

**Question:** Can the agent refund the customer in full to keep the account?

**Model default:** Refund the full amount to keep the account.

**With Artifact:** Do not refund it. Draft the reply without a refund and notify Finance.

**Applied directive:** Refunds above the support limit need Finance approval

## What is awesome about Cloudflare Agents + Artifact

Agents that run on Durable Objects still need current company direction. Keep hard permissions in Cloudflare; use Artifact for owned priorities, boundaries, and exceptions that change faster than a prompt or a Worker redeploy.

- Cloudflare remains the runtime your team already ships.
- Artifact returns the matching directive version before the response.
- Receipts show outcome and version without storing raw transcripts.

## How to connect

Create a token in Artifact, call addMcpServer with the URL and Bearer header below, save the Artifact workflow in the agent instructions, and run one verification task that should hit a live directive.

- Limit tools to Artifact steering and receipt methods when the client allows.
- Verify the interaction appears in Artifact before rolling out broadly.
- Update the directive when policy changes. Do not edit every agent prompt.

## Where it wins

Consequential actions and answers that should respect approval limits, data boundaries, or review gates.

- Refunds, credits, and discount ceilings.
- Customer-data and retention boundaries.
- Messages that need a named approver before they send.

## Connect in four steps

1. **Create a private Artifact token** — Open Artifact Integrations and create a token for this Cloudflare Agents connection. Keep it private.
2. **Call addMcpServer with a Bearer header** — In the Durable Object agent, call addMcpServer with the Artifact MCP URL and an Authorization header whose value starts with Bearer followed by the token. Do not use Cloudflare API MCP for company direction.
3. **Save the Artifact instructions** — Require the agent to retrieve direction before consequential actions and to record the interaction afterward.
4. **Run a verification task** — Send a task that should hit a live directive, then confirm the interaction in Artifact before wider rollout.

## Frequently asked questions

### Is this Cloudflare's API MCP?

No. This guide connects Artifact as an MCP server the agent calls with addMcpServer. Cloudflare API MCP is a different catalog entry for Cloudflare product APIs.

### Where does the agent store the token?

Keep the Artifact token in Worker secrets or the agent configuration. Rotate it in Artifact when someone leaves or a secret may have leaked.

### Can directives be scoped only to Cloudflare Agents?

Yes. A directive can apply company-wide, to a team, or to named agent connections.

### Does Artifact store the conversation?

No. Artifact records directive versions, outcomes, latency, and token counts, not raw prompts or replies as receipt content.

## Related

- [Browse agent integrations](https://artifactcomputing.com/integrations)
- [Steer Zapier Agents with company direction](https://artifactcomputing.com/integrations/zapier)
- [Agent steering vs. RAG](https://artifactcomputing.com/agent-steering/agent-steering-vs-rag)
- [Apply company direction before an AI agent responds](https://artifactcomputing.com/ai-agent-governance)

Markdown mirror: https://artifactcomputing.com/integrations/cloudflare.md
