CoinGecko MCP execute: "The code is missing a top-level run function"
Error: The code is missing a top-level `run` function
What causes it
The execute tool runs your code inside a fixed template and needs an async function named run that takes the client.
How to fix it
- Wrap your code: async function run(client) { return await client.simple.price.get({ ids: "bitcoin", vs_currencies: "usd" }); }
- That call returned the live bitcoin price in about 1 s in our test.
Where we hit it
- CoinGecko MCP test report (tested Oct 16, 2026). Setup: Claude, Claude Code, Cursor, VS Code, ChatGPT
Related fixes
All MCP fixes | Setup guides | Hit a different error? Request a test