mcp-codemode
Allows invoking Alfred MCP server tools through the gateway, with Alfred-specific policy rules controlling which calls run freely or require approval.
Provides access to Vercel project, domain, deployment, and error data through the configured Vercel MCP server; deploy or write actions are gated by the approval policy.
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.
mcp-codemode
A local gateway that puts all your MCP servers behind two tools, so an agent can write one script instead of making dozens of tool calls.
search_toolsfinds functions across every server and returns their TypeScript types.run_coderuns a JavaScript script that calls those functions, and returns only what the script returns.
Scripts run in a Deno sandbox with no network, file, environment or process access. They can only act through the gateway, which checks every call against a policy. Calls that save, send, deploy, delete or can return secrets pause for a macOS approval dialog.
This is a showcase, not a supported product. It's a snapshot of a personal tool. It isn't maintained here, and issues and pull requests may go unanswered. Read the limits below before running it with anything you care about.
How it works
agent ── search_tools / run_code ──▶ gateway (127.0.0.1, bearer token)
│ ├─ catalog MCP tools → TypeScript types
│ ├─ policy free, or ask first
│ └─ approval macOS dialog + audit log
│
Deno, no permissions ◀┤ script runs here; calls go over stdin/stdout
│
└─ mcporter ──▶ your MCP servers (stdio or HTTP)A script looks like this:
const docs = await photocraft.command_list({ filter: "blur" });
return docs.slice(0, 5).map((d) => d.id);File | What it does |
| MCP front end (HTTP or |
| Loads servers through mcporter, tool search |
| JSON Schema to TypeScript declarations |
| Which calls run freely and which ask |
| The dialog and the audit log |
| The Deno process and its call protocol |
| Benchmark: direct MCP tools vs the gateway |
The per-server rules are examples for the servers it was built with: the Craft apps, REA, earshot, Alfred and Vercel. Any other server gets the generic rule, where only tools named like plain reads run freely.
Related MCP server: Gate22
Does it save anything?
Sometimes. Five tasks in Claude Code (Sonnet, headless), comparing direct MCP tools with the gateway. Averages over all valid runs:
Task | Runs (direct / gateway) | Turns | Cost | Input tokens |
Domains across all Vercel projects | 2 / 5 | 32.5 → 7.6 | −37% | +7% |
Run every blur and sharpen filter, check, undo | 1 / 1 | 18 → 7 | −12% | −43% |
Deployments and errors for 5 projects | 2 / 4 | 14 → 7.2 | −4% | +26% |
Build a layered image and look at it | 2 / 2 | 13.5 → 7 | 0% | −12% |
One filtered lookup | 2 / 4 | 4 → 4.2 | +17% | +49% |
So it helps when a job takes many calls, and costs more for a single lookup. Claude Code already keeps tool definitions out of context with its own tool search, so there's less to save there than in a client that loads them all.
Treat these as rough: there are very few runs per task, search and output were tuned between gateway runs on these same tasks, and the numbers predate the security fixes in this snapshot. Writes were refused in both modes. Two direct runs were left out because their MCP server wasn't connected.
Running it
macOS, Node 24+ and Deno on your PATH.
npm install
cp config/mcporter.example.json config/mcporter.json # then edit it
npm test
npm start # http://127.0.0.1:7801/mcpThe bearer token is created in .state/token on first start. For servers that use OAuth, run npm run auth -- <server>. Add your own rules in src/policy.ts.
Security model and limits
What it does:
The sandbox gets no Deno permissions, and the tests try to break out through the network, files, environment, processes, imports and FFI.
Each decision looks at every command id in a call, so a harmless decoy can't hide a real one.
The dialog escapes invisible and text-direction characters, and says so when arguments are too long to show.
After a script reads outside content, such as a PDF or logs, every later write in that client session asks again, with a warning.
What it doesn't do:
It doesn't protect against other programs running as you. They can read the bearer token, mcporter's OAuth tokens (
~/.mcporter) and the audit log, and they can click dialogs.Reads that run freely still reach the model. With a server that reads local files, a script can read whatever that server can.
Some rules go by tool name. A new tool named like a read runs freely until someone reviews it. Server-supplied annotations aren't trusted.
Outside content is tracked per server and tool, as listed in
src/policy.ts, and only within one client session.Descriptions and instructions from servers go to the model as they are.
"Approve rest of script" means what it says: later writes in that script run without showing their arguments, until outside content arrives.
The audit log stores arguments in plain text. It's readable only by you.
License
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
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Build, run, inspect, and continue AgentScript workflows on connected Super Chrome and Mac clients.
Discover and call AI agents via MCP. Supports A2A agents and platform agents with async tasks.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables organizations to administer remote MCP servers with function-level allow lists and credential modes, then let developers bundle permitted tools behind a single unified endpoint offering just two functions—search and execute—so agents dynamically discover and invoke only authorized tools with every call auditable.-
- FlicenseNot gradedqualityAmaintenanceEnables teams to onboard remote MCP servers, enforce function-level allow lists and credential modes, and let developers expose permitted tool bundles through a unified MCP endpoint with search and execute functions while keeping permissions and auditing enforced.-
- AlicenseNot gradedqualityAmaintenanceEnables teams to govern agent tool access by onboarding remote MCP servers, setting function-level allow lists and credential modes, and exposing permitted tools through a unified MCP endpoint with search and execute functions.MIT
- AlicenseNot gradedqualityAmaintenanceEnables teams to govern which tools agents can use by onboarding remote MCP servers, setting credential modes and function-level allow lists, and exposing permitted tools through a unified endpoint with search and execute functions.MIT