Skip to content

Add Cloudflare for Agents documentation section#28126

Draft
irvinebroque wants to merge 5 commits intoproductionfrom
cloudflare-for-agents-section
Draft

Add Cloudflare for Agents documentation section#28126
irvinebroque wants to merge 5 commits intoproductionfrom
cloudflare-for-agents-section

Conversation

@irvinebroque
Copy link
Contributor

@irvinebroque irvinebroque commented Feb 5, 2026

Summary

  • Adds a new Cloudflare for Agents documentation section that serves as a hub for content that is about how agents interact with Cloudflare (cloudflare APIs, etc.)
  • Adds Wrangler CLI documentation showing how to give agents access to deploy Workers and manage Cloudflare resources
  • Reorganizes MCP servers page from subdirectory to top-level file, and rehomes it within this section rather than /agents

- Create new /cloudflare-for-agents/ section for AI agent services
- Add MCP servers catalog page with connection instructions
- Add Markdown for Agents zone-level service documentation
- Add Workers agent setup guide with skills and API token instructions
- Extract MCP servers table into reusable partial
- Add Cloudflare skill installation instructions partial
- Update sidebar to show LLM resources for products with Developer platform in additional_groups
- Add cross-links from Agents docs and API token docs
- Simplify index.mdx to focus on key features with cleaner layout
- Move MCP servers page from subdirectory to top-level file
- Add new Wrangler CLI documentation for agents
@github-actions github-actions bot added product:workers Related to Workers product product:fundamentals product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/l labels Feb 5, 2026
@irvinebroque
Copy link
Contributor Author

/bonk review

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/public/__redirects @cloudflare/content-engineering, @cloudflare/pcx-technical-writing
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents
* @cloudflare/pcx-technical-writing
/src/content/docs/style-guide/ @dcpena, @cloudflare/pcx-technical-writing
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @cloudflare/wrangler, @mattietk
/src/content/partials/agents/ @elithrar, @rita3ko, @irvinebroque, @vy-ton, @cloudflare/pcx-technical-writing
*.ts @cloudflare/content-engineering, @kodster28

- Remove unrelated changes from agents/index.mdx and create-token.mdx
- Move MCP servers content from agents/model-context-protocol/ to cloudflare-for-agents/
- Add redirect from old URL to new location
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

This PR requires additional review attention because it affects the following areas:

Redirects

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /agents/model-context-protocol/mcp-servers-for-cloudflare/

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 5, 2026

Now I have all the context needed for a comprehensive review.


PR Review: Add Cloudflare for Agents documentation section

Overall Assessment

This PR introduces a new top-level product section ("Cloudflare for Agents") that aggregates agent-related services -- MCP servers, Markdown conversion, Skills, and Wrangler CLI access. The structure is clean and the content is useful. There are some issues to address, ranging from content duplication to minor correctness problems.

Issues

1. Significant content duplication between MCP server pages

cloudflare-for-agents/mcp-servers.mdx and agents/model-context-protocol/mcp-servers-for-cloudflare.mdx now have nearly identical content: the same tabbed connection instructions (copy-pasted, not shared via partial) and the same <Render file="mcp-servers-table"> partial. The table was correctly extracted into a partial, but the tabbed connection instructions were not.

Consider either:

  • Extracting the connection tabs into a partial as well (like was done for the table)
  • Making one page canonical and having the other cross-link to it
  • Adding a note on one page explaining the relationship to the other

2. Stale link in style-guide/ai-tooling.mdx

Line 52 still references /agents/model-context-protocol/mcp-servers-for-cloudflare/. If the new /cloudflare-for-agents/mcp-servers/ is meant to be the canonical MCP servers listing, this link should be updated. Not broken today, but inconsistent with the new IA.

3. skills.mdx is a near-empty placeholder

---
pcx_content_type: navigation
title: Skills
external_link: https://github.com/cloudflare/skills
sidebar:
  order: 1
---

This is just a redirect to GitHub with sidebar: order: 1, making it the first item in the sidebar after the overview. But the index page lists Skills as the first <Feature> card, linking to the same GitHub URL. Having a sidebar entry at position 1 that immediately bounces users off-site is not great UX. Consider either:

  • Moving it to a higher order (lower priority) so MCP Servers appears first
  • Or adding at least a paragraph of content explaining what Skills are before sending users to GitHub

4. sidebar.ts change has a correctness concern

The change to check additional_groups is correct for the new product. However, the simplification removed several LLM resource links (llms-full.txt, the "Developer Platform" llms-full.txt). This is a broader change that affects all Developer Platform products' sidebars, not just the new section. Was this intentional? If so, it should be called out in the PR description.

Looking at the specific diff:

