MCPtoCodeMode
Allows finding and installing the Supabase MCP server from the official MCP registry, enabling models to interact with Supabase services through MCPtoCodeMode's unified execute interface.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCPtoCodeMode
An MCP server that sits in front of your other MCP servers. The model gets three tools, search, describe and execute, and calls your servers from a short JavaScript program. Only the program's result goes back into the conversation.
npx -y mcptocodemode demo # offline comparison, no keys or config
npx -y mcptocodemode setup # add it to your coding agentssetup finds Claude Code, Codex, Cursor, Grok, OpenCode, Pi and Claude Desktop, and asks which of them to configure. It reuses the MCP servers each agent already has, lists every file it will change, and writes nothing until you confirm. Restart the agents afterwards.
setup does not remove the servers you already had, so until you take them out the agent sees their tools as well as the three new ones. docs/agents.md shows how to take them out without losing their config.
When it helps
A program can page through results, aggregate records, or pass a file from one tool to another without any of it entering the conversation. For example, to total the paid orders in a folder of JSON files:
const listing = await filesystem.list_directory({ path: "/data/orders" });
const names = listing.content.split("\n").map((line) => line.replace("[FILE] ", ""));
const orders = await Promise.all(
names.map(async (name) => JSON.parse((await filesystem.read_text_file({ path: `/data/orders/${name}` })).content)),
);
const paid = orders.filter((order) => order.status === "paid");
return { paid: paid.length, total: paid.reduce((sum, order) => sum + order.total, 0) };Called directly, every file would come back into the conversation for the model to add up. Here only { paid, total } comes back.
For one call with a short answer, calling the tool directly is simpler.
Related MCP server: toolJev
Benchmarks
Claude Sonnet 5.5 on three tasks, three runs each, against seven reference servers that expose 55 tools:
Plain MCP | MCPtoCodeMode | |
Correct answers | 9 / 9 | 9 / 9 |
Input tokens | 531,480 | 94,002 |
Cost | $1.108 | $0.222 |
Turns | 21 | 29 |
Tool definitions in every prompt | 31,179 bytes | 2,996 bytes |
Both setups answered every task correctly. MCPtoCodeMode took more turns because the model usually ran search first. A fourth task paged through mail and passed a 150 KB image between tools. Through plain MCP, Sonnet didn't produce a correct answer ($0.756, 79 s). Through MCPtoCodeMode it did ($0.061, 10 s), because the image went from one tool to the next as a handle and never entered the conversation.
REPORT.md has the method, raw data and limits: three small tasks, two models and one machine.
How it works
searchfinds methods by keyword and returns TypeScript signatures for the top results.describereturns the signatures of one server ("notes") or one method ("notes.get").executeruns JavaScript in which each server is a global, for exampleawait notes.get({ id: "1" }). It returns the program's result, itsconsole.logoutput and the list of methods it called. Anything the program puts onstateis still there on the next run.
The program runs in a QuickJS sandbox with no network, filesystem or credentials, so it can only reach the world through your MCP servers. The tools themselves are not restricted: one that sends email still sends it. --read-only refuses any method its server does not mark as read-only. The full contract is in SPEC.md.
Commands
npm install -g mcptocodemode installs the cm and mcptocodemode commands. Without installing, run npx -y mcptocodemode <command>. Note that npx cm runs a different package.
Command | What it does |
| Add MCPtoCodeMode to the agents you pick. |
| Run the offline mail comparison. |
| Check configuration without starting servers. |
| Connect to every server and print the methods available. |
| Search the official MCP registry, or download it for faster search. |
| Add a registry server to your config, or remove one. |
| Sign in to a remote server with OAuth, or sign out. |
| Run the MCP server. Agents start this. |
| Write the TypeScript declarations for the sandbox. |
docs/agents.md has the manual config for each agent. docs/configuration.md covers server discovery, options, the registry, OAuth, troubleshooting and limits.
Library
import { catalogFromServers, CodeMode } from "mcptocodemode";
const catalog = catalogFromServers([
{ name: "notes", tools: [{ name: "get", inputSchema: { type: "object", properties: { id: { type: "string" } } } }] },
]);
const mode = new CodeMode(catalog, async (call) => ({ id: call.input.id, title: "Buy milk" }));
await mode.execute(`return await notes.get({ id: "1" });`);beforeCallcan refuse a call before it runs.readOnlyPolicy(catalog)returns abeforeCallthat blocks writes.createCodeModeServer(mode)serves aCodeModeover MCP.UpstreamPoolconnects to real MCP servers.
Contributing
CONTRIBUTING.md covers setup, tests and releases, and CHANGELOG.md lists every change. For questions see SUPPORT.md, and report vulnerabilities through SECURITY.md. MIT licensed.
The idea comes from Cloudflare's Code Mode. This project uses plain MCP, so it works with any MCP client.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Search, vet & assemble MCP servers from your agent: verified tools, risk labels, and trust scores.
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables LLMs to interact with MCP servers by writing TypeScript/JavaScript code instead of direct tool calls. Provides a code execution sandbox that accesses MCP servers through HTTP proxy endpoints.137MIT
- AlicenseNot gradedqualityCmaintenanceFronts every MCP server you have with two tools: search shortlists relevant tools, and execute runs sandboxed Python that calls upstream tools as mcp..(). It enables agents to make bulk, repeated, or conditional tool calls using calibrated decision-model choices instead of per-item LLM generation.3MIT
- AlicenseNot gradedqualityBmaintenanceExposes a single execute tool so agents can discover, inspect schemas for, and compose calls to connected upstream MCP servers by writing JavaScript that runs in a fresh sandboxed QuickJS VM. Results from combined tool calls are returned as text or JSON, keeping large tool catalogs out of the agent's context.MIT
- AlicenseAqualityBmaintenanceEnables agents to accomplish multi-step work by writing a single sandboxed JavaScript program that drives shell, filesystem, HTTP, and every tool of any configured MCP server, returning only a small summary instead of raw JSON. This collapses dozens of advertised tool schemas into one tool, cutting per-request context by roughly 26× while keeping disabled upstream servers reachable.134 npmMIT