> For the complete documentation index, see [llms.txt](https://docs.hex-rays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hex-rays.com/ida-9.5/core/idalib/concepts/agentic-ida-with-idalib.md).

# Agentic IDA with idalib

IDA Pro, Classroom and Home are available to AI-driven workflows through idalib. If you are wondering how to use IDA with your agent of choice, this page covers the main approaches.

## Approaches

### Hex-Rays IDA MCP Server

The [**Hex-Rays IDA MCP Server**](https://github.com/HexRaysSA/ida-mcp) is Hex-Rays' official MCP server for agentic IDA workflows; it works for Claude Code, Codex, Pi, and any other MCP-compatible agent.

It can attach to a database already open in a running IDA GUI session, or spin up a managed idalib worker headlessly when no GUI instance is available.

See [Getting Started](/ida-9.5/core/mcp/getting-started.md) for setup instructions, or the [Hex-Rays IDA MCP](/ida-9.5/core/mcp.md) section for the full documentation.

#### Community MCP servers (alternative)

You can also try one of the well-maintained community implementations, as an alternative.

### Code mode (manual)

Rather than connecting an agent to a running IDA instance, you can let the agent generate and run idalib scripts on the fly. The agent writes a Python script, executes it against the binary, and reads the output.

To help the agent understand the Domain API, point it at the [ida-domain llms.txt](https://ida-domain.docs.hex-rays.com/llms.txt).

For a worked example, see [Malware analysis with Claude Code and idalib](/ida-9.5/core/idalib/how-tos/malware-analysis-with-idalib.md).

#### Claude Code Skills

Hex-Rays provides a set of pre-built skills that teach Claude to work with idalib and the Domain API, e.g., inspecting binary files, writing analysis scripts, and more. See the [Hex-Rays Marketplace](https://github.com/HexRaysSA/claude-marketplace).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hex-rays.com/ida-9.5/core/idalib/concepts/agentic-ida-with-idalib.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
