AI-calls-Editor
IDE-native refactoring for AI coding assistants
AI coding assistants are getting good at generating code. However, there are some refactoring operations, such as renaming a symbol across a codebase or moving a definition and updating its references/imports, which should be instant (and free), but instead often take a substantial amount of both time and tokens.
The problem is that most coding assistants approach refactoring with the usual:
Search for occurrences. This is often unreliable, especially in large projects, due to language features like rename-at-import.
Read file sections.
Generate text patches.
Both (2) and (3) are expensive in terms of tokens.
A good AI assistant will often perform the above approach correctly through a multi-shot loop that involves linting, type-checking, and running tests (assuming it received good instructions), all of which add to token usage and time.
There’s a much better approach: use the IDE’s built-in refactoring engine. It’s correct, fast, and uses almost no tokens. Here’s the outline of the “AI-calls-Editor” approach for Claude Code and Visual Studio Code.
Create the MCP Extension. Open your project in Visual Studio Code, which has an Extension that runs a mini local MCP server. The MCP server can receive a file path, a line number, a column number, and the new name, and then rename a symbol with:
vscode.commands.executeCommand(”vscode.executeDocumentRenameProvider”, path, position, name)Register the MCP Server. Claude Code is informed about this capability with:
claude mcp add --transport http ai-calls-editor http://localhost:7272/mcpUsing the Capability. When Claude needs to rename a symbol, it only needs to figure out the parameters and make the call. It works.
Prototype: https://github.com/rokstrnisa/ai-calls-editor — contributions welcome!
Let’s save our tokens and our time.

