Claude Code

Claude Code in 10x

Setup

The simplest way to use Claude Code with 10x Editor is:

Tools Menu -> Claude

This assumes the Claude CLI is installed and in the path. A terminal panel will open with Claude running.

The first time Claude is started in 10x it will prompt to install the 10x MCP server. This allows claude to communicate with 10x.

The MCP server is installed for the user so will apply to all Claude instances, even those run outside of 10x.

ClaudeTerminalCommand Setting

If 10x can't find claude change the ClaudeTerminalCommand to use an absolute path to the claude exe.

Use this setting to pass in additional arguments to the claude exe.

If you run a modified claude exe change this setting to point at your exe.

Installing the 10x MCP server manually

The simplest way to install the MCP server is to start open a Claude terminal with the tools menu. But if you want to install it manually use this command:

claude mcp add 10xEditor --scope user -- "C:\Program Files\PureDevSoftware\10x\MCPServer\10xMCPServer.exe"

Restart any Claude instances for it to take effect.

This wil install the MCP server at the user level so it will be avilable for all Claude instances even if run outside of 10x.

Installing 10x MCP Server with the Claude Desktop App

Open Settings -> Developer -> Edit Config

Open claude_desktop_config.json and add the following:


{
  "mcpServers": {
    "10x Editor": {
      "command": "C:\\Program Files\\PureDevSoftware\\10x\\MCPServer\\10xMCPServer.exe",
      "args": []
    }
  }
}

Restart the Claude App

Changing the Working Directory

By default terminals open in the workspace root directory. To change this set the "Terminal Directory" setting in the workspace settings.

Functionality

Once the 10x MCP server is installed Claude will have full access to all 10x commands and python scripting.

Below is a list of some of the MCP tools available.


list_editors List all 10x Editor instances that can be connected to
connect_to Connect to a specific 10x Editor instance
read_current_buffer Read the currently open file
write_to_buffer Replace the currently open file
edit_range Replace a specific range in the currently open file
get_selection Get the currently selected text
get_current_file Get the file path of the currently open file
get_open_files Get a list of all open files
open_file Open a specific file
get_cursor_position Get the current cursor position
set_cursor_position Set the current cursor position
run_last_build Run the last build
debug_project Start the debugger
build_project Build the currently active project
rebuild_project Rebuild the currently active project
get_project_files Get a list of all files in the project
save_current_buffer Save the currently open file
search_in_file Find text in the currently open file
search_in_project Use Workspace Search to search for text in the workspace
find_file_by_name Use Workspace Search to find a file in the workspace by name
get_build_output Get the build output
get_build_results Get the build results (warnings and errors)
get_build_status Return if the build is still running
get_file_diagnostics Get warnings and errors for the current file (without doing a build)
execute_command Execute a 10x command or python statement
list_commands List all 10x commands

For a full list of tool use: /mcp and select 10x Editor, then View Tools

Usage

Below are some recommendations on how to use 10x with Claude:

  • Add a claude.md file to tell Claude how you want it to use 10x Editor.
  • In your claude.md file tell claude to use the search_in_project tool instead of grep. This will significantly speed up Claudes ability to find things.
  • Prompt: "What does this file do?"
    Claude reads the current buffer and gives a high-level summary, useful when jumping into unfamiliar code
  • Prompt: "Describe the current function"
    Claude will look at the currently open file and the cursor position and analyise the function.
  • Prompt: "Add a documentation comment to the current function"
  • Prompt: "Connect to MyTestApp"
    Claude will find a 10x instance with MyTestAppp workspace open and connect to that instance
  • Prompt: "Find all usages of MyFunction in the project"
  • Prompt: "What files are open?"
    Claude uses get_open_files to give an overview of what you're working with
  • Prompt: "Refactor the current function to remove code duplication"
  • Prompt: "Build the project and fix any errors"
    Claude runs build_project, reads get_build_results, opens the relevant files, and iterates until clean
  • Prompt: "The last build failed, what went wrong?"
    Claude reads get_build_output and explains the errors
  • Prompt: "Start the debugger"
  • Prompt: "Write a test for the current function"
    Claude reads the function and generates a test case alongside it
  • Prompt: "Find all TODO comments in the project and list them"