CodemodeSAFE
An implementation of the Codemode workflow detailed by Cloudflare.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
NOTE: I've stopped working on this repo in favor of:
https://github.com/jx-codes/lootbox
It's a much more thought out approach to code mode
A local implementation of the "Code Mode" workflow for MCP servers. Instead of struggling with multiple tool calls, LLMs write TypeScript/JavaScript code that calls a simple HTTP proxy to access your MCP servers.
Note: It does not attempt to handle the MCP -> typescript API transpilation layer. Would be cool but I really wanted to test the workflow.
https://blog.cloudflare.com/code-mode/
What is this?
This implements the core insight that LLMs are much better at writing code than at tool calling. Instead of exposing many tools directly to the LLM (which it struggles with), this server gives the LLM just one tool: execute_code. The LLM writes code that makes HTTP requests to access your other MCP servers.
How it works
- LLM gets one tool:
execute_code- executes TypeScript/JavaScript - LLM writes code: Uses
fetch()to callhttp://localhost:3001/mcp/*endpoints - HTTP proxy forwards: Transparently proxies requests to your actual MCP servers
- Results flow back: Through the code execution to the LLM
This gives you all the benefits of complex tool orchestration, but leverages what LLMs are actually good at: writing code.
Installation
Prerequisites
- Bun (latest version)
- Deno (for code execution sandbox)
- An MCP-compatible client (Claude Desktop, Cursor, VS Code with Copilot, etc.)
Setup
- Clone the repository
git clone https://github.com/jx-codes/codemode-mcp.git cd codemode-mcp
- Install dependencies
bun install
- Configure the server (optional)
Create a codemode-config.json file to customize settings:
{
"proxyPort": 3001,
"configDirectories": [
"~/.config/mcp/servers",
"./mcp-servers",
"./"
]
}- **Set up your MCP se
3521ace5999cOBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add codemode-mcp -- npx -y [email protected]
{
"mcpServers": {
"codemode-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
check_deno_version | read | Check Deno installation and version info. Use for troubleshooting code execution issues or verifying runtime capabilities. |
list_servers_with_tools | read | Get a comprehensive overview of all available MCP servers and their tools. Returns a structured list showing each server and all its available tools with descriptions. |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (5 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
@modelcontextprotocol/sdk, @types/uuid, uuid, @types/bun, typescript
Gates applied: no_behavioural_pass, no_license.
3521ace5999cfull audit observations/trust-audit/mcp-server/jx-codes__codemode.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 3521ace5999c | SAFE | B | 89 | first audit |
Questions
What is the Codemode MCP server?
An implementation of the Codemode workflow detailed by Cloudflare.
What tools does Codemode expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Codemode safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Codemode need?
No credential environment variables were found in its source, so it appears to need none.
How does Codemode run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as codemode-mcp at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (3521ace5999c), read on 2026-10-07. The repository is watched and re-audited when it changes.