Is Cloudflare MCP server safe?
@cloudflare/mcp-server-cloudflare is an AI npm_package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 7 risky constructs are reported for review. It can: 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
- Node.js shell/command execution
- npm install-time lifecycle hook
- Dangerous MCP tool capability
No malicious indicators found by static analysis.
Findings (7)
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).
agent.server.registerTool( 'get_leaked_credentials_data',
this.server.registerTool( 'container_file_write',
this.server.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>;
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
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(req, env, ctx)
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(req, env, ctx)
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(req, env, ctx)
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>;
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 MCP tool surface (manifest or tool definitions) was found.
this.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.registerTool(
agent.server.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 componentOr get notified if this component's risk changes:
How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →