# X post by @danikkk\_wqs

> Brucky's prompt that sets up code mode for MCP tools, based on Anthropic's article on code execution with MCP.

Canonical: https://propel.earth/resources/x-2125562768191270928
Last updated: 2026-11-30

Resource · Article

Originally posted by Brucky @danikkk\_wqs · 2026-11-25

> Set up "code mode" for my MCP tools in this project, based on Anthropic's "Code execution with MCP" article\.
> 
> 1\. Create a \./servers folder\. For every connected MCP server, make a subfolder, and for every tool a small typed wrapper file \(one tool per file\) with a one\-line description at the top\.
> 
> 2\. Don't load tool definitions upfront\. Add a search\_tools helper that finds tools by name or keyword, then read only the files you need\.
> 
> 3\. When a tool returns big data \(tables, logs, documents\), filter and aggregate it in code first\. Only print the rows or fields I actually need\.
> 
> 4\. Write loops, retries and polling in code instead of calling tools one by one through the conversation\.
> 
> 5\. Before any personal data \(emails, phone numbers, names\) reaches the context, replace it with placeholders like \[EMAIL\_1\] and \[PHONE\_1\], and map them back only when sending data to another tool\.
> 
> 6\. When a piece of code works, save it to \./skills/&#60;name&#62;/ with a SKILL\.md that says what it does and how to call it\. Check \./skills before writing new code\.
> 
> Run all generated code in a sandbox with no access outside this project\. Then show me the folder structure and test it on one real task\.

## Editor’s note

> What it is\: Brucky's prompt that sets up code mode for MCP tools, based on Anthropic's article on code execution with MCP\.
> 
> How to use it\: Paste the prompt into a coding agent in a sandboxed project\. Replace personal data with placeholders as the prompt says\.

[Original post on X](https://x.com/danikkk_wqs/status/2125562768191270928)

## Related

- [All resources](https://propel.earth/resources)
