Skip to content

Android Studio Agent Mode Integration

Pisama connects to Android Studio Agent Mode through the local MCP server included with the pisama Python package.

What Agent Mode can do

  • Analyze a trace with all registered local detectors.
  • Run one named detector against a trace.
  • Explain a Pisama failure type and its detection method.
  • Summarize analyses from the current MCP session.

Detection runs on your machine. No Pisama account, API key, tenant ID, or backend connection is required.

Installation

python -m pip install "pisama[mcp]"
pisama --version
pisama detectors

Configure Android Studio Agent Mode

Open Settings, Tools, AI Assistant, MCP Servers and add:

{
  "pisama": {
    "command": "pisama",
    "args": ["mcp-server"]
  }
}

If Android Studio cannot find pisama, replace the command with the absolute path returned by command -v pisama.

Restart Android Studio, then ask Agent Mode:

Analyze /absolute/path/to/trace.json with Pisama and explain every finding.

Available tools

Tool Purpose
pisama_analyze Run all detectors on a trace object, JSON string, or trace file.
pisama_detect Run one named detector on a trace.
pisama_status Summarize the current local MCP session.
pisama_explain Explain a failure type and its detection method.

See the MCP Server guide for the full argument reference and troubleshooting.