// Before: showed llms.txt, llms-full.txt, prompt.txt, and Developer Platform llms-full.txt
// After: shows only llms.txt and prompt.txt

This is a significant change that removes useful links from every Developer Platform product sidebar.

5. wrangler-cli.mdx -- wrangler auth token --json may not exist

The command documented at the bottom:

npx wrangler auth token --json

I'm not confident this is a real Wrangler subcommand. The standard way to check auth is wrangler whoami. If auth token --json doesn't exist, this section should be removed or corrected.

6. create-token.mdx -- scope of changes may be too broad

The added section "API tokens for AI coding agents" is reasonable, but the surrounding diff shows significant reformatting of existing content (63 lines changed). Verify that the existing content wasn't inadvertently altered during reformatting.

7. cloudflare-skill-install.mdx -- OpenCode instructions may be incorrect

git clone https://github.com/cloudflare/skills.git
cp -r skills/* ~/.config/opencode/skill/

This assumes OpenCode uses ~/.config/opencode/skill/ as a skills directory. This should be verified against actual OpenCode documentation. The npx skills tab is also listed but this CLI tool should be verified to exist.

8. agent-setup.mdx -- Missing Tabs import

The file imports { Tabs, TabItem, Render } from ~/components and uses <Tabs> for the MCP server connection instructions. But the skill install section uses <Render file="cloudflare-skill-install"> which itself contains <Tabs> components. The partial cloudflare-skill-install.mdx uses <Tabs> and <TabItem> without importing them -- partials rendered via <Render> inherit the parent's imports, so this should work since agent-setup.mdx imports them. However, mcp-servers-for-cloudflare.mdx also renders the same partial -- verify it imports Tabs and TabItem as well. Looking at the file: yes, it does import them. This is fine.

9. Minor: Inconsistent link trailing slashes

In cloudflare-for-agents/index.mdx:

href="/cloudflare-for-agents/mcp-servers/"  (with trailing slash)

vs in cloudflare-for-agents/mcp-servers.mdx:

href="/agents/model-context-protocol/"  (with trailing slash -- consistent)

This is fine, just noting the convention is consistently used.

10. mcp-servers-table.mdx table formatting

The partial table has some inconsistent GitHub link formatting -- some entries have extra spaces before the closing parenthesis in markdown links. This is cosmetic and won't affect rendering.

Suggestions (non-blocking)

  1. The cloudflare-for-agents/index.mdx page is clean but could benefit from a brief paragraph explaining the relationship to the Agents SDK (/agents/). Users may be confused about why there are two top-level sections related to agents.

  2. Consider adding a <RelatedProduct> or cross-link from the cloudflare-for-agents/ pages back to the Agents SDK, since the reverse link already exists in agents/index.mdx.

  3. The Wrangler CLI page is thorough and well-structured. The security best practices section is good.

Summary

The PR adds a useful new documentation section with good structure. The main concerns are:

Priority Issue
High Duplicated MCP connection tabs should be extracted to a partial
High Verify wrangler auth token --json is a real command
Medium sidebar.ts removes LLM resource links from all Developer Platform sidebars -- intentional?
Medium skills.mdx as sidebar item #1 is just an external redirect
Low Stale link in style-guide/ai-tooling.mdx
Low Verify OpenCode skill install path is correct

github run

@irvinebroque
Copy link
Contributor Author

/bonk fix things from review

…e unverified command

- Extract duplicated MCP connection tabs into a shared partial (mcp-connection-tabs.mdx)
- Restore LLM resource links (llms-full.txt) in sidebar.ts that were unintentionally removed
- Keep the additional_groups check for Developer platform sidebar inclusion
- Remove unverified 'wrangler auth token --json' command from wrangler-cli.mdx
- Update stale link in style-guide/ai-tooling.mdx to point to new MCP servers location
- Change Skills sidebar order from 1 to 4 so external redirect isn't first item
- Fix OpenCode skill install path (skill -> skills)
@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 6, 2026

All fixes from the review have been applied. Here's a summary of the changes:

Changes made

Review Issue Fix
Duplicated MCP connection tabs Created src/content/partials/agents/mcp-connection-tabs.mdx and replaced inline tabs in both mcp-servers.mdx and agent-setup.mdx with <Render file="mcp-connection-tabs" product="agents" />
Stale link in style-guide/ai-tooling.mdx Updated link from /agents/model-context-protocol/mcp-servers-for-cloudflare/ to /cloudflare-for-agents/mcp-servers/
Skills sidebar order Changed skills.mdx sidebar order from 1 to 4 so the external-redirect entry isn't the first sidebar item
sidebar.ts removed LLM resource links Restored the llms-full.txt links and the collapsed "LLM resources" group structure, while keeping the additional_groups check
Unverified wrangler auth token --json Removed the wrangler auth token --json section from wrangler-cli.mdx, keeping only wrangler whoami
OpenCode skill install path Fixed path from ~/.config/opencode/skill/ to ~/.config/opencode/skills/ (verified against OpenCode docs)

Not addressed (out of scope or needs author input)

  • CI build failure: The failure is an OOM/dependency issue in the build environment, not related to this PR's content changes
  • npx skills CLI verification: Left as-is since this is an external tool that would need separate verification
  • create-token.mdx reformatting: Not part of the files in this PR branch

github run

cezary13k

This comment was marked as spam.

@elithrar
Copy link
Collaborator

elithrar commented Feb 6, 2026

/bonk review the build failures and fix issues, then re-review the PR.

Expected component `TabItem` to be defined: you likely forgot to import, pass, or provide it.
  Hint:
    This issue often occurs when your MDX component encounters runtime errors.
  Stack trace:
    at _missingMdxReference (file:///home/runner/work/cloudflare-docs/cloudflare-docs/dist/chunks/mcp-connection-tabs_BThlmYVK.mjs:38:9)
    at MDXContent (file:///home/runner/work/cloudflare-docs/cloudflare-docs/dist/chunks/mcp-connection-tabs_BThlmYVK.mjs:35:8)
    at renderJSXVNode (file:///home/runner/work/cloudflare-docs/cloudflare-docs/dist/chunks/astro/server_rj19WQSh.mjs:2742:39)
    at Object.renderToStaticMarkup (file:///home/runner/work/cloudflare-docs/cloudflare-docs/dist/chunks/server_t2zrl1Xz.mjs:226:24)
    at async renderComponentToString (file:///home/runner/work/cloudflare-docs/cloudflare-docs/dist/chunks/astro/server_rj19WQSh.mjs:2644:28)
00:19:17   ├─ /cloudflare-for-agents/mcp-servers/index.html
Error: Process completed with exit code 1.

Co-authored-by: elithrar <elithrar@users.noreply.github.com>
@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 6, 2026

Here's the summary of the build fix and re-review:


Build Fix

The build failure was caused by missing component imports in two partials:

File Fix
src/content/partials/agents/mcp-connection-tabs.mdx Added import { Tabs, TabItem } from "~/components"
src/content/partials/agents/cloudflare-skill-install.mdx Added import { Tabs, TabItem } from "~/components"

Partials that use Astro/MDX components must import them directly -- they don't inherit imports from the parent page that renders them via <Render>.

Re-Review Findings

After the fix, I did a full re-review of all 14 changed files. Two additional issues were found and fixed:

Issue Fix
Broken link in wrangler-cli.mdx:225 /fundamentals/setup/account/... corrected to /fundamentals/account/...
Unnecessary imports in mcp-servers.mdx Tabs, TabItem removed from import since the partial now handles its own imports

Previous review items -- all resolved

  • Style-guide link: updated to /cloudflare-for-agents/mcp-servers/
  • Skills sidebar order: 4 (reasonable placement)
  • sidebar.ts LLM resources: properly restored
  • Redirect for old MCP servers URL: in place

Non-blocking observations

  • The Cursor "direct install link" in mcp-connection-tabs.mdx uses the deprecated /sse endpoint (base64-encoded in the URL) while the manual JSON config uses /mcp. This may be intentional if Cursor's install mechanism requires SSE, but worth verifying.
  • The product has group: AI so it won't appear in the main /llms.txt (only Developer platform group products do). The additional_groups: [Developer platform] only affects the sidebar. Confirm this is intentional.

github run

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Preview URL: https://709e448a.preview.developers.cloudflare.com
Preview Branch URL: https://cloudflare-for-agents-section.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/cloudflare-for-agents/wrangler-cli/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/cloudflare-for-agents/wrangler-cli/
https://developers.cloudflare.com/cloudflare-for-agents/markdown-for-agents/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/cloudflare-for-agents/markdown-for-agents/
https://developers.cloudflare.com/workers/get-started/agent-setup/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/workers/get-started/agent-setup/
https://developers.cloudflare.com/cloudflare-for-agents/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/cloudflare-for-agents/
https://developers.cloudflare.com/agents/model-context-protocol/mcp-servers-for-cloudflare/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/agents/model-context-protocol/mcp-servers-for-cloudflare/
https://developers.cloudflare.com/cloudflare-for-agents/mcp-servers/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/cloudflare-for-agents/mcp-servers/
https://developers.cloudflare.com/cloudflare-for-agents/skills/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/cloudflare-for-agents/skills/
https://developers.cloudflare.com/style-guide/ai-tooling/ https://cloudflare-for-agents-section.preview.developers.cloudflare.com/style-guide/ai-tooling/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:fundamentals product:workers Related to Workers product size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.