@khmuhtadin/pi-cloudflare-mcp
Pi extension that bridges pi to the official Cloudflare remote MCP server (Code Mode). Extended API access: DNS, zones, email routing, account, and more.
Package details
Install @khmuhtadin/pi-cloudflare-mcp from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@khmuhtadin/pi-cloudflare-mcp- Package
@khmuhtadin/pi-cloudflare-mcp- Version
0.1.0- Published
- Jun 22, 2026
- Downloads
- 110/mo · 13/wk
- Author
- khmuhtadin
- License
- MIT
- Types
- extension
- Size
- 22.5 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi Cloudflare MCP Extension
A pi package that bridges pi to the official Cloudflare remote MCP server (https://mcp.cloudflare.com/mcp). Provides broad API access: DNS, zones, email routing, account management, workers, and more.
It exposes a small, generic bridge instead of registering dozens of Cloudflare tools by default. This keeps pi's tool list compact while still allowing the model to discover and call any Cloudflare MCP tool.
Installation
pi install npm:@khmuhtadin/pi-cloudflare-mcp
Registered tools
cloudflare_mcp_list_tools— list tools exposed by the Cloudflare MCP server.cloudflare_mcp_call_tool— call any Cloudflare MCP tool bynamewith JSONarguments.
Slash commands
/cloudflare-mcp-auth-url— start OAuth and print the Cloudflare authorization URL to the terminal./cloudflare-mcp-auth <full-redirect-url-or-code>— finish OAuth with the full redirect URL or thecodevalue from that URL./cloudflare-mcp-token-status— show token status without exposing token values./cloudflare-mcp-reset— clear stored OAuth credentials./cloudflare-mcp-register [tool1,tool2|*]— optional: register selected MCP tools as native pi tools with acloudflare_prefix.
OAuth flow
Start or reload pi.
Run:
/cloudflare-mcp-auth-urlOpen the printed Cloudflare authorization URL in your browser.
After approval, the browser redirects to
http://localhost:9877/callback?.... A local server is not required; copy the full redirect URL from the address bar.Run:
/cloudflare-mcp-auth <full-redirect-url>You can also paste only the
codequery parameter value, but do not includecode=,&state=..., or whitespace.Test by asking pi to use
cloudflare_mcp_list_tools.
Credentials are stored at:
~/.pi/agent/extensions/cloudflare-mcp/auth-store.json
Configuration
Optional environment variables:
CLOUDFLARE_MCP_URL— defaults tohttps://mcp.cloudflare.com/mcp.CLOUDFLARE_MCP_REDIRECT_URL— defaults tohttp://localhost:9877/callback.CLOUDFLARE_MCP_STORE_PATH— defaults to~/.pi/agent/extensions/cloudflare-mcp/auth-store.json.CLOUDFLARE_MCP_TIMEOUT_MS— defaults to10000.CLOUDFLARE_MCP_SCOPE— defaults toread write.
Development
npm install
npm run typecheck
npm pack --dry-run
License
MIT