Skip to main content
Glama

run_ida_command

Execute IDA Pro scripts (IdaPython, Version 8.3) to automate reverse engineering and binary analysis tasks using the IDA Pro MCP Server.

Instructions

Execute an IDA Pro Script (IdaPython, Version IDA 8.3)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesscript

Implementation Reference

  • MCP server handler for the 'run_ida_command' tool: validates input arguments using isValidRunIdaArgs, executes the script via IDARemoteClient.executeScript, processes the result or error, and returns formatted text content.
    case 'run_ida_command': if (!isValidRunIdaArgs(request.params.arguments)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid run IDA command arguments' ); } try { const { script } = request.params.arguments; let result = await ida.executeScript(script); if (result.error) { return { content: [ { type: 'text', text: `Error executing IDA Pro script: ${result.error}`, }, ], isError: true, }; } return { content: [ { type: 'text', text: `IDA Pro Script Execution Results:\n\n${result.output}`, }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error executing IDA Pro command: ${error.message || error}`, }, ], isError: true, }; }
  • index.ts:205-217 (registration)
    Registration of the 'run_ida_command' tool in the ListTools handler, defining its name, description, and input schema requiring a 'script' string.
    name: 'run_ida_command', description: 'Execute an IDA Pro Script (IdaPython, Version IDA 8.3)', inputSchema: { type: 'object', properties: { script: { type: 'string', description: 'script', } }, required: ['script'], }, },
  • Core helper function in IDARemoteClient that implements the script execution by making a POST request to the IDA Pro remote control server's /api/execute endpoint with the provided script.
    async executeScript(script: string, logHTTP = false): Promise<ExecuteResponse> { return this.post<ExecuteResponse>('/execute', { script }); }
  • Runtime input validation helper function for run_ida_command arguments, ensuring 'script' is a string in an object.
    const isValidRunIdaArgs = (args: any): args is RunIdaDirectCommandArgs => { return ( typeof args === 'object' && args !== null && (typeof args.script === 'string') ); };
  • TypeScript interface defining the expected input arguments for the direct run_ida_command tool.
    interface RunIdaDirectCommandArgs { script: string; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fdrechsler/mcp-server-idapro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server