X post by @danikkk_wqs
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/<name>/ 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.