Is Cloudflare MCP server safe?
- Node.js shell/command execution
- npm install-time lifecycle hook
- Dangerous MCP tool capability
@cloudflare/mcp-server-cloudflare is an AI npm_package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 8 risky constructs are reported for review. It can: delegated authentication, filesystem read, filesystem write, install time execution, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@cloudflare/mcp-server-cloudflare 1.0.0
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of Cloudflare MCP server's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (8)
package.json runs scripts automatically when the package is installed.
"postinstall": "mkdir -p workdir",
Why it matters: Install scripts are a favorite supply-chain foothold — they execute on every machine that installs the package.
Fix: Inspect the hook command. Install-time scripts are a common supply chain execution vector; ensure they do nothing beyond a documented build step.
An MCP tool exposes a powerful capability (files, shell, network, browser, or credentials).
context.registerTool( 'get_leaked_credentials_data',
context.registerTool( 'container_file_write',
context.registerTool( 'container_file_read',
Why it matters: Wired into an agent, these grant it real access to your machine — confirm each is required.
Fix: Confirm each powerful tool is required and constrained; broad MCP tools (shell/filesystem/network) grant an agent significant host access.
The component can run operating-system commands or spawn processes.
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
exec(query: string): Promise<D1ExecResult>;
import { exec } from 'node:child_process'Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
The component reads files from disk.
const contents = await fs.readFile(path.join(process.cwd(), reqPath))
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
await fs.writeFile(reqPath, file.text)
await fs.rm(path.join(process.cwd(), reqPath), { recursive: true })Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
The component makes outbound network requests.
fetch(input: RequestInfo | URL, init?: RequestInit<RequestInitCfProperties>): Promise<Response>;
declare function fetch(input: RequestInfo | URL, init?: RequestInit<RequestInitCfProperties>): Promise<Response>;
fetch(request: Request): Response | Promise<Response>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
* async fetch(_request: Request, env: Env): Promise<Response> {fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
* global `fetch()` API against the result's `url`, at which point the
* result's body, fetch the URL with the global `fetch()` API.
* const page = await fetch(top.url);
fetch(input: RequestInfo | URL, init?: RequestInit<RequestInitCfProperties>): Promise<Response>;
declare function fetch(input: RequestInfo | URL, init?: RequestInit<RequestInitCfProperties>): Promise<Response>;
fetch(request: Request): Response | Promise<Response>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
* async fetch(_request: Request, env: Env): Promise<Response> {fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
* global `fetch()` API against the result's `url`, at which point the
* result's body, fetch the URL with the global `fetch()` API.
* const page = await fetch(top.url);
fetch(input: RequestInfo | URL, init?: RequestInit<RequestInitCfProperties>): Promise<Response>;
declare function fetch(input: RequestInfo | URL, init?: RequestInit<RequestInitCfProperties>): Promise<Response>;
fetch(request: Request): Response | Promise<Response>;
Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential. (14 occurrence(s) shown as evidence).
grant_type: 'authorization_code',
grant_type: 'refresh_token',
* GET /oauth/authorize - Show consent dialog or redirect if approved
app.get(`/oauth/authorize`, async (c) => {* POST /oauth/authorize - Handle consent form submission
app.post(`/oauth/authorize`, async (c) => {authorizeEndpoint: '/oauth/authorize',
Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.
An MCP tool surface (manifest or tool definitions) was found.
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
context.registerTool(
Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →