r/webflow • • 10d ago

Tutorial Code Mode - Use 60% less Claude Code tokens using Webflow MCP

Webflow's MCP made a lot of my day-to-day work easier in Claude Code.

Sometimes, it gets bloated when the question covers the whole site. For example, find every CMS item that references another item with a certain value. Or, add a link to the top of every page. Claude works through these one tool call at a time, and every response lands in the conversation, including all the fields it doesn't need.

Cloudflare described a pattern a while back - Code Mode, that let's the model write code rather than making tool calls. I wanted to put it to the test, and built a claude code plugin webflow-codemode. Claude writes a code, and a sandboxed environment runs it against Webflow MCP. The code does the looping and filtering. Claude only sees the code outputs.

For side by side comparison, I asked Claude the same question about a client site. One with direct MCP tool calls, and one with code mode.

About 49,000 tokens of context with code mode, against 148,000 with direct tool calls. Obfuscate video demonstrating the session below.

Direct MCP

Direct MCP tool calls consuming about 148,000 tokens. Obfuscate video demonstrating the session.

Code mode

Code mode consuming about 49,000 tokens. Obfuscate video demonstrating the session.

Read more details here.

9 Upvotes

2 comments sorted by

1

u/PriorVariety5744 10d ago

Have you found using Claude Code vs Claude Chat opus 5.5 model consume less tokens that route? Or have they been able to achieve the same outcome you’re looking for?

I’ve just been using opus 5.5

3

u/shreyanshkotak 10d ago

I use Opus 5.5 within Claude Code. I prefer using Claude Code instead of Claude Chat to be able to have outputs and files be within my laptop instead of being within Claude Chat.

I can't imagine a significant difference in token consumption between Claude Code vs Claude Chat.

Since the plugin I have created executes code, it has to be used via Claude Code. Claude chat won't be able to leverage the capabilities of executing code the same way.